From ca9938b842347769618f84a2d53af63d6edf48e6 Mon Sep 17 00:00:00 2001 From: mdkinney Date: Sat, 30 May 2009 23:53:35 +0000 Subject: This checkin addresses the compatibility issue of passing arguments of type VA_LIST between components. The type VA_LIST is mapped onto the compiler specific implementation of varargs. As a result, modules build with different compilers may not use the same VA_LIST structure. The solution to this issue is to define a new type called BASE_LIST that is a compiler independent method of passing varargs between modules. 1) Update all implementations of ReportStatusCodeExtractDebugInfo() to use an argument of type BASE_LIST instead of VA_LIST. 2) Update the implementation of DebugPrint() in PeiDxeDebugLibReportStatusCode to convert a VA_LIST to a BASE_LIST before passing the data to report status code. 3) Update status code listeners to use the BASE_LIST based APIs in the PrintLib instead of the VA_LIST based APIs, since ReportStatusCodeExtractDebugInfo() was updated to return a parameter of type BASE_LIST. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8406 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Universal/StatusCode/Pei/SerialStatusCodeWorker.c | 4 ++-- .../Universal/StatusCode/RuntimeDxe/DataHubStatusCodeWorker.c | 4 ++-- .../Universal/StatusCode/RuntimeDxe/SerialStatusCodeWorker.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'IntelFrameworkModulePkg/Universal/StatusCode') diff --git a/IntelFrameworkModulePkg/Universal/StatusCode/Pei/SerialStatusCodeWorker.c b/IntelFrameworkModulePkg/Universal/StatusCode/Pei/SerialStatusCodeWorker.c index 1784f4ebc5..00aa41cb21 100644 --- a/IntelFrameworkModulePkg/Universal/StatusCode/Pei/SerialStatusCodeWorker.c +++ b/IntelFrameworkModulePkg/Universal/StatusCode/Pei/SerialStatusCodeWorker.c @@ -51,7 +51,7 @@ SerialStatusCodeReportWorker ( UINT32 ErrorLevel; UINT32 LineNumber; UINTN CharCount; - VA_LIST Marker; + BASE_LIST Marker; Buffer[0] = '\0'; @@ -73,7 +73,7 @@ SerialStatusCodeReportWorker ( // // Print DEBUG() information into output buffer. // - CharCount = AsciiVSPrint ( + CharCount = AsciiBSPrint ( Buffer, EFI_STATUS_CODE_DATA_MAX_SIZE, Format, diff --git a/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/DataHubStatusCodeWorker.c b/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/DataHubStatusCodeWorker.c index 743f6185a2..6b765ccf16 100644 --- a/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/DataHubStatusCodeWorker.c +++ b/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/DataHubStatusCodeWorker.c @@ -186,7 +186,7 @@ DataHubStatusCodeReportWorker ( { DATA_HUB_STATUS_CODE_DATA_RECORD *Record; UINT32 ErrorLevel; - VA_LIST Marker; + BASE_LIST Marker; CHAR8 *Format; UINTN CharCount; @@ -226,7 +226,7 @@ DataHubStatusCodeReportWorker ( if (Data != NULL) { if (ReportStatusCodeExtractDebugInfo (Data, &ErrorLevel, &Marker, &Format)) { - CharCount = UnicodeVSPrintAsciiFormat ( + CharCount = UnicodeBSPrintAsciiFormat ( (CHAR16 *) (Record + 1), EFI_STATUS_CODE_DATA_MAX_SIZE, Format, diff --git a/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/SerialStatusCodeWorker.c b/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/SerialStatusCodeWorker.c index 710a808ada..cf5d48d665 100644 --- a/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/SerialStatusCodeWorker.c +++ b/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/SerialStatusCodeWorker.c @@ -76,7 +76,7 @@ SerialStatusCodeReportWorker ( UINT32 ErrorLevel; UINT32 LineNumber; UINTN CharCount; - VA_LIST Marker; + BASE_LIST Marker; if (FeaturePcdGet (PcdStatusCodeUseEfiSerial)) { if (EfiAtRuntime ()) { @@ -107,7 +107,7 @@ SerialStatusCodeReportWorker ( // // Print DEBUG() information into output buffer. // - CharCount = AsciiVSPrint ( + CharCount = AsciiBSPrint ( Buffer, EFI_STATUS_CODE_DATA_MAX_SIZE, Format, -- cgit v1.2.3