]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/DxeReportStatusCodeLib/ReportStatusCodeLib.c
Add PI1.2.1 SAP2 support and UEFI231B mantis 896
[mirror_edk2.git] / MdeModulePkg / Library / DxeReportStatusCodeLib / ReportStatusCodeLib.c
index 70b40b9c8a37d5edc45eaa395df390b1f48c89e4..ce843cc47f46129d2d897577db8810dd5309ea75 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Report Status Code Library for DXE Phase.\r
 \r
-  Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -26,7 +26,7 @@
 #include <Guid/StatusCodeDataTypeDebug.h>\r
 \r
 //\r
-// Define the maximum extended data size that is supported when a status code is \r
+// Define the maximum extended data size that is supported when a status code is\r
 // reported at TPL_HIGH_LEVEL.\r
 //\r
 #define MAX_EXTENDED_DATA_SIZE  0x200\r
@@ -491,7 +491,7 @@ ReportStatusCodeEx (
   EFI_STATUS            Status;\r
   EFI_STATUS_CODE_DATA  *StatusCodeData;\r
   EFI_TPL               Tpl;\r
-  UINT64                Buffer[MAX_EXTENDED_DATA_SIZE / sizeof (UINT64)];\r
+  UINT64                Buffer[(MAX_EXTENDED_DATA_SIZE / sizeof (UINT64)) + 1];\r
 \r
   ASSERT (!((ExtendedData == NULL) && (ExtendedDataSize != 0)));\r
   ASSERT (!((ExtendedData != NULL) && (ExtendedDataSize == 0)));\r
@@ -521,9 +521,9 @@ ReportStatusCodeEx (
     if (ExtendedDataSize > (MAX_EXTENDED_DATA_SIZE - sizeof (EFI_STATUS_CODE_DATA))) {\r
       //\r
       // The local variable Buffer not large enough to hold the extended data associated\r
-      // with the status code being  reported.\r
+      // with the status code being reported.\r
       //\r
-      ASSERT (FALSE);\r
+      DEBUG ((EFI_D_ERROR, "Status code extended data is too large to be reported!\n"));\r
       return EFI_OUT_OF_RESOURCES;\r
     }\r
     StatusCodeData = (EFI_STATUS_CODE_DATA  *)Buffer;\r