mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-22 13:14:26 +02:00
ArmPkg/BdsLib: Move the Generic BDS_LOAD_OPTION structure from Armplatform/Pkg to ArmPkg/Bds
This structure is defined by the UEFI specification and has a better location in BdsLib. ArmPlatformPkg/Bds: Encapsulate the BDS_LOAD_OPTION into a list entry structure git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12312 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
2ccfb71ebe
commit
a6e97d28aa
@ -15,6 +15,25 @@
|
|||||||
#ifndef __BDS_ENTRY_H__
|
#ifndef __BDS_ENTRY_H__
|
||||||
#define __BDS_ENTRY_H__
|
#define __BDS_ENTRY_H__
|
||||||
|
|
||||||
|
typedef UINT8* EFI_LOAD_OPTION;
|
||||||
|
|
||||||
|
/**
|
||||||
|
This is defined by the UEFI specs, don't change it
|
||||||
|
**/
|
||||||
|
typedef struct {
|
||||||
|
UINT16 LoadOptionIndex;
|
||||||
|
EFI_LOAD_OPTION LoadOption;
|
||||||
|
UINTN LoadOptionSize;
|
||||||
|
|
||||||
|
UINT32 Attributes;
|
||||||
|
UINT16 FilePathListLength;
|
||||||
|
CHAR16 *Description;
|
||||||
|
EFI_DEVICE_PATH_PROTOCOL *FilePathList;
|
||||||
|
|
||||||
|
VOID* OptionalData;
|
||||||
|
UINTN OptionalDataSize;
|
||||||
|
} BDS_LOAD_OPTION;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Connect a Device Path and return the handle of the driver that support this DevicePath
|
Connect a Device Path and return the handle of the driver that support this DevicePath
|
||||||
|
|
||||||
|
@ -71,6 +71,11 @@ typedef struct {
|
|||||||
ARM_BDS_LOADER_ARGUMENTS Arguments;
|
ARM_BDS_LOADER_ARGUMENTS Arguments;
|
||||||
} ARM_BDS_LOADER_OPTIONAL_DATA;
|
} ARM_BDS_LOADER_OPTIONAL_DATA;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
LIST_ENTRY Link;
|
||||||
|
BDS_LOAD_OPTION* BdsLoadOption;
|
||||||
|
} BDS_LOAD_OPTION_ENTRY;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
BDS_DEVICE_FILESYSTEM = 0,
|
BDS_DEVICE_FILESYSTEM = 0,
|
||||||
BDS_DEVICE_MEMMAP,
|
BDS_DEVICE_MEMMAP,
|
||||||
@ -88,23 +93,6 @@ typedef struct {
|
|||||||
|
|
||||||
#define SUPPORTED_BOOT_DEVICE_FROM_LINK(a) BASE_CR(a, BDS_SUPPORTED_DEVICE, Link)
|
#define SUPPORTED_BOOT_DEVICE_FROM_LINK(a) BASE_CR(a, BDS_SUPPORTED_DEVICE, Link)
|
||||||
|
|
||||||
typedef UINT8* EFI_LOAD_OPTION;
|
|
||||||
|
|
||||||
/* This is defined by the UEFI specs, don't change it */
|
|
||||||
typedef struct {
|
|
||||||
LIST_ENTRY Link;
|
|
||||||
|
|
||||||
UINT16 LoadOptionIndex;
|
|
||||||
EFI_LOAD_OPTION LoadOption;
|
|
||||||
UINTN LoadOptionSize;
|
|
||||||
|
|
||||||
UINT32 Attributes;
|
|
||||||
UINT16 FilePathListLength;
|
|
||||||
CHAR16 *Description;
|
|
||||||
EFI_DEVICE_PATH_PROTOCOL *FilePathList;
|
|
||||||
BDS_LOADER_OPTIONAL_DATA *OptionalData;
|
|
||||||
} BDS_LOAD_OPTION;
|
|
||||||
|
|
||||||
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);
|
||||||
@ -113,7 +101,8 @@ typedef struct _BDS_LOAD_OPTION_SUPPORT {
|
|||||||
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, 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_FROM_LINK(a) BASE_CR(a, BDS_LOAD_OPTION, Link)
|
#define LOAD_OPTION_ENTRY_FROM_LINK(a) BASE_CR(a, BDS_LOAD_OPTION_ENTRY, Link)
|
||||||
|
#define LOAD_OPTION_FROM_LINK(a) ((BDS_LOAD_OPTION_ENTRY*)BASE_CR(a, BDS_LOAD_OPTION_ENTRY, Link))->BdsLoadOption
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
GetEnvironmentVariable (
|
GetEnvironmentVariable (
|
||||||
|
@ -120,7 +120,7 @@ BootMenuAddBootOption (
|
|||||||
CHAR8 CmdLine[BOOT_DEVICE_OPTION_MAX];
|
CHAR8 CmdLine[BOOT_DEVICE_OPTION_MAX];
|
||||||
UINT32 Attributes;
|
UINT32 Attributes;
|
||||||
ARM_BDS_LOADER_TYPE BootType;
|
ARM_BDS_LOADER_TYPE BootType;
|
||||||
BDS_LOAD_OPTION *BdsLoadOption;
|
BDS_LOAD_OPTION_ENTRY *BdsLoadOptionEntry;
|
||||||
EFI_DEVICE_PATH *DevicePath;
|
EFI_DEVICE_PATH *DevicePath;
|
||||||
EFI_DEVICE_PATH_PROTOCOL *DevicePathNode;
|
EFI_DEVICE_PATH_PROTOCOL *DevicePathNode;
|
||||||
EFI_DEVICE_PATH_PROTOCOL *InitrdPathNode;
|
EFI_DEVICE_PATH_PROTOCOL *InitrdPathNode;
|
||||||
@ -192,9 +192,10 @@ BootMenuAddBootOption (
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create new entry
|
// Create new entry
|
||||||
Status = BootOptionCreate (Attributes, BootDescription, DevicePath, BootType, &BootArguments, &BdsLoadOption);
|
BdsLoadOptionEntry = (BDS_LOAD_OPTION_ENTRY*)AllocatePool (sizeof(BDS_LOAD_OPTION_ENTRY));
|
||||||
|
Status = BootOptionCreate (Attributes, BootDescription, DevicePath, BootType, BootArguments, &BdsLoadOptionEntry->BdsLoadOption);
|
||||||
if (!EFI_ERROR(Status)) {
|
if (!EFI_ERROR(Status)) {
|
||||||
InsertTailList (BootOptionsList,&BdsLoadOption->Link);
|
InsertTailList (BootOptionsList, &BdsLoadOptionEntry->Link);
|
||||||
}
|
}
|
||||||
|
|
||||||
FREE_DEVICE_PATH:
|
FREE_DEVICE_PATH:
|
||||||
@ -212,36 +213,43 @@ EXIT:
|
|||||||
STATIC
|
STATIC
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
BootMenuSelectBootOption (
|
BootMenuSelectBootOption (
|
||||||
IN LIST_ENTRY *BootOptionsList,
|
IN LIST_ENTRY* BootOptionsList,
|
||||||
IN CONST CHAR16* InputStatement,
|
IN CONST CHAR16* InputStatement,
|
||||||
OUT BDS_LOAD_OPTION **BdsLoadOption
|
IN BOOLEAN OnlyArmBdsBootEntry,
|
||||||
|
OUT BDS_LOAD_OPTION_ENTRY** BdsLoadOptionEntry
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
LIST_ENTRY* Entry;
|
LIST_ENTRY* Entry;
|
||||||
BDS_LOAD_OPTION *BootOption;
|
BDS_LOAD_OPTION* BdsLoadOption;
|
||||||
UINTN BootOptionSelected;
|
UINTN BootOptionSelected;
|
||||||
UINTN BootOptionCount;
|
UINTN BootOptionCount;
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
|
|
||||||
// Display the list of supported boot devices
|
// Display the list of supported boot devices
|
||||||
BootOptionCount = 1;
|
BootOptionCount = 1;
|
||||||
for (Entry = GetFirstNode (BootOptionsList);
|
for (Entry = GetFirstNode (BootOptionsList);
|
||||||
!IsNull (BootOptionsList,Entry);
|
!IsNull (BootOptionsList,Entry);
|
||||||
Entry = GetNextNode (BootOptionsList,Entry)
|
Entry = GetNextNode (BootOptionsList, Entry)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
BootOption = LOAD_OPTION_FROM_LINK(Entry);
|
BdsLoadOption = LOAD_OPTION_FROM_LINK(Entry);
|
||||||
Print(L"[%d] %s\n",BootOptionCount,BootOption->Description);
|
|
||||||
|
if (OnlyArmBdsBootEntry && !IS_ARM_BDS_BOOTENTRY (BdsLoadOption)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
Print (L"[%d] %s\n", BootOptionCount, BdsLoadOption->Description);
|
||||||
|
|
||||||
DEBUG_CODE_BEGIN();
|
DEBUG_CODE_BEGIN();
|
||||||
CHAR16* DevicePathTxt;
|
CHAR16* DevicePathTxt;
|
||||||
EFI_DEVICE_PATH_TO_TEXT_PROTOCOL* DevicePathToTextProtocol;
|
EFI_DEVICE_PATH_TO_TEXT_PROTOCOL* DevicePathToTextProtocol;
|
||||||
ARM_BDS_LOADER_TYPE LoaderType;
|
ARM_BDS_LOADER_TYPE LoaderType;
|
||||||
|
ARM_BDS_LOADER_OPTIONAL_DATA* OptionalData;
|
||||||
|
|
||||||
Status = gBS->LocateProtocol(&gEfiDevicePathToTextProtocolGuid, NULL, (VOID **)&DevicePathToTextProtocol);
|
Status = gBS->LocateProtocol(&gEfiDevicePathToTextProtocolGuid, NULL, (VOID **)&DevicePathToTextProtocol);
|
||||||
ASSERT_EFI_ERROR(Status);
|
ASSERT_EFI_ERROR(Status);
|
||||||
DevicePathTxt = DevicePathToTextProtocol->ConvertDevicePathToText(BootOption->FilePathList,TRUE,TRUE);
|
DevicePathTxt = DevicePathToTextProtocol->ConvertDevicePathToText(BdsLoadOption->FilePathList,TRUE,TRUE);
|
||||||
|
|
||||||
Print(L"\t- %s\n",DevicePathTxt);
|
Print(L"\t- %s\n",DevicePathTxt);
|
||||||
OptionalData = BdsLoadOption->OptionalData;
|
OptionalData = BdsLoadOption->OptionalData;
|
||||||
@ -256,6 +264,11 @@ BootMenuSelectBootOption (
|
|||||||
BootOptionCount++;
|
BootOptionCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (BootOptionCount == 0) {
|
||||||
|
Print (L"No supported Boot Entry.\n");
|
||||||
|
return EFI_NOT_FOUND;
|
||||||
|
}
|
||||||
|
|
||||||
// Get the index of the boot device to delete
|
// Get the index of the boot device to delete
|
||||||
BootOptionSelected = 0;
|
BootOptionSelected = 0;
|
||||||
while (BootOptionSelected == 0) {
|
while (BootOptionSelected == 0) {
|
||||||
@ -277,7 +290,7 @@ BootMenuSelectBootOption (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (Index == BootOptionSelected) {
|
if (Index == BootOptionSelected) {
|
||||||
*BdsLoadOption = LOAD_OPTION_FROM_LINK(Entry);
|
*BdsLoadOptionEntry = LOAD_OPTION_ENTRY_FROM_LINK(Entry);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Index++;
|
Index++;
|
||||||
@ -291,16 +304,22 @@ BootMenuRemoveBootOption (
|
|||||||
IN LIST_ENTRY *BootOptionsList
|
IN LIST_ENTRY *BootOptionsList
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
BDS_LOAD_OPTION *BootOption;
|
BDS_LOAD_OPTION_ENTRY* BootOptionEntry;
|
||||||
|
|
||||||
Status = BootMenuSelectBootOption (BootOptionsList,L"Delete entry: ",&BootOption);
|
Status = BootMenuSelectBootOption (BootOptionsList, L"Delete entry: ", FALSE, &BootOptionEntry);
|
||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If the Boot Option was attached to a list remove it
|
||||||
|
if (!IsListEmpty (&BootOptionEntry->Link)) {
|
||||||
|
// Remove the entry from the list
|
||||||
|
RemoveEntryList (&BootOptionEntry->Link);
|
||||||
|
}
|
||||||
|
|
||||||
// Delete the BDS Load option structures
|
// Delete the BDS Load option structures
|
||||||
BootOptionDelete (BootOption);
|
BootOptionDelete (BootOptionEntry->BdsLoadOption);
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
@ -311,6 +330,7 @@ BootMenuUpdateBootOption (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
BDS_LOAD_OPTION_ENTRY *BootOptionEntry;
|
||||||
BDS_LOAD_OPTION *BootOption;
|
BDS_LOAD_OPTION *BootOption;
|
||||||
BDS_LOAD_OPTION_SUPPORT* DeviceSupport;
|
BDS_LOAD_OPTION_SUPPORT* DeviceSupport;
|
||||||
ARM_BDS_LOADER_ARGUMENTS* BootArguments;
|
ARM_BDS_LOADER_ARGUMENTS* BootArguments;
|
||||||
@ -324,10 +344,11 @@ BootMenuUpdateBootOption (
|
|||||||
UINTN InitrdSize;
|
UINTN InitrdSize;
|
||||||
UINTN CmdLineSize;
|
UINTN CmdLineSize;
|
||||||
|
|
||||||
Status = BootMenuSelectBootOption (BootOptionsList,L"Update entry: ",&BootOption);
|
Status = BootMenuSelectBootOption (BootOptionsList, L"Update entry: ", TRUE, &BootOptionEntry);
|
||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
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,&DeviceSupport);
|
||||||
@ -494,10 +515,10 @@ BootMenuMain (
|
|||||||
BootOption = NULL;
|
BootOption = NULL;
|
||||||
BootMainEntryCount = sizeof(BootMainEntries) / sizeof(struct BOOT_MAIN_ENTRY);
|
BootMainEntryCount = sizeof(BootMainEntries) / sizeof(struct BOOT_MAIN_ENTRY);
|
||||||
|
|
||||||
// Get Boot#### list
|
|
||||||
BootOptionList (&BootOptionsList);
|
|
||||||
|
|
||||||
while (TRUE) {
|
while (TRUE) {
|
||||||
|
// Get Boot#### list
|
||||||
|
BootOptionList (&BootOptionsList);
|
||||||
|
|
||||||
OptionCount = 1;
|
OptionCount = 1;
|
||||||
|
|
||||||
// Display the Boot options
|
// Display the Boot options
|
||||||
|
@ -22,7 +22,6 @@ BootOptionStart (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_DEVICE_PATH* FdtDevicePath;
|
|
||||||
EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL* EfiDevicePathFromTextProtocol;
|
EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL* EfiDevicePathFromTextProtocol;
|
||||||
UINT32 LoaderType;
|
UINT32 LoaderType;
|
||||||
ARM_BDS_LOADER_OPTIONAL_DATA* OptionalData;
|
ARM_BDS_LOADER_OPTIONAL_DATA* OptionalData;
|
||||||
@ -34,6 +33,7 @@ BootOptionStart (
|
|||||||
UINTN InitrdSize;
|
UINTN InitrdSize;
|
||||||
EFI_DEVICE_PATH* Initrd;
|
EFI_DEVICE_PATH* Initrd;
|
||||||
|
|
||||||
|
if (IS_ARM_BDS_BOOTENTRY (BootOption)) {
|
||||||
Status = EFI_UNSUPPORTED;
|
Status = EFI_UNSUPPORTED;
|
||||||
OptionalData = BootOption->OptionalData;
|
OptionalData = BootOption->OptionalData;
|
||||||
LoaderType = ReadUnaligned32 ((CONST UINT32*)&OptionalData->Header.LoaderType);
|
LoaderType = ReadUnaligned32 ((CONST UINT32*)&OptionalData->Header.LoaderType);
|
||||||
@ -83,6 +83,10 @@ BootOptionStart (
|
|||||||
Initrd, // Initrd
|
Initrd, // Initrd
|
||||||
(CHAR8*)(LinuxArguments + 1),
|
(CHAR8*)(LinuxArguments + 1),
|
||||||
FdtDevicePath);
|
FdtDevicePath);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Status = BdsStartEfiApplication (mImageHandle, BootOption->FilePathList);
|
||||||
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
@ -159,11 +163,12 @@ BootOptionList (
|
|||||||
IN OUT LIST_ENTRY *BootOptionList
|
IN OUT LIST_ENTRY *BootOptionList
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
UINT16 *BootOrder;
|
UINT16* BootOrder;
|
||||||
UINTN BootOrderSize;
|
UINTN BootOrderSize;
|
||||||
BDS_LOAD_OPTION *BdsLoadOption;
|
BDS_LOAD_OPTION* BdsLoadOption;
|
||||||
|
BDS_LOAD_OPTION_ENTRY* BdsLoadOptionEntry;
|
||||||
|
|
||||||
InitializeListHead (BootOptionList);
|
InitializeListHead (BootOptionList);
|
||||||
|
|
||||||
@ -176,7 +181,9 @@ BootOptionList (
|
|||||||
for (Index = 0; Index < BootOrderSize / sizeof (UINT16); Index++) {
|
for (Index = 0; Index < BootOrderSize / sizeof (UINT16); Index++) {
|
||||||
Status = BootOptionFromLoadOptionVariable (BootOrder[Index],&BdsLoadOption);
|
Status = BootOptionFromLoadOptionVariable (BootOrder[Index],&BdsLoadOption);
|
||||||
if (!EFI_ERROR(Status)) {
|
if (!EFI_ERROR(Status)) {
|
||||||
InsertTailList (BootOptionList,&BdsLoadOption->Link);
|
BdsLoadOptionEntry = (BDS_LOAD_OPTION_ENTRY*)AllocatePool(sizeof(BDS_LOAD_OPTION_ENTRY));
|
||||||
|
BdsLoadOptionEntry->BdsLoadOption = BdsLoadOption;
|
||||||
|
InsertTailList (BootOptionList,&BdsLoadOptionEntry->Link);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -327,21 +334,24 @@ BootOptionCreate (
|
|||||||
IN EFI_DEVICE_PATH_PROTOCOL* DevicePath,
|
IN EFI_DEVICE_PATH_PROTOCOL* DevicePath,
|
||||||
IN ARM_BDS_LOADER_TYPE BootType,
|
IN ARM_BDS_LOADER_TYPE BootType,
|
||||||
IN ARM_BDS_LOADER_ARGUMENTS* BootArguments,
|
IN ARM_BDS_LOADER_ARGUMENTS* BootArguments,
|
||||||
OUT BDS_LOAD_OPTION **BdsLoadOption
|
OUT BDS_LOAD_OPTION** BdsLoadOption
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
BDS_LOAD_OPTION *BootOption;
|
BDS_LOAD_OPTION_ENTRY* BootOptionEntry;
|
||||||
CHAR16 BootVariableName[9];
|
BDS_LOAD_OPTION* BootOption;
|
||||||
UINT16 *BootOrder;
|
CHAR16 BootVariableName[9];
|
||||||
UINTN BootOrderSize;
|
UINT16* BootOrder;
|
||||||
|
UINTN BootOrderSize;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Allocate and fill the memory for the BDS Load Option structure
|
// Allocate and fill the memory for the BDS Load Option structure
|
||||||
//
|
//
|
||||||
BootOption = (BDS_LOAD_OPTION*)AllocateZeroPool(sizeof(BDS_LOAD_OPTION));
|
BootOptionEntry = (BDS_LOAD_OPTION_ENTRY*)AllocatePool (sizeof (BDS_LOAD_OPTION_ENTRY));
|
||||||
|
InitializeListHead (&BootOptionEntry->Link);
|
||||||
|
BootOptionEntry->BdsLoadOption = (BDS_LOAD_OPTION*)AllocateZeroPool (sizeof(BDS_LOAD_OPTION));
|
||||||
|
|
||||||
InitializeListHead (&BootOption->Link);
|
BootOption = BootOptionEntry->BdsLoadOption;
|
||||||
BootOptionSetFields (BootOption, Attributes, BootDescription, DevicePath, BootType, BootArguments);
|
BootOptionSetFields (BootOption, Attributes, BootDescription, DevicePath, BootType, BootArguments);
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -419,17 +429,11 @@ BootOptionDelete (
|
|||||||
IN BDS_LOAD_OPTION *BootOption
|
IN BDS_LOAD_OPTION *BootOption
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
UINTN BootOrderSize;
|
UINTN BootOrderSize;
|
||||||
UINT16* BootOrder;
|
UINT16* BootOrder;
|
||||||
UINTN BootOrderCount;
|
UINTN BootOrderCount;
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
|
||||||
// If the Boot Optiono was attached to a list remove it
|
|
||||||
if (!IsListEmpty (&BootOption->Link)) {
|
|
||||||
// Remove the entry from the list
|
|
||||||
RemoveEntryList (&BootOption->Link);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Remove the entry from the BootOrder environment variable
|
// Remove the entry from the BootOrder environment variable
|
||||||
Status = GetEnvironmentVariable (L"BootOrder", NULL, &BootOrderSize, (VOID**)&BootOrder);
|
Status = GetEnvironmentVariable (L"BootOrder", NULL, &BootOrderSize, (VOID**)&BootOrder);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user