summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/StatusCodeHandler
diff options
context:
space:
mode:
authorlzeng14 <lzeng14@6f19259b-4bc3-4df7-8a09-765794883524>2012-06-12 04:52:23 +0000
committerlzeng14 <lzeng14@6f19259b-4bc3-4df7-8a09-765794883524>2012-06-12 04:52:23 +0000
commit90eaa3c1e022e2b676da65cb41aa66136a18b4ea (patch)
tree057f78ad45a23c90785a89a24379b6103151f402 /MdeModulePkg/Universal/StatusCodeHandler
parente5c1acc536ef394d4edca82093f1373889891a9f (diff)
downloadedk2-90eaa3c1e022e2b676da65cb41aa66136a18b4ea.zip
edk2-90eaa3c1e022e2b676da65cb41aa66136a18b4ea.tar.gz
edk2-90eaa3c1e022e2b676da65cb41aa66136a18b4ea.tar.bz2
EFI_STATUS_CODE_DATA_MAX_SIZE is just for the maximum size of an EFI_DEBUG_INFO structure. Seemly, it is not suitable to be used in SerialStatusCodeHandler, so update SerialStatusCodeHandler to use MAX_DEBUG_MESSAGE_LENGTH (0x100) as the max printed string size to align with other DebugLib’s behavior.
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@13445 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/StatusCodeHandler')
-rw-r--r--MdeModulePkg/Universal/StatusCodeHandler/Pei/SerialStatusCodeWorker.c4
-rw-r--r--MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.h7
-rw-r--r--MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusCodeWorker.c4
-rw-r--r--MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.h7
-rw-r--r--MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWorker.c4
-rw-r--r--MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.h7
6 files changed, 24 insertions, 9 deletions
diff --git a/MdeModulePkg/Universal/StatusCodeHandler/Pei/SerialStatusCodeWorker.c b/MdeModulePkg/Universal/StatusCodeHandler/Pei/SerialStatusCodeWorker.c
index ba6befa..69da444 100644
--- a/MdeModulePkg/Universal/StatusCodeHandler/Pei/SerialStatusCodeWorker.c
+++ b/MdeModulePkg/Universal/StatusCodeHandler/Pei/SerialStatusCodeWorker.c
@@ -1,7 +1,7 @@
/** @file
Serial I/O status code reporting worker.
- 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
@@ -50,7 +50,7 @@ SerialStatusCodeReportWorker (
CHAR8 *Filename;
CHAR8 *Description;
CHAR8 *Format;
- CHAR8 Buffer[EFI_STATUS_CODE_DATA_MAX_SIZE];
+ CHAR8 Buffer[MAX_DEBUG_MESSAGE_LENGTH];
UINT32 ErrorLevel;
UINT32 LineNumber;
UINTN CharCount;
diff --git a/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.h b/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.h
index 68991b4..d243429 100644
--- a/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.h
+++ b/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.h
@@ -1,7 +1,7 @@
/** @file
Internal include file for Status Code Handler PEIM.
- Copyright (c) 2006 - 2010, 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
@@ -32,6 +32,11 @@
#include <Library/PeimEntryPoint.h>
#include <Library/BaseMemoryLib.h>
+//
+// Define the maximum message length
+//
+#define MAX_DEBUG_MESSAGE_LENGTH 0x100
+
/**
Convert status code value and extended data to readable ASCII string, send string to serial I/O device.
diff --git a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusCodeWorker.c b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusCodeWorker.c
index 19b67b0..a71704c 100644
--- a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusCodeWorker.c
+++ b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusCodeWorker.c
@@ -1,7 +1,7 @@
/** @file
Serial I/O status code reporting worker.
- 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
@@ -46,7 +46,7 @@ SerialStatusCodeReportWorker (
CHAR8 *Filename;
CHAR8 *Description;
CHAR8 *Format;
- CHAR8 Buffer[EFI_STATUS_CODE_DATA_MAX_SIZE];
+ CHAR8 Buffer[MAX_DEBUG_MESSAGE_LENGTH];
UINT32 ErrorLevel;
UINT32 LineNumber;
UINTN CharCount;
diff --git a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.h b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.h
index 510c5c6..2bf3412 100644
--- a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.h
+++ b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.h
@@ -1,7 +1,7 @@
/** @file
Internal include file for Status Code Handler Driver.
- Copyright (c) 2006 - 2010, 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
@@ -36,6 +36,11 @@
#include <Library/SerialPortLib.h>
//
+// Define the maximum message length
+//
+#define MAX_DEBUG_MESSAGE_LENGTH 0x100
+
+//
// Runtime memory status code worker definition
//
typedef struct {
diff --git a/MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWorker.c b/MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWorker.c
index 42f05f2..b5f2bef 100644
--- a/MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWorker.c
+++ b/MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWorker.c
@@ -1,7 +1,7 @@
/** @file
Serial I/O status code reporting worker.
- Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 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
@@ -46,7 +46,7 @@ SerialStatusCodeReportWorker (
CHAR8 *Filename;
CHAR8 *Description;
CHAR8 *Format;
- CHAR8 Buffer[EFI_STATUS_CODE_DATA_MAX_SIZE];
+ CHAR8 Buffer[MAX_DEBUG_MESSAGE_LENGTH];
UINT32 ErrorLevel;
UINT32 LineNumber;
UINTN CharCount;
diff --git a/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.h b/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.h
index 0dd0060..ee85a69 100644
--- a/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.h
+++ b/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.h
@@ -1,7 +1,7 @@
/** @file
Internal include file for Status Code Handler Driver.
- Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 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
@@ -33,6 +33,11 @@
#include <Library/BaseMemoryLib.h>
//
+// Define the maximum message length
+//
+#define MAX_DEBUG_MESSAGE_LENGTH 0x100
+
+//
// Runtime memory status code worker definition
//
typedef struct {