Remove ASSERT() if ReadOnlyVariable2 PPI is not present. Instead, skip variable...
authormdkinney <mdkinney@de2fecce-e211-0410-80a6-f3fac2684e05>
Thu, 29 May 2008 23:09:04 +0000 (23:09 +0000)
committermdkinney <mdkinney@de2fecce-e211-0410-80a6-f3fac2684e05>
Thu, 29 May 2008 23:09:04 +0000 (23:09 +0000)
git-svn-id: https://edk2.tianocore.org/svn/edk2/trunk@5312 de2fecce-e211-0410-80a6-f3fac2684e05

edk2/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c

index 914f457..3988d9c 100644 (file)
@@ -276,27 +276,26 @@ DxeLoadCore (
              NULL,\r
              (VOID **)&Variable\r
              );\r
-  ASSERT_EFI_ERROR (Status);\r
-\r
-  DataSize = sizeof (MemoryData);\r
-  Status = Variable->GetVariable ( \r
-                       Variable, \r
-                       EFI_MEMORY_TYPE_INFORMATION_VARIABLE_NAME,\r
-                       &gEfiMemoryTypeInformationGuid,\r
-                       NULL,\r
-                       &DataSize,\r
-                       &MemoryData\r
-                       );\r
-\r
   if (!EFI_ERROR (Status)) {\r
-    //\r
-    // Build the GUID'd HOB for DXE\r
-    //\r
-    BuildGuidDataHob (\r
-      &gEfiMemoryTypeInformationGuid,\r
-      MemoryData,\r
-      DataSize\r
-      );\r
+    DataSize = sizeof (MemoryData);\r
+    Status = Variable->GetVariable ( \r
+                         Variable, \r
+                         EFI_MEMORY_TYPE_INFORMATION_VARIABLE_NAME,\r
+                         &gEfiMemoryTypeInformationGuid,\r
+                         NULL,\r
+                         &DataSize,\r
+                         &MemoryData\r
+                         );\r
+    if (!EFI_ERROR (Status)) {\r
+      //\r
+      // Build the GUID'd HOB for DXE\r
+      //\r
+      BuildGuidDataHob (\r
+        &gEfiMemoryTypeInformationGuid,\r
+        MemoryData,\r
+        DataSize\r
+        );\r
+    }\r
   }\r
 \r
   //\r