Retire the duplicate StatusCode PCD:
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseEfiSerial, PcdStatusCodeUseHardSerial, PcdStatusCodeUseRuntimeMemory, PcdStatusCodeReplayInSerial, PcdStatusCodeReplayInRuntimeMemory, PcdStatusCodeReplayInDataHub, PcdStatusCodeReplayInOEM, PcdStatusCodeRuntimeMemorySize git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8566 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -14,33 +14,6 @@
|
||||
|
||||
#include "StatusCodeRuntimeDxe.h"
|
||||
|
||||
EFI_SERIAL_IO_PROTOCOL *mSerialIoProtocol;
|
||||
|
||||
/**
|
||||
Locates Serial I/O Protocol as initialization for serial status code worker.
|
||||
|
||||
@retval EFI_SUCCESS Serial I/O Protocol is successfully located.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EfiSerialStatusCodeInitializeWorker (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
||||
Status = gBS->LocateProtocol (
|
||||
&gEfiSerialIoProtocolGuid,
|
||||
NULL,
|
||||
(VOID **) &mSerialIoProtocol
|
||||
);
|
||||
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Convert status code value and extended data to readable ASCII string, send string to serial I/O device.
|
||||
|
||||
@ -78,15 +51,6 @@ SerialStatusCodeReportWorker (
|
||||
UINTN CharCount;
|
||||
BASE_LIST Marker;
|
||||
|
||||
if (FeaturePcdGet (PcdStatusCodeUseEfiSerial)) {
|
||||
if (EfiAtRuntime ()) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
if (EfiGetCurrentTpl () > TPL_CALLBACK ) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
Buffer[0] = '\0';
|
||||
|
||||
if (Data != NULL &&
|
||||
@ -174,20 +138,10 @@ SerialStatusCodeReportWorker (
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
if (FeaturePcdGet (PcdStatusCodeUseHardSerial)) {
|
||||
//
|
||||
// Call SerialPort Lib function to do print.
|
||||
//
|
||||
SerialPortWrite ((UINT8 *) Buffer, CharCount);
|
||||
}
|
||||
if (FeaturePcdGet (PcdStatusCodeUseEfiSerial)) {
|
||||
mSerialIoProtocol->Write (
|
||||
mSerialIoProtocol,
|
||||
&CharCount,
|
||||
Buffer
|
||||
);
|
||||
}
|
||||
//
|
||||
// Call SerialPort Lib function to do print.
|
||||
//
|
||||
SerialPortWrite ((UINT8 *) Buffer, CharCount);
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
Reference in New Issue
Block a user