Revision: 15067
          http://sourceforge.net/p/edk2/code/15067
Author:   ydong10
Date:     2014-01-09 05:59:53 +0000 (Thu, 09 Jan 2014)
Log Message:
-----------
Return to BMM page if parse the file info failed.

Signed-off-by: Eric Dong <[email protected]>
Reviewed-by: Liming Gao <[email protected]>
Reviewed-by: Siyuan Fu <[email protected]>

Modified Paths:
--------------
    trunk/edk2/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.h
    trunk/edk2/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/FileExplorer.c
    
trunk/edk2/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigFileExplorer.c
    
trunk/edk2/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c
    
trunk/edk2/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigNvData.h

Modified: 
trunk/edk2/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.h
===================================================================
--- trunk/edk2/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.h   
2014-01-09 05:25:56 UTC (rev 15066)
+++ trunk/edk2/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.h   
2014-01-09 05:59:53 UTC (rev 15067)
@@ -1,7 +1,7 @@
 /** @file
   Header file for boot maintenance module.
 
-Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
 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
@@ -124,8 +124,9 @@
 #define FD_OPTION_OFFSET        0xC000
 #define HD_OPTION_OFFSET        0xB000
 #define CD_OPTION_OFFSET        0xA000
+#define FILE_OPTION_GOTO_OFFSET 0xC000
 #define FILE_OPTION_OFFSET      0x8000
-#define FILE_OPTION_MASK        0x7FFF
+#define FILE_OPTION_MASK        0x3FFF
 #define HANDLE_OPTION_OFFSET    0x7000
 #define CONSOLE_OPTION_OFFSET   0x6000
 #define TERMINAL_OPTION_OFFSET  0x5000

Modified: 
trunk/edk2/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/FileExplorer.c
===================================================================
--- 
trunk/edk2/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/FileExplorer.c    
    2014-01-09 05:25:56 UTC (rev 15066)
+++ 
trunk/edk2/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/FileExplorer.c    
    2014-01-09 05:59:53 UTC (rev 15067)
@@ -1,7 +1,7 @@
 /** @file
   File explorer related functions.
 
-Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
 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
@@ -75,7 +75,7 @@
         NewMenuEntry->DisplayStringToken,
         STRING_TOKEN (STR_NULL_STRING),
         EFI_IFR_FLAG_CALLBACK,
-        (UINT16) (FILE_OPTION_OFFSET + Index)
+        (UINT16) (FILE_OPTION_GOTO_OFFSET + Index)
         );
     }
   }
@@ -320,13 +320,23 @@
       // Exit File Explorer formset
       //
       *ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT;
+    } else if (QuestionId >= FILE_OPTION_OFFSET && QuestionId < 
FILE_OPTION_GOTO_OFFSET) {
+      //
+      // Update forms may return TRUE or FALSE, need to check here.
+      //
+      if (UpdateFileExplorer (Private, QuestionId)) {
+        *ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT;
+      }
     }
   } else if (Action == EFI_BROWSER_ACTION_CHANGING) {
     if (Value == NULL) {
       return EFI_INVALID_PARAMETER;
     }
     
-    if (QuestionId >= FILE_OPTION_OFFSET) {
+    if (QuestionId >= FILE_OPTION_GOTO_OFFSET) {
+      //
+      // function will always return FALSE, no need to check here.
+      //
       UpdateFileExplorer (Private, QuestionId);
     }
   }

Modified: 
trunk/edk2/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigFileExplorer.c
===================================================================
--- 
trunk/edk2/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigFileExplorer.c
     2014-01-09 05:25:56 UTC (rev 15066)
+++ 
trunk/edk2/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigFileExplorer.c
     2014-01-09 05:59:53 UTC (rev 15067)
@@ -1,7 +1,7 @@
 /** @file
   Internal file explorer functions for SecureBoot configuration module.
 
-Copyright (c) 2012 - 2013, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2012 - 2014, Intel Corporation. All rights reserved.<BR>
 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 @@
         NewMenuEntry->DisplayStringToken,
         STRING_TOKEN (STR_NULL),
         EFI_IFR_FLAG_CALLBACK,
-        (UINT16) (FILE_OPTION_OFFSET + Index)
+        (UINT16) (FILE_OPTION_GOTO_OFFSET + Index)
         );
     }
   }

Modified: 
trunk/edk2/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c
===================================================================
--- 
trunk/edk2/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c
     2014-01-09 05:25:56 UTC (rev 15066)
+++ 
trunk/edk2/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c
     2014-01-09 05:59:53 UTC (rev 15067)
@@ -1,7 +1,7 @@
 /** @file
   HII Config Access protocol implementation of SecureBoot configuration module.
 
-Copyright (c) 2011 - 2013, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
 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 @@
       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 @@
       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) {

Modified: 
trunk/edk2/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigNvData.h
===================================================================
--- 
trunk/edk2/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigNvData.h
   2014-01-09 05:25:56 UTC (rev 15066)
+++ 
trunk/edk2/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigNvData.h
   2014-01-09 05:59:53 UTC (rev 15067)
@@ -1,7 +1,7 @@
 /** @file
   Header file for NV data structure definition.
 
-Copyright (c) 2011 - 2013, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
 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 @@
 //
 #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

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to