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:
oliviermartin 2012-02-09 15:34:16 +00:00
parent 49a25d8490
commit 91213ad3dd
1 changed files with 13 additions and 0 deletions

View File

@ -32,6 +32,7 @@ BootOptionStart (
UINTN CmdLineSize;
UINTN InitrdSize;
EFI_DEVICE_PATH* Initrd;
UINT16 LoadOptionIndexSize;
if (IS_ARM_BDS_BOOTENTRY (BootOption)) {
Status = EFI_UNSUPPORTED;
@ -86,7 +87,19 @@ BootOptionStart (
FreePool (FdtDevicePath);
}
} 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);
// Clear BootCurrent variable
LoadOptionIndexSize = sizeof(UINT16);
gRT->SetVariable (L"BootCurrent", &gEfiGlobalVariableGuid,
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
0, NULL);
}
return Status;