[edk2] [Patch][edk2-platforms/devel-MinnowBoard3] Fix setup assert issue

Guo, Mang posted 1 patch 7 years ago
Failed in applying to current master (apply log)
.../PlatformSettings/PlatformSetupDxe/SetupInfoRecords.c  | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
[edk2] [Patch][edk2-platforms/devel-MinnowBoard3] Fix setup assert issue
Posted by Guo, Mang 7 years ago
Debug BIOS will assert if change setup and save.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Guo Mang <mang.guo@intel.com>
---
 .../PlatformSettings/PlatformSetupDxe/SetupInfoRecords.c  | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/SetupInfoRecords.c b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/SetupInfoRecords.c
index d504995..768893e 100644
--- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/SetupInfoRecords.c
+++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/SetupInfoRecords.c
@@ -1808,7 +1808,6 @@ CheckSystemConfigSave (
   SEC_INFOMATION          SeCInfo;
   UINT8                   SecureBootCfg;
   UINTN                   DataSize;
-  BOOLEAN                 SecureBootNotFound;
 
   Status = gBS->LocateProtocol (
                   &gEfiSeCOperationProtocolGuid,
@@ -1831,7 +1830,6 @@ CheckSystemConfigSave (
   // Secure Boot configuration changes
   //
   DataSize = sizeof (SecureBootCfg);
-  SecureBootNotFound = FALSE;
   Status = gRT->GetVariable (
                   EFI_SECURE_BOOT_ENABLE_NAME,
                   &gEfiSecureBootEnableDisableGuid,
@@ -1841,18 +1839,7 @@ CheckSystemConfigSave (
                   );
 
   if (EFI_ERROR (Status)) {
-    SecureBootNotFound = TRUE;
-  }
-
-  if (SecureBootNotFound) {
-    Status = gRT->GetVariable (
-                    EFI_SECURE_BOOT_ENABLE_NAME,
-                    &gEfiSecureBootEnableDisableGuid,
-                    NULL,
-                    &DataSize,
-                    &SecureBootCfg
-                    );
-    ASSERT_EFI_ERROR (Status);
+    SecureBootCfg = 0;
   }
 
   if ((SecureBootCfg) != SystemConfigPtr->SecureBoot) {
-- 
2.10.1.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch][edk2-platforms/devel-MinnowBoard3] Fix setup assert issue
Posted by Wei, David 7 years ago
Reviewed-by: zwei4 <david.wei@intel.com>

Thanks,
David  Wei                                 

-----Original Message-----
From: Guo, Mang 
Sent: Tuesday, April 18, 2017 12:57 PM
To: edk2-devel@lists.01.org
Cc: Wei, David <david.wei@intel.com>; Lu, ShifeiX A <shifeix.a.lu@intel.com>
Subject: [Patch][edk2-platforms/devel-MinnowBoard3] Fix setup assert issue

Debug BIOS will assert if change setup and save.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Guo Mang <mang.guo@intel.com>
---
 .../PlatformSettings/PlatformSetupDxe/SetupInfoRecords.c  | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/SetupInfoRecords.c b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/SetupInfoRecords.c
index d504995..768893e 100644
--- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/SetupInfoRecords.c
+++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/SetupInfoRecords.c
@@ -1808,7 +1808,6 @@ CheckSystemConfigSave (
   SEC_INFOMATION          SeCInfo;
   UINT8                   SecureBootCfg;
   UINTN                   DataSize;
-  BOOLEAN                 SecureBootNotFound;
 
   Status = gBS->LocateProtocol (
                   &gEfiSeCOperationProtocolGuid,
@@ -1831,7 +1830,6 @@ CheckSystemConfigSave (
   // Secure Boot configuration changes
   //
   DataSize = sizeof (SecureBootCfg);
-  SecureBootNotFound = FALSE;
   Status = gRT->GetVariable (
                   EFI_SECURE_BOOT_ENABLE_NAME,
                   &gEfiSecureBootEnableDisableGuid,
@@ -1841,18 +1839,7 @@ CheckSystemConfigSave (
                   );
 
   if (EFI_ERROR (Status)) {
-    SecureBootNotFound = TRUE;
-  }
-
-  if (SecureBootNotFound) {
-    Status = gRT->GetVariable (
-                    EFI_SECURE_BOOT_ENABLE_NAME,
-                    &gEfiSecureBootEnableDisableGuid,
-                    NULL,
-                    &DataSize,
-                    &SecureBootCfg
-                    );
-    ASSERT_EFI_ERROR (Status);
+    SecureBootCfg = 0;
   }
 
   if ((SecureBootCfg) != SystemConfigPtr->SecureBoot) {
-- 
2.10.1.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel