X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=IntelFrameworkModulePkg%2FUniversal%2FBdsDxe%2FBootMaint%2FFileExplorer.c;h=733632b9f47fb184d3fd558bfb1b50052129c134;hb=847240774030f9da79140a9d515a64ec817eb6eb;hp=e078a722d85fe4bbba7abf361fff6d4fb3103da7;hpb=d88f86f154ddbe39355fcf0aca03438f219b2660;p=mirror_edk2.git diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/FileExplorer.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/FileExplorer.c index e078a722d8..733632b9f4 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/FileExplorer.c +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/FileExplorer.c @@ -82,7 +82,7 @@ UpdateFileExplorePage ( HiiUpdateForm ( CallbackData->FeHiiHandle, - &mFileExplorerGuid, + &gFileExploreFormSetGuid, FORM_FILE_EXPLORER_ID, mStartOpCodeHandle, // Label FORM_FILE_EXPLORER_ID mEndOpCodeHandle // LABEL_END @@ -161,6 +161,10 @@ UpdateFileExplorer ( // Here boot from file // BootThisFile (NewFileContext); + // + // Set proper video resolution and text mode for setup. + // + ChangeModeForSetup (); ExitFileExplorer = TRUE; break; @@ -191,7 +195,7 @@ UpdateFileExplorer ( HiiUpdateForm ( CallbackData->FeHiiHandle, - &mFileExplorerGuid, + &gFileExploreFormSetGuid, FormId, mStartOpCodeHandle, // Label FormId mEndOpCodeHandle // LABEL_END @@ -249,21 +253,27 @@ FileExplorerCallback ( FILE_EXPLORER_NV_DATA *NvRamMap; EFI_STATUS Status; - if (Action == EFI_BROWSER_ACTION_CHANGING) { - if ((Value == NULL) || (ActionRequest == NULL)) { - return EFI_INVALID_PARAMETER; - } - - Status = EFI_SUCCESS; - Private = FE_CALLBACK_DATA_FROM_THIS (This); - *ActionRequest = EFI_BROWSER_ACTION_REQUEST_NONE; - + if (Action != EFI_BROWSER_ACTION_CHANGING && Action != EFI_BROWSER_ACTION_CHANGED) { // - // Retrieve uncommitted data from Form Browser + // All other action return unsupported. // - NvRamMap = &Private->FeFakeNvData; - HiiGetBrowserData (&mFileExplorerGuid, mFileExplorerStorageName, sizeof (FILE_EXPLORER_NV_DATA), (UINT8 *) NvRamMap); + return EFI_UNSUPPORTED; + } + + Status = EFI_SUCCESS; + Private = FE_CALLBACK_DATA_FROM_THIS (This); + + // + // Retrieve uncommitted data from Form Browser + // + NvRamMap = &Private->FeFakeNvData; + HiiGetBrowserData (&gFileExploreFormSetGuid, mFileExplorerStorageName, sizeof (FILE_EXPLORER_NV_DATA), (UINT8 *) NvRamMap); + if (Action == EFI_BROWSER_ACTION_CHANGED) { + if ((Value == NULL) || (ActionRequest == NULL)) { + return EFI_INVALID_PARAMETER; + } + if (QuestionId == KEY_VALUE_SAVE_AND_EXIT_BOOT || QuestionId == KEY_VALUE_SAVE_AND_EXIT_DRIVER) { // // Apply changes and exit formset @@ -305,16 +315,16 @@ FileExplorerCallback ( // Exit File Explorer formset // *ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT; - } else { - if (UpdateFileExplorer (Private, QuestionId)) { - *ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT; - } } - - return Status; + } else if (Action == EFI_BROWSER_ACTION_CHANGING) { + if (Value == NULL) { + return EFI_INVALID_PARAMETER; + } + + if (QuestionId >= FILE_OPTION_OFFSET) { + UpdateFileExplorer (Private, QuestionId); + } } - // - // All other action return unsupported. - // - return EFI_UNSUPPORTED; + + return Status; }