From c93bcb7ef453337f9daae42c6b27492c4f6555ed Mon Sep 17 00:00:00 2001 From: Eric Dong Date: Thu, 9 Jan 2014 05:59:53 +0000 Subject: Return to BMM page if parse the file info failed. Signed-off-by: Eric Dong Reviewed-by: Liming Gao Reviewed-by: Siyuan Fu git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15067 6f19259b-4bc3-4df7-8a09-765794883524 --- .../SecureBootConfigDxe/SecureBootConfigFileExplorer.c | 4 ++-- .../SecureBootConfigDxe/SecureBootConfigImpl.c | 13 ++++++++++--- .../SecureBootConfigDxe/SecureBootConfigNvData.h | 6 +++--- 3 files changed, 15 insertions(+), 8 deletions(-) (limited to 'SecurityPkg/VariableAuthenticated') diff --git a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigFileExplorer.c b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigFileExplorer.c index 548d95df53..310b1ecd4e 100644 --- a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigFileExplorer.c +++ b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigFileExplorer.c @@ -1,7 +1,7 @@ /** @file Internal file explorer functions for SecureBoot configuration module. -Copyright (c) 2012 - 2013, Intel Corporation. All rights reserved.
+Copyright (c) 2012 - 2014, 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 @@ -1069,7 +1069,7 @@ UpdateFileExplorePage ( NewMenuEntry->DisplayStringToken, STRING_TOKEN (STR_NULL), EFI_IFR_FLAG_CALLBACK, - (UINT16) (FILE_OPTION_OFFSET + Index) + (UINT16) (FILE_OPTION_GOTO_OFFSET + Index) ); } } diff --git a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c index 0911630946..8b9a8e26a3 100644 --- a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c +++ b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c @@ -1,7 +1,7 @@ /** @file HII Config Access protocol implementation of SecureBoot configuration module. -Copyright (c) 2011 - 2013, Intel Corporation. All rights reserved.
+Copyright (c) 2011 - 2014, 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 @@ -2714,7 +2714,7 @@ SecureBootCallback ( break; default: - if (QuestionId >= FILE_OPTION_OFFSET) { + if (QuestionId >= FILE_OPTION_GOTO_OFFSET) { UpdateFileExplorer (Private, QuestionId); } else if ((QuestionId >= OPTION_DEL_KEK_QUESTION_ID) && (QuestionId < (OPTION_DEL_KEK_QUESTION_ID + OPTION_CONFIG_RANGE))) { @@ -2821,7 +2821,14 @@ SecureBootCallback ( if (SetupMode != NULL) { FreePool (SetupMode); } - break; + break; + default: + if (QuestionId >= FILE_OPTION_OFFSET && QuestionId < FILE_OPTION_GOTO_OFFSET) { + if (UpdateFileExplorer (Private, QuestionId)) { + *ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT; + } + } + break; } } else if (Action == EFI_BROWSER_ACTION_DEFAULT_STANDARD) { if (QuestionId == KEY_HIDE_SECURE_BOOT) { diff --git a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigNvData.h b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigNvData.h index c15869a625..7d68b3981f 100644 --- a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigNvData.h +++ b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigNvData.h @@ -1,7 +1,7 @@ /** @file Header file for NV data structure definition. -Copyright (c) 2011 - 2013, Intel Corporation. All rights reserved.
+Copyright (c) 2011 - 2014, 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 @@ -95,9 +95,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // #define OPTION_DEL_DBX_QUESTION_ID 0x4000 - +#define FILE_OPTION_GOTO_OFFSET 0xC000 #define FILE_OPTION_OFFSET 0x8000 -#define FILE_OPTION_MASK 0x7FFF +#define FILE_OPTION_MASK 0x3FFF #define SECURE_BOOT_GUID_SIZE 36 #define SECURE_BOOT_GUID_STORAGE_SIZE 37 -- cgit v1.2.3