diff options
author | lzeng14 <lzeng14@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-06-12 04:46:33 +0000 |
---|---|---|
committer | lzeng14 <lzeng14@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-06-12 04:46:33 +0000 |
commit | e5c1acc536ef394d4edca82093f1373889891a9f (patch) | |
tree | f317101c77ad8a714e3c2b1e64bfdedb1a85431a /MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib | |
parent | 3347d410cc16429118a39f354f985bf2ac009007 (diff) | |
download | edk2-platforms-e5c1acc536ef394d4edca82093f1373889891a9f.tar.xz |
To be consistent with PeiReportStatusCodeLib and DxeReportStatusCode, use MAX_EXTENDED_DATA_SIZE (0x200) as the local max buffer size in RuntimeDxeReportStatusCodeLib.
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
Diffstat (limited to 'MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib')
-rw-r--r-- | MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/ReportStatusCodeLib.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/ReportStatusCodeLib.c b/MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/ReportStatusCodeLib.c index f6b7ee756b..e533af3d33 100644 --- a/MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/ReportStatusCodeLib.c +++ b/MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/ReportStatusCodeLib.c @@ -1,7 +1,7 @@ /** @file
API implementation for instance of Report Status Code Library.
- Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -27,6 +27,12 @@ #include <Guid/StatusCodeDataTypeDebug.h>
#include <Guid/EventGroup.h>
+
+//
+// Define the maximum extended data size that is supported when a status code is reported.
+//
+#define MAX_EXTENDED_DATA_SIZE 0x200
+
EFI_STATUS_CODE_PROTOCOL *mReportStatusCodeLibStatusCodeProtocol = NULL;
EFI_EVENT mReportStatusCodeLibVirtualAddressChangeEvent;
EFI_EVENT mReportStatusCodeLibExitBootServicesEvent;
@@ -621,13 +627,13 @@ ReportStatusCodeEx ( {
EFI_STATUS Status;
EFI_STATUS_CODE_DATA *StatusCodeData;
- UINT8 StatusCodeBuffer[EFI_STATUS_CODE_DATA_MAX_SIZE];
+ UINT64 StatusCodeBuffer[(MAX_EXTENDED_DATA_SIZE / sizeof (UINT64)) + 1];
ASSERT (!((ExtendedData == NULL) && (ExtendedDataSize != 0)));
ASSERT (!((ExtendedData != NULL) && (ExtendedDataSize == 0)));
if (mHaveExitedBootServices) {
- if (sizeof (EFI_STATUS_CODE_DATA) + ExtendedDataSize > EFI_STATUS_CODE_DATA_MAX_SIZE) {
+ if (sizeof (EFI_STATUS_CODE_DATA) + ExtendedDataSize > MAX_EXTENDED_DATA_SIZE) {
return EFI_OUT_OF_RESOURCES;
}
StatusCodeData = (EFI_STATUS_CODE_DATA *) StatusCodeBuffer;
|