]> git.proxmox.com Git - mirror_edk2.git/commitdiff
To be consistent with PeiReportStatusCodeLib and DxeReportStatusCode, use MAX_EXTENDE...
authorlzeng14 <lzeng14@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 12 Jun 2012 04:46:33 +0000 (04:46 +0000)
committerlzeng14 <lzeng14@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 12 Jun 2012 04:46:33 +0000 (04:46 +0000)
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13444 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/ReportStatusCodeLib.c

index f6b7ee756bc6f6851e229b0e010de85eb362b23f..e533af3d338cca32aa0cfbe43e1b5a23b87561f8 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   API implementation for instance of Report Status Code Library.\r
 \r
-  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2012, 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
 #include <Guid/StatusCodeDataTypeDebug.h>\r
 #include <Guid/EventGroup.h>\r
 \r
+\r
+//\r
+// Define the maximum extended data size that is supported when a status code is reported.\r
+//\r
+#define MAX_EXTENDED_DATA_SIZE  0x200\r
+\r
 EFI_STATUS_CODE_PROTOCOL  *mReportStatusCodeLibStatusCodeProtocol = NULL;\r
 EFI_EVENT                 mReportStatusCodeLibVirtualAddressChangeEvent;\r
 EFI_EVENT                 mReportStatusCodeLibExitBootServicesEvent;\r
@@ -621,13 +627,13 @@ ReportStatusCodeEx (
 {\r
   EFI_STATUS            Status;\r
   EFI_STATUS_CODE_DATA  *StatusCodeData;\r
-  UINT8                 StatusCodeBuffer[EFI_STATUS_CODE_DATA_MAX_SIZE];\r
+  UINT64                StatusCodeBuffer[(MAX_EXTENDED_DATA_SIZE / sizeof (UINT64)) + 1];\r
 \r
   ASSERT (!((ExtendedData == NULL) && (ExtendedDataSize != 0)));\r
   ASSERT (!((ExtendedData != NULL) && (ExtendedDataSize == 0)));\r
 \r
   if (mHaveExitedBootServices) {\r
-    if (sizeof (EFI_STATUS_CODE_DATA) + ExtendedDataSize > EFI_STATUS_CODE_DATA_MAX_SIZE) {\r
+    if (sizeof (EFI_STATUS_CODE_DATA) + ExtendedDataSize > MAX_EXTENDED_DATA_SIZE) {\r
       return EFI_OUT_OF_RESOURCES;\r
     }\r
     StatusCodeData = (EFI_STATUS_CODE_DATA *) StatusCodeBuffer;\r