From 4548fc2aaada33c16fd1d02e8a05fe71050e64b4 Mon Sep 17 00:00:00 2001 From: lgao4 Date: Wed, 2 Jun 2010 02:06:01 +0000 Subject: [PATCH] Per UEFI spec, FORM_OPEN/FORM_CLOSE Callback function should be called for each question in the form when this form opens or closes. Update all EDKII HII drivers to correctly handle FORM_OPEN and FORM_CLOSE call back. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10561 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Universal/BdsDxe/BootMaint/BootMaint.c | 7 +++++++ .../Universal/BdsDxe/BootMaint/FileExplorer.c | 9 ++++++++- .../Universal/BdsDxe/BootMngr/BootManager.c | 7 +++++++ .../Universal/BdsDxe/DeviceMngr/DeviceManager.c | 14 ++++++++++++++ .../Universal/BdsDxe/FrontPage.c | 9 ++++++++- 5 files changed, 44 insertions(+), 2 deletions(-) diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c index e37370d333..48035298d3 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c @@ -297,6 +297,13 @@ BootMaintCallback ( UINT8 *DisMap; EFI_FORM_ID FormId; + if ((Action == EFI_BROWSER_ACTION_FORM_OPEN) || (Action == EFI_BROWSER_ACTION_FORM_CLOSE)) { + // + // Do nothing for UEFI OPEN/CLOSE Action + // + return EFI_SUCCESS; + } + if ((Value == NULL) || (ActionRequest == NULL)) { return EFI_INVALID_PARAMETER; } diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/FileExplorer.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/FileExplorer.c index dc8896ed98..34b9f956ba 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/FileExplorer.c +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/FileExplorer.c @@ -1,7 +1,7 @@ /** @file File explorer related functions. -Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -249,6 +249,13 @@ FileExplorerCallback ( FILE_EXPLORER_NV_DATA *NvRamMap; EFI_STATUS Status; + if ((Action == EFI_BROWSER_ACTION_FORM_OPEN) || (Action == EFI_BROWSER_ACTION_FORM_CLOSE)) { + // + // Do nothing for UEFI OPEN/CLOSE Action + // + return EFI_SUCCESS; + } + if ((Value == NULL) || (ActionRequest == NULL)) { return EFI_INVALID_PARAMETER; } diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c index da291000bc..b22d0982ae 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c @@ -88,6 +88,13 @@ BootManagerCallback ( LIST_ENTRY *Link; UINT16 KeyCount; + if ((Action == EFI_BROWSER_ACTION_FORM_OPEN) || (Action == EFI_BROWSER_ACTION_FORM_CLOSE)) { + // + // Do nothing for UEFI OPEN/CLOSE Action + // + return EFI_SUCCESS; + } + if ((Value == NULL) || (ActionRequest == NULL)) { return EFI_INVALID_PARAMETER; } diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c b/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c index 2940647a23..6965615df3 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c @@ -122,6 +122,13 @@ DeviceManagerCallback ( OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest ) { + if ((Action == EFI_BROWSER_ACTION_FORM_OPEN) || (Action == EFI_BROWSER_ACTION_FORM_CLOSE)) { + // + // Do nothing for UEFI OPEN/CLOSE Action + // + return EFI_SUCCESS; + } + if ((Value == NULL) || (ActionRequest == NULL)) { return EFI_INVALID_PARAMETER; } @@ -609,6 +616,13 @@ DriverHealthCallback ( OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest ) { + if ((Action == EFI_BROWSER_ACTION_FORM_OPEN) || (Action == EFI_BROWSER_ACTION_FORM_CLOSE)) { + // + // Do nothing for UEFI OPEN/CLOSE Action + // + return EFI_SUCCESS; + } + if ((Value == NULL) || (ActionRequest == NULL)) { return EFI_INVALID_PARAMETER; } diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c b/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c index 93de4ddb3d..807526cb58 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c @@ -1,7 +1,7 @@ /** @file FrontPage routines to handle the callbacks and browser calls -Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -173,6 +173,13 @@ FrontPageCallback ( CHAR8 *PlatformSupportedLanguages; CHAR8 *BestLanguage; + if ((Action == EFI_BROWSER_ACTION_FORM_OPEN) || (Action == EFI_BROWSER_ACTION_FORM_CLOSE)) { + // + // Do nothing for UEFI OPEN/CLOSE Action + // + return EFI_SUCCESS; + } + if ((Value == NULL) || (ActionRequest == NULL)) { return EFI_INVALID_PARAMETER; } -- 2.39.2