]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c
MdeModulePkg/DxeCorePerfLib: Add status check instead of ASSERT
[mirror_edk2.git] / MdeModulePkg / Library / DxeCorePerformanceLib / DxeCorePerformanceLib.c
index 9b3224ef6faf5917e55e1fbbfb7e59dc2a61766d..71d624fc9ce90e9f8f49158117befdae0417436d 100644 (file)
@@ -283,9 +283,8 @@ AllocateBootPerformanceTable (
         SmmCommData->Function       = SMM_FPDT_FUNCTION_GET_BOOT_RECORD_SIZE;\r
         SmmCommData->BootRecordData = NULL;\r
         Status = Communication->Communicate (Communication, SmmBootRecordCommBuffer, &CommSize);\r
-        ASSERT_EFI_ERROR (Status);\r
 \r
-        if (!EFI_ERROR (SmmCommData->ReturnStatus) && SmmCommData->BootRecordSize != 0) {\r
+        if (!EFI_ERROR (Status) && !EFI_ERROR (SmmCommData->ReturnStatus) && SmmCommData->BootRecordSize != 0) {\r
           //\r
           // Get all boot records\r
           //\r
@@ -317,7 +316,7 @@ AllocateBootPerformanceTable (
   // Boot Performance table includes BasicBoot record, and one or more appended Boot Records.\r
   //\r
   BootPerformanceDataSize = sizeof (BOOT_PERFORMANCE_TABLE) + mPerformanceLength + PcdGet32 (PcdExtFpdtBootRecordPadSize);\r
-  if (SmmCommData != NULL) {\r
+  if (SmmCommData != NULL && SmmBootRecordData != NULL) {\r
     BootPerformanceDataSize += SmmBootRecordDataSize;\r
   }\r
 \r