Refine the save action for the BdsDxe.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15616 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Eric Dong
2014-07-04 01:58:48 +00:00
committed by ydong10
parent dda74d6d62
commit 8acb3f7b54
6 changed files with 148 additions and 266 deletions

View File

@ -708,6 +708,16 @@ Var_UpdateDriverOption (
InsertTailList (&DriverOptionMenu.Head, &NewMenuEntry->Link);
DriverOptionMenu.MenuNumber++;
//
// Update "change boot order" page used data, append the new add boot
// option at the end.
//
Index = 0;
while (CallbackData->BmmFakeNvData.DriverOptionOrder[Index] != 0) {
Index++;
}
CallbackData->BmmFakeNvData.DriverOptionOrder[Index] = (UINT32) (NewMenuEntry->OptionNumber + 1);
*DescriptionData = 0x0000;
*OptionalData = 0x0000;
}
@ -879,6 +889,16 @@ Var_UpdateBootOption (
InsertTailList (&BootOptionMenu.Head, &NewMenuEntry->Link);
BootOptionMenu.MenuNumber++;
//
// Update "change driver order" page used data, append the new add driver
// option at the end.
//
Index = 0;
while (CallbackData->BmmFakeNvData.BootOptionOrder[Index] != 0) {
Index++;
}
CallbackData->BmmFakeNvData.BootOptionOrder[Index] = (UINT32) (NewMenuEntry->OptionNumber + 1);
NvRamMap->BootDescriptionData[0] = 0x0000;
NvRamMap->BootOptionalData[0] = 0x0000;
}