Skip to content

Commit

Permalink
autoboot timeout fixes WIP
Browse files Browse the repository at this point in the history
Signed-off-by: Filip Lewiński <[email protected]>
  • Loading branch information
filipleple committed Oct 17, 2023
1 parent 33c3b9f commit e9931ed
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenance.c
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,7 @@ BootMaintCallback (
EFI_DEVICE_PATH_PROTOCOL * File;


if (Action != EFI_BROWSER_ACTION_CHANGING && Action != EFI_BROWSER_ACTION_CHANGED && Action != EFI_BROWSER_ACTION_FORM_OPEN && Action != EFI_BROWSER_ACTION_RESET_TO_DEFAULT) {
if (Action != EFI_BROWSER_ACTION_CHANGING && Action != EFI_BROWSER_ACTION_CHANGED && Action != EFI_BROWSER_ACTION_FORM_OPEN && Action != EFI_BROWSER_ACTION_REQUEST_RESET) {
//
// Do nothing for other UEFI Action. Only do call back when data is changed or the form is open.
//
Expand All @@ -1094,19 +1094,17 @@ BootMaintCallback (

Private = BMM_CALLBACK_DATA_FROM_THIS (This);

if (Action == EFI_BROWSER_ACTION_REQUEST_RESET) {
if (QuestionId == FORM_TIME_OUT_ID){
Value->u16 = PcdGet16 (PcdPlatformBootTimeOut);
//CurrentFakeNVMap->BootTimeOut = PcdGet16 (PcdPlatformBootTimeOut); -- alt take
}
else {
return EFI_UNSUPPORTED;
}


if (Action == EFI_BROWSER_ACTION_DEFAULT_FIRMWARE) {
//find something like Private->BmmDefaultValues.BootTimeOut
CurrentFakeNVMap->BootTimeOut = Private->BmmOldFakeNVData.BootTimeOut;

HiiSetBrowserData(...); // Update the value in the HII database

return EFI_SUCCESS; // Indicate that the operation was successful
}



if (Action == EFI_BROWSER_ACTION_FORM_OPEN) {
if (QuestionId == KEY_VALUE_TRIGGER_FORM_OPEN_ACTION) {
if (!mFirstEnterBMMForm) {
Expand Down

0 comments on commit e9931ed

Please sign in to comment.