diff options
author | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-02-09 15:34:16 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-02-09 15:34:16 +0000 |
commit | 91213ad3dd948000e7764352533d60eb183aa234 (patch) | |
tree | 474e77efa91da433011528af1921bb9d32c72ae9 /ArmPlatformPkg | |
parent | 49a25d849008b0282d91eeeb7318b45ba4b9aced (diff) | |
download | edk2-platforms-91213ad3dd948000e7764352533d60eb183aa234.tar.xz |
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
Diffstat (limited to 'ArmPlatformPkg')
-rw-r--r-- | ArmPlatformPkg/Bds/BootOption.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ArmPlatformPkg/Bds/BootOption.c b/ArmPlatformPkg/Bds/BootOption.c index 3710178a43..289d36a50b 100644 --- a/ArmPlatformPkg/Bds/BootOption.c +++ b/ArmPlatformPkg/Bds/BootOption.c @@ -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;
|