mirror of https://github.com/acidanthera/audk.git
ArmPlatformPkg/Bds: Fixed and Improved initrd support in the ArmPlatformPkg Boot Manager
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12641 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
483bc3d330
commit
22a262c8ee
|
@ -99,9 +99,9 @@ typedef struct {
|
||||||
typedef struct _BDS_LOAD_OPTION_SUPPORT {
|
typedef struct _BDS_LOAD_OPTION_SUPPORT {
|
||||||
BDS_SUPPORTED_DEVICE_TYPE Type;
|
BDS_SUPPORTED_DEVICE_TYPE Type;
|
||||||
EFI_STATUS (*ListDevices)(IN OUT LIST_ENTRY* BdsLoadOptionList);
|
EFI_STATUS (*ListDevices)(IN OUT LIST_ENTRY* BdsLoadOptionList);
|
||||||
BOOLEAN (*IsSupported)(IN BDS_LOAD_OPTION* BdsLoadOption);
|
BOOLEAN (*IsSupported)(IN EFI_DEVICE_PATH *DevicePath);
|
||||||
EFI_STATUS (*CreateDevicePathNode)(IN BDS_SUPPORTED_DEVICE* BdsLoadOption, OUT EFI_DEVICE_PATH_PROTOCOL **DevicePathNode, OUT ARM_BDS_LOADER_TYPE *BootType, OUT UINT32 *Attributes);
|
EFI_STATUS (*CreateDevicePathNode)(IN CHAR16* FileName, OUT EFI_DEVICE_PATH_PROTOCOL **DevicePathNode, OUT ARM_BDS_LOADER_TYPE *BootType, OUT UINT32 *Attributes);
|
||||||
EFI_STATUS (*UpdateDevicePathNode)(IN EFI_DEVICE_PATH *OldDevicePath, OUT EFI_DEVICE_PATH_PROTOCOL** NewDevicePath, OUT ARM_BDS_LOADER_TYPE *BootType, OUT UINT32 *Attributes);
|
EFI_STATUS (*UpdateDevicePathNode)(IN EFI_DEVICE_PATH *OldDevicePath, IN CHAR16* FileName, OUT EFI_DEVICE_PATH_PROTOCOL** NewDevicePath, OUT ARM_BDS_LOADER_TYPE *BootType, OUT UINT32 *Attributes);
|
||||||
} BDS_LOAD_OPTION_SUPPORT;
|
} BDS_LOAD_OPTION_SUPPORT;
|
||||||
|
|
||||||
#define LOAD_OPTION_ENTRY_FROM_LINK(a) BASE_CR(a, BDS_LOAD_OPTION_ENTRY, Link)
|
#define LOAD_OPTION_ENTRY_FROM_LINK(a) BASE_CR(a, BDS_LOAD_OPTION_ENTRY, Link)
|
||||||
|
@ -128,8 +128,8 @@ BootDeviceListSupportedFree (
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
BootDeviceGetDeviceSupport (
|
BootDeviceGetDeviceSupport (
|
||||||
IN BDS_LOAD_OPTION *BootOption,
|
IN EFI_DEVICE_PATH *DevicePath,
|
||||||
OUT BDS_LOAD_OPTION_SUPPORT** DeviceSupport
|
OUT BDS_LOAD_OPTION_SUPPORT **DeviceSupport
|
||||||
);
|
);
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
|
|
|
@ -126,6 +126,7 @@ BootMenuAddBootOption (
|
||||||
EFI_DEVICE_PATH_PROTOCOL *InitrdPathNode;
|
EFI_DEVICE_PATH_PROTOCOL *InitrdPathNode;
|
||||||
EFI_DEVICE_PATH_PROTOCOL *InitrdPath;
|
EFI_DEVICE_PATH_PROTOCOL *InitrdPath;
|
||||||
UINTN CmdLineSize;
|
UINTN CmdLineSize;
|
||||||
|
BOOLEAN InitrdSupport;
|
||||||
UINTN InitrdSize;
|
UINTN InitrdSize;
|
||||||
|
|
||||||
Attributes = 0;
|
Attributes = 0;
|
||||||
|
@ -139,8 +140,7 @@ BootMenuAddBootOption (
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the specific device path node
|
// Create the specific device path node
|
||||||
Print(L"File path of the EFI Application or the kernel: ");
|
Status = SupportedBootDevice->Support->CreateDevicePathNode (L"EFI Application or the kernel", &DevicePathNode, &BootType, &Attributes);
|
||||||
Status = SupportedBootDevice->Support->CreateDevicePathNode (SupportedBootDevice, &DevicePathNode, &BootType, &Attributes);
|
|
||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
Status = EFI_ABORTED;
|
Status = EFI_ABORTED;
|
||||||
goto EXIT;
|
goto EXIT;
|
||||||
|
@ -149,17 +149,27 @@ BootMenuAddBootOption (
|
||||||
DevicePath = AppendDevicePathNode (SupportedBootDevice->DevicePathProtocol, (CONST EFI_DEVICE_PATH_PROTOCOL *)DevicePathNode);
|
DevicePath = AppendDevicePathNode (SupportedBootDevice->DevicePathProtocol, (CONST EFI_DEVICE_PATH_PROTOCOL *)DevicePathNode);
|
||||||
|
|
||||||
if ((BootType == BDS_LOADER_KERNEL_LINUX_ATAG) || (BootType == BDS_LOADER_KERNEL_LINUX_FDT)) {
|
if ((BootType == BDS_LOADER_KERNEL_LINUX_ATAG) || (BootType == BDS_LOADER_KERNEL_LINUX_FDT)) {
|
||||||
// Create the specific device path node
|
Print(L"Add an initrd: ");
|
||||||
Print(L"File path of the initrd: ");
|
Status = GetHIInputBoolean (&InitrdSupport);
|
||||||
Status = SupportedBootDevice->Support->CreateDevicePathNode (SupportedBootDevice, &InitrdPathNode, NULL, NULL);
|
if (EFI_ERROR(Status)) {
|
||||||
if (EFI_ERROR(Status) && Status != EFI_NOT_FOUND) { // EFI_NOT_FOUND is returned on empty input string, but we can boot without an initrd
|
|
||||||
Status = EFI_ABORTED;
|
Status = EFI_ABORTED;
|
||||||
goto EXIT;
|
goto EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (InitrdPathNode != NULL) {
|
if (InitrdSupport) {
|
||||||
// Append the Device Path node to the select device path
|
// Create the specific device path node
|
||||||
InitrdPath = AppendDevicePathNode (SupportedBootDevice->DevicePathProtocol, (CONST EFI_DEVICE_PATH_PROTOCOL *)InitrdPathNode);
|
Status = SupportedBootDevice->Support->CreateDevicePathNode (L"initrd", &InitrdPathNode, NULL, NULL);
|
||||||
|
if (EFI_ERROR(Status) && Status != EFI_NOT_FOUND) { // EFI_NOT_FOUND is returned on empty input string, but we can boot without an initrd
|
||||||
|
Status = EFI_ABORTED;
|
||||||
|
goto EXIT;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (InitrdPathNode != NULL) {
|
||||||
|
// Append the Device Path node to the select device path
|
||||||
|
InitrdPath = AppendDevicePathNode (SupportedBootDevice->DevicePathProtocol, (CONST EFI_DEVICE_PATH_PROTOCOL *)InitrdPathNode);
|
||||||
|
} else {
|
||||||
|
InitrdPath = NULL;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
InitrdPath = NULL;
|
InitrdPath = NULL;
|
||||||
}
|
}
|
||||||
|
@ -348,9 +358,11 @@ BootMenuUpdateBootOption (
|
||||||
ARM_BDS_LOADER_TYPE BootType;
|
ARM_BDS_LOADER_TYPE BootType;
|
||||||
ARM_BDS_LOADER_OPTIONAL_DATA* OptionalData;
|
ARM_BDS_LOADER_OPTIONAL_DATA* OptionalData;
|
||||||
ARM_BDS_LINUX_ARGUMENTS* LinuxArguments;
|
ARM_BDS_LINUX_ARGUMENTS* LinuxArguments;
|
||||||
EFI_DEVICE_PATH* InitrdPathList;
|
EFI_DEVICE_PATH *InitrdPathNode;
|
||||||
|
EFI_DEVICE_PATH *InitrdPath;
|
||||||
UINTN InitrdSize;
|
UINTN InitrdSize;
|
||||||
UINTN CmdLineSize;
|
UINTN CmdLineSize;
|
||||||
|
BOOLEAN InitrdSupport;
|
||||||
|
|
||||||
Status = BootMenuSelectBootOption (BootOptionsList, UPDATE_BOOT_ENTRY, TRUE, &BootOptionEntry);
|
Status = BootMenuSelectBootOption (BootOptionsList, UPDATE_BOOT_ENTRY, TRUE, &BootOptionEntry);
|
||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
|
@ -359,14 +371,13 @@ BootMenuUpdateBootOption (
|
||||||
BootOption = BootOptionEntry->BdsLoadOption;
|
BootOption = BootOptionEntry->BdsLoadOption;
|
||||||
|
|
||||||
// Get the device support for this Boot Option
|
// Get the device support for this Boot Option
|
||||||
Status = BootDeviceGetDeviceSupport (BootOption, &DeviceSupport);
|
Status = BootDeviceGetDeviceSupport (BootOption->FilePathList, &DeviceSupport);
|
||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
Print(L"Not possible to retrieve the supported device for the update\n");
|
Print(L"Not possible to retrieve the supported device for the update\n");
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
Print(L"File path of the EFI Application or the kernel: ");
|
Status = DeviceSupport->UpdateDevicePathNode (BootOption->FilePathList, L"EFI Application or the kernel", &DevicePath, NULL, NULL);
|
||||||
Status = DeviceSupport->UpdateDevicePathNode (BootOption->FilePathList, &DevicePath, NULL, NULL);
|
|
||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
Status = EFI_ABORTED;
|
Status = EFI_ABORTED;
|
||||||
goto EXIT;
|
goto EXIT;
|
||||||
|
@ -375,7 +386,6 @@ BootMenuUpdateBootOption (
|
||||||
OptionalData = BootOption->OptionalData;
|
OptionalData = BootOption->OptionalData;
|
||||||
BootType = (ARM_BDS_LOADER_TYPE)ReadUnaligned32 ((UINT32 *)(&OptionalData->Header.LoaderType));
|
BootType = (ARM_BDS_LOADER_TYPE)ReadUnaligned32 ((UINT32 *)(&OptionalData->Header.LoaderType));
|
||||||
|
|
||||||
// TODO: Allow adding an initrd to a boot entry without one
|
|
||||||
if ((BootType == BDS_LOADER_KERNEL_LINUX_ATAG) || (BootType == BDS_LOADER_KERNEL_LINUX_FDT)) {
|
if ((BootType == BDS_LOADER_KERNEL_LINUX_ATAG) || (BootType == BDS_LOADER_KERNEL_LINUX_FDT)) {
|
||||||
LinuxArguments = &OptionalData->Arguments.LinuxArguments;
|
LinuxArguments = &OptionalData->Arguments.LinuxArguments;
|
||||||
|
|
||||||
|
@ -383,13 +393,47 @@ BootMenuUpdateBootOption (
|
||||||
|
|
||||||
InitrdSize = ReadUnaligned16 ((CONST UINT16*)&LinuxArguments->InitrdSize);
|
InitrdSize = ReadUnaligned16 ((CONST UINT16*)&LinuxArguments->InitrdSize);
|
||||||
if (InitrdSize > 0) {
|
if (InitrdSize > 0) {
|
||||||
Print(L"File path of the initrd: ");
|
Print(L"Keep the initrd: ");
|
||||||
Status = DeviceSupport->UpdateDevicePathNode ((EFI_DEVICE_PATH*)((LinuxArguments + 1) + CmdLineSize), &InitrdPathList, NULL, NULL);
|
} else {
|
||||||
if (EFI_ERROR(Status) && Status != EFI_NOT_FOUND) {// EFI_NOT_FOUND is returned on empty input string, but we can boot without an initrd
|
Print(L"Add an initrd: ");
|
||||||
Status = EFI_ABORTED;
|
}
|
||||||
goto EXIT;
|
Status = GetHIInputBoolean (&InitrdSupport);
|
||||||
|
if (EFI_ERROR(Status)) {
|
||||||
|
Status = EFI_ABORTED;
|
||||||
|
goto EXIT;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (InitrdSupport) {
|
||||||
|
if (InitrdSize > 0) {
|
||||||
|
// Case we update the initrd device path
|
||||||
|
Status = DeviceSupport->UpdateDevicePathNode ((EFI_DEVICE_PATH*)((LinuxArguments + 1) + CmdLineSize), L"initrd", &InitrdPath, NULL, NULL);
|
||||||
|
if (EFI_ERROR(Status) && Status != EFI_NOT_FOUND) {// EFI_NOT_FOUND is returned on empty input string, but we can boot without an initrd
|
||||||
|
Status = EFI_ABORTED;
|
||||||
|
goto EXIT;
|
||||||
|
}
|
||||||
|
InitrdSize = GetDevicePathSize (InitrdPath);
|
||||||
|
} else {
|
||||||
|
// Case we create the initrd device path
|
||||||
|
|
||||||
|
Status = DeviceSupport->CreateDevicePathNode (L"initrd", &InitrdPathNode, NULL, NULL);
|
||||||
|
if (EFI_ERROR(Status) && Status != EFI_NOT_FOUND) { // EFI_NOT_FOUND is returned on empty input string, but we can boot without an initrd
|
||||||
|
Status = EFI_ABORTED;
|
||||||
|
goto EXIT;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (InitrdPathNode != NULL) {
|
||||||
|
// Duplicate Linux kernel Device Path
|
||||||
|
DevicePath = DuplicateDevicePath (BootOption->FilePathList);
|
||||||
|
// Replace Linux kernel Node by EndNode
|
||||||
|
SetDevicePathEndNode (GetLastDevicePathNode (DevicePath));
|
||||||
|
// Append the Device Path node to the select device path
|
||||||
|
InitrdPath = AppendDevicePathNode (DevicePath, (CONST EFI_DEVICE_PATH_PROTOCOL *)InitrdPathNode);
|
||||||
|
} else {
|
||||||
|
InitrdPath = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
InitrdSize = GetDevicePathSize (InitrdPathList);
|
} else {
|
||||||
|
InitrdSize = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Print(L"Arguments to pass to the binary: ");
|
Print(L"Arguments to pass to the binary: ");
|
||||||
|
@ -410,7 +454,7 @@ BootMenuUpdateBootOption (
|
||||||
BootArguments->LinuxArguments.CmdLineSize = CmdLineSize;
|
BootArguments->LinuxArguments.CmdLineSize = CmdLineSize;
|
||||||
BootArguments->LinuxArguments.InitrdSize = InitrdSize;
|
BootArguments->LinuxArguments.InitrdSize = InitrdSize;
|
||||||
CopyMem (&BootArguments->LinuxArguments + 1, CmdLine, CmdLineSize);
|
CopyMem (&BootArguments->LinuxArguments + 1, CmdLine, CmdLineSize);
|
||||||
CopyMem ((UINTN)(&BootArguments->LinuxArguments + 1) + CmdLine, InitrdPathList, InitrdSize);
|
CopyMem ((UINTN)(&BootArguments->LinuxArguments + 1) + CmdLine, InitrdPath, InitrdSize);
|
||||||
} else {
|
} else {
|
||||||
BootArguments = NULL;
|
BootArguments = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,23 +33,24 @@ BdsLoadOptionFileSystemList (
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
BdsLoadOptionFileSystemCreateDevicePath (
|
BdsLoadOptionFileSystemCreateDevicePath (
|
||||||
IN BDS_SUPPORTED_DEVICE* BdsLoadOption,
|
IN CHAR16* FileName,
|
||||||
OUT EFI_DEVICE_PATH_PROTOCOL **DevicePathNode,
|
OUT EFI_DEVICE_PATH_PROTOCOL **DevicePathNode,
|
||||||
OUT ARM_BDS_LOADER_TYPE *BootType,
|
OUT ARM_BDS_LOADER_TYPE *BootType,
|
||||||
OUT UINT32 *Attributes
|
OUT UINT32 *Attributes
|
||||||
);
|
);
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
BdsLoadOptionFileSystemUpdateDevicePath (
|
BdsLoadOptionFileSystemUpdateDevicePath (
|
||||||
IN EFI_DEVICE_PATH *OldDevicePath,
|
IN EFI_DEVICE_PATH *OldDevicePath,
|
||||||
OUT EFI_DEVICE_PATH_PROTOCOL** NewDevicePath,
|
IN CHAR16* FileName,
|
||||||
OUT ARM_BDS_LOADER_TYPE *BootType,
|
OUT EFI_DEVICE_PATH_PROTOCOL **NewDevicePath,
|
||||||
OUT UINT32 *Attributes
|
OUT ARM_BDS_LOADER_TYPE *BootType,
|
||||||
|
OUT UINT32 *Attributes
|
||||||
);
|
);
|
||||||
|
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
BdsLoadOptionFileSystemIsSupported (
|
BdsLoadOptionFileSystemIsSupported (
|
||||||
IN BDS_LOAD_OPTION* BdsLoadOption
|
IN EFI_DEVICE_PATH *DevicePath
|
||||||
);
|
);
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
|
@ -59,23 +60,24 @@ BdsLoadOptionMemMapList (
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
BdsLoadOptionMemMapCreateDevicePath (
|
BdsLoadOptionMemMapCreateDevicePath (
|
||||||
IN BDS_SUPPORTED_DEVICE* BdsLoadOption,
|
IN CHAR16* FileName,
|
||||||
OUT EFI_DEVICE_PATH_PROTOCOL **DevicePathNode,
|
OUT EFI_DEVICE_PATH_PROTOCOL **DevicePathNode,
|
||||||
OUT ARM_BDS_LOADER_TYPE *BootType,
|
OUT ARM_BDS_LOADER_TYPE *BootType,
|
||||||
OUT UINT32 *Attributes
|
OUT UINT32 *Attributes
|
||||||
);
|
);
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
BdsLoadOptionMemMapUpdateDevicePath (
|
BdsLoadOptionMemMapUpdateDevicePath (
|
||||||
IN EFI_DEVICE_PATH *OldDevicePath,
|
IN EFI_DEVICE_PATH *OldDevicePath,
|
||||||
OUT EFI_DEVICE_PATH_PROTOCOL** NewDevicePath,
|
IN CHAR16* FileName,
|
||||||
OUT ARM_BDS_LOADER_TYPE *BootType,
|
OUT EFI_DEVICE_PATH_PROTOCOL **NewDevicePath,
|
||||||
OUT UINT32 *Attributes
|
OUT ARM_BDS_LOADER_TYPE *BootType,
|
||||||
|
OUT UINT32 *Attributes
|
||||||
);
|
);
|
||||||
|
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
BdsLoadOptionMemMapIsSupported (
|
BdsLoadOptionMemMapIsSupported (
|
||||||
IN BDS_LOAD_OPTION* BdsLoadOption
|
IN EFI_DEVICE_PATH *DevicePath
|
||||||
);
|
);
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
|
@ -85,23 +87,24 @@ BdsLoadOptionPxeList (
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
BdsLoadOptionPxeCreateDevicePath (
|
BdsLoadOptionPxeCreateDevicePath (
|
||||||
IN BDS_SUPPORTED_DEVICE* BdsLoadOption,
|
IN CHAR16* FileName,
|
||||||
OUT EFI_DEVICE_PATH_PROTOCOL **DevicePathNode,
|
OUT EFI_DEVICE_PATH_PROTOCOL **DevicePathNode,
|
||||||
OUT ARM_BDS_LOADER_TYPE *BootType,
|
OUT ARM_BDS_LOADER_TYPE *BootType,
|
||||||
OUT UINT32 *Attributes
|
OUT UINT32 *Attributes
|
||||||
);
|
);
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
BdsLoadOptionPxeUpdateDevicePath (
|
BdsLoadOptionPxeUpdateDevicePath (
|
||||||
IN EFI_DEVICE_PATH *OldDevicePath,
|
IN EFI_DEVICE_PATH *OldDevicePath,
|
||||||
OUT EFI_DEVICE_PATH_PROTOCOL** NewDevicePath,
|
IN CHAR16* FileName,
|
||||||
OUT ARM_BDS_LOADER_TYPE *BootType,
|
OUT EFI_DEVICE_PATH_PROTOCOL **NewDevicePath,
|
||||||
OUT UINT32 *Attributes
|
OUT ARM_BDS_LOADER_TYPE *BootType,
|
||||||
|
OUT UINT32 *Attributes
|
||||||
);
|
);
|
||||||
|
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
BdsLoadOptionPxeIsSupported (
|
BdsLoadOptionPxeIsSupported (
|
||||||
IN BDS_LOAD_OPTION* BdsLoadOption
|
IN EFI_DEVICE_PATH *DevicePath
|
||||||
);
|
);
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
|
@ -111,23 +114,24 @@ BdsLoadOptionTftpList (
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
BdsLoadOptionTftpCreateDevicePath (
|
BdsLoadOptionTftpCreateDevicePath (
|
||||||
IN BDS_SUPPORTED_DEVICE* BdsLoadOption,
|
IN CHAR16* FileName,
|
||||||
OUT EFI_DEVICE_PATH_PROTOCOL **DevicePathNode,
|
OUT EFI_DEVICE_PATH_PROTOCOL **DevicePathNode,
|
||||||
OUT ARM_BDS_LOADER_TYPE *BootType,
|
OUT ARM_BDS_LOADER_TYPE *BootType,
|
||||||
OUT UINT32 *Attributes
|
OUT UINT32 *Attributes
|
||||||
);
|
);
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
BdsLoadOptionTftpUpdateDevicePath (
|
BdsLoadOptionTftpUpdateDevicePath (
|
||||||
IN EFI_DEVICE_PATH *OldDevicePath,
|
IN EFI_DEVICE_PATH *OldDevicePath,
|
||||||
OUT EFI_DEVICE_PATH_PROTOCOL** NewDevicePath,
|
IN CHAR16* FileName,
|
||||||
OUT ARM_BDS_LOADER_TYPE *BootType,
|
OUT EFI_DEVICE_PATH_PROTOCOL **NewDevicePath,
|
||||||
OUT UINT32 *Attributes
|
OUT ARM_BDS_LOADER_TYPE *BootType,
|
||||||
|
OUT UINT32 *Attributes
|
||||||
);
|
);
|
||||||
|
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
BdsLoadOptionTftpIsSupported (
|
BdsLoadOptionTftpIsSupported (
|
||||||
IN BDS_LOAD_OPTION* BdsLoadOption
|
IN EFI_DEVICE_PATH *DevicePath
|
||||||
);
|
);
|
||||||
|
|
||||||
BDS_LOAD_OPTION_SUPPORT BdsLoadOptionSupportList[] = {
|
BDS_LOAD_OPTION_SUPPORT BdsLoadOptionSupportList[] = {
|
||||||
|
@ -201,15 +205,15 @@ BootDeviceListSupportedFree (
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
BootDeviceGetDeviceSupport (
|
BootDeviceGetDeviceSupport (
|
||||||
IN BDS_LOAD_OPTION *BootOption,
|
IN EFI_DEVICE_PATH *DevicePath,
|
||||||
OUT BDS_LOAD_OPTION_SUPPORT** DeviceSupport
|
OUT BDS_LOAD_OPTION_SUPPORT **DeviceSupport
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
|
|
||||||
// Find which supported device is the most appropriate
|
// Find which supported device is the most appropriate
|
||||||
for (Index = 0; Index < BDS_DEVICE_MAX; Index++) {
|
for (Index = 0; Index < BDS_DEVICE_MAX; Index++) {
|
||||||
if (BdsLoadOptionSupportList[Index].IsSupported (BootOption)) {
|
if (BdsLoadOptionSupportList[Index].IsSupported (DevicePath)) {
|
||||||
*DeviceSupport = &BdsLoadOptionSupportList[Index];
|
*DeviceSupport = &BdsLoadOptionSupportList[Index];
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -327,10 +331,10 @@ BdsLoadOptionFileSystemList (
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
BdsLoadOptionFileSystemCreateDevicePath (
|
BdsLoadOptionFileSystemCreateDevicePath (
|
||||||
IN BDS_SUPPORTED_DEVICE* BdsLoadOption,
|
IN CHAR16* FileName,
|
||||||
OUT EFI_DEVICE_PATH_PROTOCOL **DevicePathNode,
|
OUT EFI_DEVICE_PATH_PROTOCOL **DevicePathNode,
|
||||||
OUT ARM_BDS_LOADER_TYPE *BootType,
|
OUT ARM_BDS_LOADER_TYPE *BootType,
|
||||||
OUT UINT32 *Attributes
|
OUT UINT32 *Attributes
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
@ -338,6 +342,7 @@ BdsLoadOptionFileSystemCreateDevicePath (
|
||||||
CHAR16 BootFilePath[BOOT_DEVICE_FILEPATH_MAX];
|
CHAR16 BootFilePath[BOOT_DEVICE_FILEPATH_MAX];
|
||||||
UINTN BootFilePathSize;
|
UINTN BootFilePathSize;
|
||||||
|
|
||||||
|
Print(L"File path of the %s: ", FileName);
|
||||||
Status = GetHIInputStr (BootFilePath, BOOT_DEVICE_FILEPATH_MAX);
|
Status = GetHIInputStr (BootFilePath, BOOT_DEVICE_FILEPATH_MAX);
|
||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
return EFI_ABORTED;
|
return EFI_ABORTED;
|
||||||
|
@ -371,10 +376,11 @@ BdsLoadOptionFileSystemCreateDevicePath (
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
BdsLoadOptionFileSystemUpdateDevicePath (
|
BdsLoadOptionFileSystemUpdateDevicePath (
|
||||||
IN EFI_DEVICE_PATH *OldDevicePath,
|
IN EFI_DEVICE_PATH *OldDevicePath,
|
||||||
OUT EFI_DEVICE_PATH_PROTOCOL** NewDevicePath,
|
IN CHAR16* FileName,
|
||||||
OUT ARM_BDS_LOADER_TYPE *BootType,
|
OUT EFI_DEVICE_PATH_PROTOCOL **NewDevicePath,
|
||||||
OUT UINT32 *Attributes
|
OUT ARM_BDS_LOADER_TYPE *BootType,
|
||||||
|
OUT UINT32 *Attributes
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
@ -388,6 +394,7 @@ BdsLoadOptionFileSystemUpdateDevicePath (
|
||||||
|
|
||||||
EndingDevicePath = (FILEPATH_DEVICE_PATH*)GetLastDevicePathNode (DevicePath);
|
EndingDevicePath = (FILEPATH_DEVICE_PATH*)GetLastDevicePathNode (DevicePath);
|
||||||
|
|
||||||
|
Print(L"File path of the %s: ", FileName);
|
||||||
StrnCpy (BootFilePath, EndingDevicePath->PathName, BOOT_DEVICE_FILEPATH_MAX);
|
StrnCpy (BootFilePath, EndingDevicePath->PathName, BOOT_DEVICE_FILEPATH_MAX);
|
||||||
Status = EditHIInputStr (BootFilePath, BOOT_DEVICE_FILEPATH_MAX);
|
Status = EditHIInputStr (BootFilePath, BOOT_DEVICE_FILEPATH_MAX);
|
||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
|
@ -421,12 +428,12 @@ BdsLoadOptionFileSystemUpdateDevicePath (
|
||||||
|
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
BdsLoadOptionFileSystemIsSupported (
|
BdsLoadOptionFileSystemIsSupported (
|
||||||
IN BDS_LOAD_OPTION* BdsLoadOption
|
IN EFI_DEVICE_PATH *DevicePath
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_DEVICE_PATH* DevicePathNode;
|
EFI_DEVICE_PATH* DevicePathNode;
|
||||||
|
|
||||||
DevicePathNode = GetLastDevicePathNode (BdsLoadOption->FilePathList);
|
DevicePathNode = GetLastDevicePathNode (DevicePath);
|
||||||
|
|
||||||
return IS_DEVICE_PATH_NODE(DevicePathNode,MEDIA_DEVICE_PATH,MEDIA_FILEPATH_DP);
|
return IS_DEVICE_PATH_NODE(DevicePathNode,MEDIA_DEVICE_PATH,MEDIA_FILEPATH_DP);
|
||||||
}
|
}
|
||||||
|
@ -525,38 +532,45 @@ BdsLoadOptionMemMapList (
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
BdsLoadOptionMemMapCreateDevicePath (
|
BdsLoadOptionMemMapCreateDevicePath (
|
||||||
IN BDS_SUPPORTED_DEVICE* BdsLoadOption,
|
IN CHAR16* FileName,
|
||||||
OUT EFI_DEVICE_PATH_PROTOCOL **DevicePathNode,
|
OUT EFI_DEVICE_PATH_PROTOCOL **DevicePathNode,
|
||||||
OUT ARM_BDS_LOADER_TYPE *BootType,
|
OUT ARM_BDS_LOADER_TYPE *BootType,
|
||||||
OUT UINT32 *Attributes
|
OUT UINT32 *Attributes
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
MEMMAP_DEVICE_PATH* MemMapDevicePath;
|
MEMMAP_DEVICE_PATH *MemMapDevicePath;
|
||||||
CHAR16 StrStartingAddress[BOOT_DEVICE_ADDRESS_MAX];
|
CHAR16 StrStartingAddress[BOOT_DEVICE_ADDRESS_MAX];
|
||||||
CHAR16 StrEndingAddress[BOOT_DEVICE_ADDRESS_MAX];
|
CHAR16 StrEndingAddress[BOOT_DEVICE_ADDRESS_MAX];
|
||||||
|
|
||||||
Print(L"Starting Address of the binary: ");
|
Print(L"Starting Address of the %s: ", FileName);
|
||||||
Status = GetHIInputStr (StrStartingAddress,BOOT_DEVICE_ADDRESS_MAX);
|
Status = GetHIInputStr (StrStartingAddress, BOOT_DEVICE_ADDRESS_MAX);
|
||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
return EFI_ABORTED;
|
return EFI_ABORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
Print(L"Ending Address of the binary: ");
|
Print(L"Ending Address of the %s: ", FileName);
|
||||||
Status = GetHIInputStr (StrEndingAddress,BOOT_DEVICE_ADDRESS_MAX);
|
Status = GetHIInputStr (StrEndingAddress, BOOT_DEVICE_ADDRESS_MAX);
|
||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
return EFI_ABORTED;
|
return EFI_ABORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the MemMap Device Path Node
|
// Create the MemMap Device Path Node
|
||||||
MemMapDevicePath = (MEMMAP_DEVICE_PATH*)AllocatePool (sizeof(MEMMAP_DEVICE_PATH));
|
MemMapDevicePath = (MEMMAP_DEVICE_PATH*)AllocatePool (sizeof(MEMMAP_DEVICE_PATH) + END_DEVICE_PATH_LENGTH);
|
||||||
MemMapDevicePath->Header.Type = HARDWARE_DEVICE_PATH;
|
MemMapDevicePath->Header.Type = HARDWARE_DEVICE_PATH;
|
||||||
MemMapDevicePath->Header.SubType = HW_MEMMAP_DP;
|
MemMapDevicePath->Header.SubType = HW_MEMMAP_DP;
|
||||||
|
SetDevicePathNodeLength (MemMapDevicePath, sizeof(MEMMAP_DEVICE_PATH));
|
||||||
MemMapDevicePath->MemoryType = EfiBootServicesData;
|
MemMapDevicePath->MemoryType = EfiBootServicesData;
|
||||||
MemMapDevicePath->StartingAddress = StrHexToUint64 (StrStartingAddress);
|
MemMapDevicePath->StartingAddress = StrHexToUint64 (StrStartingAddress);
|
||||||
MemMapDevicePath->EndingAddress = StrHexToUint64 (StrEndingAddress);
|
MemMapDevicePath->EndingAddress = StrHexToUint64 (StrEndingAddress);
|
||||||
|
|
||||||
Status = BootDeviceGetType (NULL, BootType, Attributes);
|
// Set a Device Path End Node after the Memory Map Device Path Node
|
||||||
|
SetDevicePathEndNode (MemMapDevicePath + 1);
|
||||||
|
|
||||||
|
if (BootType != NULL || Attributes != NULL) {
|
||||||
|
Status = BootDeviceGetType (NULL, BootType, Attributes);
|
||||||
|
}
|
||||||
|
|
||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
FreePool (MemMapDevicePath);
|
FreePool (MemMapDevicePath);
|
||||||
} else {
|
} else {
|
||||||
|
@ -568,10 +582,11 @@ BdsLoadOptionMemMapCreateDevicePath (
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
BdsLoadOptionMemMapUpdateDevicePath (
|
BdsLoadOptionMemMapUpdateDevicePath (
|
||||||
IN EFI_DEVICE_PATH *OldDevicePath,
|
IN EFI_DEVICE_PATH *OldDevicePath,
|
||||||
OUT EFI_DEVICE_PATH_PROTOCOL** NewDevicePath,
|
IN CHAR16* FileName,
|
||||||
OUT ARM_BDS_LOADER_TYPE *BootType,
|
OUT EFI_DEVICE_PATH_PROTOCOL **NewDevicePath,
|
||||||
OUT UINT32 *Attributes
|
OUT ARM_BDS_LOADER_TYPE *BootType,
|
||||||
|
OUT UINT32 *Attributes
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
@ -583,14 +598,14 @@ BdsLoadOptionMemMapUpdateDevicePath (
|
||||||
DevicePath = DuplicateDevicePath (OldDevicePath);
|
DevicePath = DuplicateDevicePath (OldDevicePath);
|
||||||
EndingDevicePath = (MEMMAP_DEVICE_PATH*)GetLastDevicePathNode (DevicePath);
|
EndingDevicePath = (MEMMAP_DEVICE_PATH*)GetLastDevicePathNode (DevicePath);
|
||||||
|
|
||||||
Print(L"Starting Address of the binary: ");
|
Print(L"Starting Address of the %s: ", FileName);
|
||||||
UnicodeSPrint (StrStartingAddress, BOOT_DEVICE_ADDRESS_MAX, L"0x%X", (UINTN)EndingDevicePath->StartingAddress);
|
UnicodeSPrint (StrStartingAddress, BOOT_DEVICE_ADDRESS_MAX, L"0x%X", (UINTN)EndingDevicePath->StartingAddress);
|
||||||
Status = EditHIInputStr (StrStartingAddress, BOOT_DEVICE_ADDRESS_MAX);
|
Status = EditHIInputStr (StrStartingAddress, BOOT_DEVICE_ADDRESS_MAX);
|
||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
return EFI_ABORTED;
|
return EFI_ABORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
Print(L"Ending Address of the binary: ");
|
Print(L"Ending Address of the %s: ", FileName);
|
||||||
UnicodeSPrint (StrEndingAddress, BOOT_DEVICE_ADDRESS_MAX, L"0x%X", (UINTN)EndingDevicePath->EndingAddress);
|
UnicodeSPrint (StrEndingAddress, BOOT_DEVICE_ADDRESS_MAX, L"0x%X", (UINTN)EndingDevicePath->EndingAddress);
|
||||||
Status = EditHIInputStr (StrEndingAddress, BOOT_DEVICE_ADDRESS_MAX);
|
Status = EditHIInputStr (StrEndingAddress, BOOT_DEVICE_ADDRESS_MAX);
|
||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
|
@ -600,7 +615,10 @@ BdsLoadOptionMemMapUpdateDevicePath (
|
||||||
EndingDevicePath->StartingAddress = StrHexToUint64 (StrStartingAddress);
|
EndingDevicePath->StartingAddress = StrHexToUint64 (StrStartingAddress);
|
||||||
EndingDevicePath->EndingAddress = StrHexToUint64 (StrEndingAddress);
|
EndingDevicePath->EndingAddress = StrHexToUint64 (StrEndingAddress);
|
||||||
|
|
||||||
Status = BootDeviceGetType (NULL, BootType, Attributes);
|
if (BootType != NULL || Attributes != NULL) {
|
||||||
|
Status = BootDeviceGetType (NULL, BootType, Attributes);
|
||||||
|
}
|
||||||
|
|
||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
FreePool(DevicePath);
|
FreePool(DevicePath);
|
||||||
} else {
|
} else {
|
||||||
|
@ -612,12 +630,12 @@ BdsLoadOptionMemMapUpdateDevicePath (
|
||||||
|
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
BdsLoadOptionMemMapIsSupported (
|
BdsLoadOptionMemMapIsSupported (
|
||||||
IN BDS_LOAD_OPTION* BdsLoadOption
|
IN EFI_DEVICE_PATH *DevicePath
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_DEVICE_PATH* DevicePathNode;
|
EFI_DEVICE_PATH* DevicePathNode;
|
||||||
|
|
||||||
DevicePathNode = GetLastDevicePathNode (BdsLoadOption->FilePathList);
|
DevicePathNode = GetLastDevicePathNode (DevicePath);
|
||||||
|
|
||||||
return IS_DEVICE_PATH_NODE(DevicePathNode,HARDWARE_DEVICE_PATH,HW_MEMMAP_DP);
|
return IS_DEVICE_PATH_NODE(DevicePathNode,HARDWARE_DEVICE_PATH,HW_MEMMAP_DP);
|
||||||
}
|
}
|
||||||
|
@ -672,10 +690,10 @@ BdsLoadOptionPxeList (
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
BdsLoadOptionPxeCreateDevicePath (
|
BdsLoadOptionPxeCreateDevicePath (
|
||||||
IN BDS_SUPPORTED_DEVICE* BdsLoadOption,
|
IN CHAR16* FileName,
|
||||||
OUT EFI_DEVICE_PATH_PROTOCOL **DevicePathNode,
|
OUT EFI_DEVICE_PATH_PROTOCOL **DevicePathNode,
|
||||||
OUT ARM_BDS_LOADER_TYPE *BootType,
|
OUT ARM_BDS_LOADER_TYPE *BootType,
|
||||||
OUT UINT32 *Attributes
|
OUT UINT32 *Attributes
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
*DevicePathNode = (EFI_DEVICE_PATH_PROTOCOL *) AllocatePool (END_DEVICE_PATH_LENGTH);
|
*DevicePathNode = (EFI_DEVICE_PATH_PROTOCOL *) AllocatePool (END_DEVICE_PATH_LENGTH);
|
||||||
|
@ -686,10 +704,11 @@ BdsLoadOptionPxeCreateDevicePath (
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
BdsLoadOptionPxeUpdateDevicePath (
|
BdsLoadOptionPxeUpdateDevicePath (
|
||||||
IN EFI_DEVICE_PATH *OldDevicePath,
|
IN EFI_DEVICE_PATH *OldDevicePath,
|
||||||
OUT EFI_DEVICE_PATH_PROTOCOL** NewDevicePath,
|
IN CHAR16* FileName,
|
||||||
OUT ARM_BDS_LOADER_TYPE *BootType,
|
OUT EFI_DEVICE_PATH_PROTOCOL **NewDevicePath,
|
||||||
OUT UINT32 *Attributes
|
OUT ARM_BDS_LOADER_TYPE *BootType,
|
||||||
|
OUT UINT32 *Attributes
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ASSERT (0);
|
ASSERT (0);
|
||||||
|
@ -698,7 +717,7 @@ BdsLoadOptionPxeUpdateDevicePath (
|
||||||
|
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
BdsLoadOptionPxeIsSupported (
|
BdsLoadOptionPxeIsSupported (
|
||||||
IN BDS_LOAD_OPTION* BdsLoadOption
|
IN EFI_DEVICE_PATH *DevicePath
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
@ -706,7 +725,7 @@ BdsLoadOptionPxeIsSupported (
|
||||||
EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath;
|
EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath;
|
||||||
EFI_PXE_BASE_CODE_PROTOCOL *PxeBcProtocol;
|
EFI_PXE_BASE_CODE_PROTOCOL *PxeBcProtocol;
|
||||||
|
|
||||||
Status = BdsConnectDevicePath (BdsLoadOption->FilePathList, &Handle, &RemainingDevicePath);
|
Status = BdsConnectDevicePath (DevicePath, &Handle, &RemainingDevicePath);
|
||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -773,10 +792,10 @@ BdsLoadOptionTftpList (
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
BdsLoadOptionTftpCreateDevicePath (
|
BdsLoadOptionTftpCreateDevicePath (
|
||||||
IN BDS_SUPPORTED_DEVICE* BdsLoadOption,
|
IN CHAR16* FileName,
|
||||||
OUT EFI_DEVICE_PATH_PROTOCOL **DevicePathNode,
|
OUT EFI_DEVICE_PATH_PROTOCOL **DevicePathNode,
|
||||||
OUT ARM_BDS_LOADER_TYPE *BootType,
|
OUT ARM_BDS_LOADER_TYPE *BootType,
|
||||||
OUT UINT32 *Attributes
|
OUT UINT32 *Attributes
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
@ -808,7 +827,7 @@ BdsLoadOptionTftpCreateDevicePath (
|
||||||
return EFI_ABORTED;
|
return EFI_ABORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
Print(L"File path of the EFI Application or the kernel : ");
|
Print(L"File path of the %s : ", FileName);
|
||||||
Status = GetHIInputStr (BootFilePath, BOOT_DEVICE_FILEPATH_MAX);
|
Status = GetHIInputStr (BootFilePath, BOOT_DEVICE_FILEPATH_MAX);
|
||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
return EFI_ABORTED;
|
return EFI_ABORTED;
|
||||||
|
@ -840,7 +859,10 @@ BdsLoadOptionTftpCreateDevicePath (
|
||||||
SetDevicePathNodeLength (FilePathDevicePath, SIZE_OF_FILEPATH_DEVICE_PATH + BootFilePathSize);
|
SetDevicePathNodeLength (FilePathDevicePath, SIZE_OF_FILEPATH_DEVICE_PATH + BootFilePathSize);
|
||||||
CopyMem (FilePathDevicePath->PathName, BootFilePath, BootFilePathSize);
|
CopyMem (FilePathDevicePath->PathName, BootFilePath, BootFilePathSize);
|
||||||
|
|
||||||
Status = BootDeviceGetType (NULL, BootType, Attributes);
|
if (BootType != NULL || Attributes != NULL) {
|
||||||
|
Status = BootDeviceGetType (NULL, BootType, Attributes);
|
||||||
|
}
|
||||||
|
|
||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
FreePool (IPv4DevicePathNode);
|
FreePool (IPv4DevicePathNode);
|
||||||
} else {
|
} else {
|
||||||
|
@ -852,10 +874,11 @@ BdsLoadOptionTftpCreateDevicePath (
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
BdsLoadOptionTftpUpdateDevicePath (
|
BdsLoadOptionTftpUpdateDevicePath (
|
||||||
IN EFI_DEVICE_PATH *OldDevicePath,
|
IN EFI_DEVICE_PATH *OldDevicePath,
|
||||||
OUT EFI_DEVICE_PATH_PROTOCOL** NewDevicePath,
|
IN CHAR16* FileName,
|
||||||
OUT ARM_BDS_LOADER_TYPE *BootType,
|
OUT EFI_DEVICE_PATH_PROTOCOL **NewDevicePath,
|
||||||
OUT UINT32 *Attributes
|
OUT ARM_BDS_LOADER_TYPE *BootType,
|
||||||
|
OUT UINT32 *Attributes
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ASSERT (0);
|
ASSERT (0);
|
||||||
|
@ -864,7 +887,7 @@ BdsLoadOptionTftpUpdateDevicePath (
|
||||||
|
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
BdsLoadOptionTftpIsSupported (
|
BdsLoadOptionTftpIsSupported (
|
||||||
IN BDS_LOAD_OPTION* BdsLoadOption
|
IN EFI_DEVICE_PATH *DevicePath
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
@ -873,7 +896,7 @@ BdsLoadOptionTftpIsSupported (
|
||||||
EFI_DEVICE_PATH *NextDevicePath;
|
EFI_DEVICE_PATH *NextDevicePath;
|
||||||
EFI_PXE_BASE_CODE_PROTOCOL *PxeBcProtocol;
|
EFI_PXE_BASE_CODE_PROTOCOL *PxeBcProtocol;
|
||||||
|
|
||||||
Status = BdsConnectDevicePath (BdsLoadOption->FilePathList, &Handle, &RemainingDevicePath);
|
Status = BdsConnectDevicePath (DevicePath, &Handle, &RemainingDevicePath);
|
||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue