ArmPlatformPkg/Bds: Add support for 'BootCurrent'
The UEFI variable 'BootCurrent' defines the EFI application started by the Boot Manager. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13000 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
49a25d8490
commit
91213ad3dd
|
@ -32,6 +32,7 @@ BootOptionStart (
|
||||||
UINTN CmdLineSize;
|
UINTN CmdLineSize;
|
||||||
UINTN InitrdSize;
|
UINTN InitrdSize;
|
||||||
EFI_DEVICE_PATH* Initrd;
|
EFI_DEVICE_PATH* Initrd;
|
||||||
|
UINT16 LoadOptionIndexSize;
|
||||||
|
|
||||||
if (IS_ARM_BDS_BOOTENTRY (BootOption)) {
|
if (IS_ARM_BDS_BOOTENTRY (BootOption)) {
|
||||||
Status = EFI_UNSUPPORTED;
|
Status = EFI_UNSUPPORTED;
|
||||||
|
@ -86,7 +87,19 @@ BootOptionStart (
|
||||||
FreePool (FdtDevicePath);
|
FreePool (FdtDevicePath);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
// Set BootCurrent variable
|
||||||
|
LoadOptionIndexSize = sizeof(UINT16);
|
||||||
|
gRT->SetVariable (L"BootCurrent", &gEfiGlobalVariableGuid,
|
||||||
|
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
|
||||||
|
LoadOptionIndexSize, &(BootOption->LoadOptionIndex));
|
||||||
|
|
||||||
Status = BdsStartEfiApplication (mImageHandle, BootOption->FilePathList, BootOption->OptionalDataSize, BootOption->OptionalData);
|
Status = BdsStartEfiApplication (mImageHandle, BootOption->FilePathList, BootOption->OptionalDataSize, BootOption->OptionalData);
|
||||||
|
|
||||||
|
// Clear BootCurrent variable
|
||||||
|
LoadOptionIndexSize = sizeof(UINT16);
|
||||||
|
gRT->SetVariable (L"BootCurrent", &gEfiGlobalVariableGuid,
|
||||||
|
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
|
||||||
|
0, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
|
|
Loading…
Reference in New Issue