summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c6
-rw-r--r--IntelFrameworkModulePkg/Universal/StatusCode/Pei/SerialStatusCodeWorker.c16
-rw-r--r--IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/SerialStatusCodeWorker.c16
3 files changed, 19 insertions, 19 deletions
diff --git a/IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c b/IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c
index fd77f7f904..8000df7e77 100644
--- a/IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c
+++ b/IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c
@@ -78,12 +78,12 @@ DebugPrint (
//
// If the TotalSize is larger than the maximum record size, then ASSERT()
//
- ASSERT (TotalSize <= EFI_STATUS_CODE_DATA_MAX_SIZE);
+ ASSERT (TotalSize <= sizeof (Buffer));
//
// If the TotalSize is larger than the maximum record size, then return
//
- if (TotalSize > EFI_STATUS_CODE_DATA_MAX_SIZE) {
+ if (TotalSize > sizeof (Buffer)) {
return;
}
@@ -259,7 +259,7 @@ DebugAssert (
FileNameLength = AsciiStrLen (FileName);
DescriptionLength = AsciiStrLen (Description);
TotalSize = sizeof (EFI_DEBUG_ASSERT_DATA) + FileNameLength + 1 + DescriptionLength + 1;
- if (TotalSize <= EFI_STATUS_CODE_DATA_MAX_SIZE) {
+ if (TotalSize <= sizeof (Buffer)) {
//
// Fill in EFI_DEBUG_ASSERT_DATA
//
diff --git a/IntelFrameworkModulePkg/Universal/StatusCode/Pei/SerialStatusCodeWorker.c b/IntelFrameworkModulePkg/Universal/StatusCode/Pei/SerialStatusCodeWorker.c
index 00aa41cb21..1b409310cf 100644
--- a/IntelFrameworkModulePkg/Universal/StatusCode/Pei/SerialStatusCodeWorker.c
+++ b/IntelFrameworkModulePkg/Universal/StatusCode/Pei/SerialStatusCodeWorker.c
@@ -62,7 +62,7 @@ SerialStatusCodeReportWorker (
//
CharCount = AsciiSPrint (
Buffer,
- EFI_STATUS_CODE_DATA_MAX_SIZE,
+ sizeof (Buffer),
"\n\rPEI_ASSERT!: %a (%d): %a\n\r",
Filename,
LineNumber,
@@ -75,7 +75,7 @@ SerialStatusCodeReportWorker (
//
CharCount = AsciiBSPrint (
Buffer,
- EFI_STATUS_CODE_DATA_MAX_SIZE,
+ sizeof (Buffer),
Format,
Marker
);
@@ -85,7 +85,7 @@ SerialStatusCodeReportWorker (
//
CharCount = AsciiSPrint (
Buffer,
- EFI_STATUS_CODE_DATA_MAX_SIZE,
+ sizeof (Buffer),
"ERROR: C%x:V%x I%x",
CodeType,
Value,
@@ -95,7 +95,7 @@ SerialStatusCodeReportWorker (
if (CallerId != NULL) {
CharCount += AsciiSPrint (
&Buffer[CharCount - 1],
- (EFI_STATUS_CODE_DATA_MAX_SIZE - (sizeof (Buffer[0]) * CharCount)),
+ (sizeof (Buffer) - (sizeof (Buffer[0]) * CharCount)),
" %g",
CallerId
);
@@ -104,7 +104,7 @@ SerialStatusCodeReportWorker (
if (Data != NULL) {
CharCount += AsciiSPrint (
&Buffer[CharCount - 1],
- (EFI_STATUS_CODE_DATA_MAX_SIZE - (sizeof (Buffer[0]) * CharCount)),
+ (sizeof (Buffer) - (sizeof (Buffer[0]) * CharCount)),
" %x",
Data
);
@@ -112,7 +112,7 @@ SerialStatusCodeReportWorker (
CharCount += AsciiSPrint (
&Buffer[CharCount - 1],
- (EFI_STATUS_CODE_DATA_MAX_SIZE - (sizeof (Buffer[0]) * CharCount)),
+ (sizeof (Buffer) - (sizeof (Buffer[0]) * CharCount)),
"\n\r"
);
} else if ((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) {
@@ -121,7 +121,7 @@ SerialStatusCodeReportWorker (
//
CharCount = AsciiSPrint (
Buffer,
- EFI_STATUS_CODE_DATA_MAX_SIZE,
+ sizeof (Buffer),
"PROGRESS CODE: V%x I%x\n\r",
Value,
Instance
@@ -132,7 +132,7 @@ SerialStatusCodeReportWorker (
//
CharCount = AsciiSPrint (
Buffer,
- EFI_STATUS_CODE_DATA_MAX_SIZE,
+ sizeof (Buffer),
"Undefined: C%x:V%x I%x\n\r",
CodeType,
Value,
diff --git a/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/SerialStatusCodeWorker.c b/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/SerialStatusCodeWorker.c
index cf5d48d665..1d5f53e479 100644
--- a/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/SerialStatusCodeWorker.c
+++ b/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/SerialStatusCodeWorker.c
@@ -96,7 +96,7 @@ SerialStatusCodeReportWorker (
//
CharCount = AsciiSPrint (
Buffer,
- EFI_STATUS_CODE_DATA_MAX_SIZE,
+ sizeof (Buffer),
"\n\rDXE_ASSERT!: %a (%d): %a\n\r",
Filename,
LineNumber,
@@ -109,7 +109,7 @@ SerialStatusCodeReportWorker (
//
CharCount = AsciiBSPrint (
Buffer,
- EFI_STATUS_CODE_DATA_MAX_SIZE,
+ sizeof (Buffer),
Format,
Marker
);
@@ -119,7 +119,7 @@ SerialStatusCodeReportWorker (
//
CharCount = AsciiSPrint (
Buffer,
- EFI_STATUS_CODE_DATA_MAX_SIZE,
+ sizeof (Buffer),
"ERROR: C%x:V%x I%x",
CodeType,
Value,
@@ -129,7 +129,7 @@ SerialStatusCodeReportWorker (
if (CallerId != NULL) {
CharCount += AsciiSPrint (
&Buffer[CharCount - 1],
- (EFI_STATUS_CODE_DATA_MAX_SIZE - (sizeof (Buffer[0]) * CharCount)),
+ (sizeof (Buffer) - (sizeof (Buffer[0]) * CharCount)),
" %g",
CallerId
);
@@ -138,7 +138,7 @@ SerialStatusCodeReportWorker (
if (Data != NULL) {
CharCount += AsciiSPrint (
&Buffer[CharCount - 1],
- (EFI_STATUS_CODE_DATA_MAX_SIZE - (sizeof (Buffer[0]) * CharCount)),
+ (sizeof (Buffer) - (sizeof (Buffer[0]) * CharCount)),
" %x",
Data
);
@@ -146,7 +146,7 @@ SerialStatusCodeReportWorker (
CharCount += AsciiSPrint (
&Buffer[CharCount - 1],
- (EFI_STATUS_CODE_DATA_MAX_SIZE - (sizeof (Buffer[0]) * CharCount)),
+ (sizeof (Buffer) - (sizeof (Buffer[0]) * CharCount)),
"\n\r"
);
} else if ((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) {
@@ -155,7 +155,7 @@ SerialStatusCodeReportWorker (
//
CharCount = AsciiSPrint (
Buffer,
- EFI_STATUS_CODE_DATA_MAX_SIZE,
+ sizeof (Buffer),
"PROGRESS CODE: V%x I%x\n\r",
Value,
Instance
@@ -166,7 +166,7 @@ SerialStatusCodeReportWorker (
//
CharCount = AsciiSPrint (
Buffer,
- EFI_STATUS_CODE_DATA_MAX_SIZE,
+ sizeof (Buffer),
"Undefined: C%x:V%x I%x\n\r",
CodeType,
Value,