From 33c3b9ff9460391b79d0319330c3e6abbeae5af0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Lewi=C5=84ski?= Date: Tue, 17 Oct 2023 09:16:20 +0200 Subject: [PATCH] MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenance.c: autoboot timeout fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filip LewiƄski --- .../BootMaintenance.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenance.c b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenance.c index e3f375793e..1bf1334189 100644 --- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenance.c +++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenance.c @@ -1084,7 +1084,8 @@ BootMaintCallback ( UINTN Index; EFI_DEVICE_PATH_PROTOCOL * File; - if (Action != EFI_BROWSER_ACTION_CHANGING && Action != EFI_BROWSER_ACTION_CHANGED && Action != EFI_BROWSER_ACTION_FORM_OPEN) { + + if (Action != EFI_BROWSER_ACTION_CHANGING && Action != EFI_BROWSER_ACTION_CHANGED && Action != EFI_BROWSER_ACTION_FORM_OPEN && Action != EFI_BROWSER_ACTION_RESET_TO_DEFAULT) { // // Do nothing for other UEFI Action. Only do call back when data is changed or the form is open. // @@ -1093,6 +1094,19 @@ BootMaintCallback ( Private = BMM_CALLBACK_DATA_FROM_THIS (This); + + + 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) {