mirror of https://github.com/acidanthera/audk.git
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:
parent
b8b6faa059
commit
d2c315e686
|
@ -115,41 +115,53 @@
|
||||||
gEfiOEMBadgingProtocolGuid = { 0x170E13C0, 0xBF1B, 0x4218, { 0x87, 0x1D, 0x2A, 0xBD, 0xC6, 0xF8, 0x87, 0xBC }}
|
gEfiOEMBadgingProtocolGuid = { 0x170E13C0, 0xBF1B, 0x4218, { 0x87, 0x1D, 0x2A, 0xBD, 0xC6, 0xF8, 0x87, 0xBC }}
|
||||||
|
|
||||||
[PcdsFeatureFlag]
|
[PcdsFeatureFlag]
|
||||||
## if required, only one mask PCD to support all features to reduces PCD number.
|
## This PCD specifies whether StatusCode is reported to Serial port.
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE|BOOLEAN|0x00010022
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE|BOOLEAN|0x00010022
|
||||||
|
|
||||||
|
## This PCD specifies whether StatusCode is stored in memory.
|
||||||
|
# Pei Phase Memory is boot time memory. Dxe Phase memory is runtime memory.
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE|BOOLEAN|0x00010023
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE|BOOLEAN|0x00010023
|
||||||
|
|
||||||
|
## This PCD specifies whether StatusCode is reported to OEM device.
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseOEM|FALSE|BOOLEAN|0x00010024
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseOEM|FALSE|BOOLEAN|0x00010024
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseEfiSerial|FALSE|BOOLEAN|0x00010026
|
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseHardSerial|TRUE|BOOLEAN|0x00010027
|
## This PCD specifies whether StatusCode is loged into DataHub.
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseRuntimeMemory|FALSE|BOOLEAN|0x00010028
|
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseDataHub|FALSE|BOOLEAN|0x00010029
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseDataHub|FALSE|BOOLEAN|0x00010029
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeReplayInSerial|FALSE|BOOLEAN|0x0001002a
|
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeReplayInRuntimeMemory|FALSE|BOOLEAN|0x0001002b
|
## This PCD specifies whether Peiphase StatusCode is replayed in DxePhase.
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeReplayInDataHub|FALSE|BOOLEAN|0x0001002c
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeReplayIn|FALSE|BOOLEAN|0x0001002d
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeReplayInOEM|FALSE|BOOLEAN|0x0001002d
|
|
||||||
|
|
||||||
##
|
##
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPciIsaEnable|FALSE|BOOLEAN|0x00010039
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPciIsaEnable|FALSE|BOOLEAN|0x00010039
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPciVgaEnable|FALSE|BOOLEAN|0x0001003a
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPciVgaEnable|FALSE|BOOLEAN|0x0001003a
|
||||||
|
|
||||||
|
## This PCD specifies whether PciBus supports the hot plug device.
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPciBusHotplugDeviceSupport|TRUE|BOOLEAN|0x0001003d
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPciBusHotplugDeviceSupport|TRUE|BOOLEAN|0x0001003d
|
||||||
|
|
||||||
##
|
## ISA bus related PCD can be merged into one.
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdIsaBusSupportDma|TRUE|BOOLEAN|0x00010040
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdIsaBusSupportDma|TRUE|BOOLEAN|0x00010040
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdIsaBusOnlySupportSlaveDma|FALSE|BOOLEAN|0x00010041
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdIsaBusOnlySupportSlaveDma|FALSE|BOOLEAN|0x00010041
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdIsaBusSupportIsaMemory|TRUE|BOOLEAN|0x00010042
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdIsaBusSupportIsaMemory|TRUE|BOOLEAN|0x00010042
|
||||||
|
|
||||||
[PcdsFixedAtBuild]
|
[PcdsFixedAtBuild]
|
||||||
|
## PCD marks PCI support incompatible operations: AcpiResource, Read, Write, RegisterUpdate, AccessWidth.
|
||||||
|
# BIT0:AcpiResource, BIT1:Read, BIT2:Write, BIT3:RegisterUpdate, BIT4:AccessWidth
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPciIncompatibleDeviceSupportMask|0|UINT8|0x0001003f
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPciIncompatibleDeviceSupportMask|0|UINT8|0x0001003f
|
||||||
|
|
||||||
[PcdsFixedAtBuild,PcdsPatchableInModule,PcdsDynamic]
|
[PcdsFixedAtBuild,PcdsPatchableInModule,PcdsDynamic]
|
||||||
|
## PcdStatusCodeMemorySize is used when PcdStatusCodeUseMemory is set to true
|
||||||
|
# (PcdStatusCodeMemorySize * KBytes) is the total taken memory size.
|
||||||
|
# The default value in PeiPhase is 1 KBytes.
|
||||||
|
# The default value in DxePhase is 128 KBytes.
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1|UINT16|0x00010025
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1|UINT16|0x00010025
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeRuntimeMemorySize|128|UINT16|0x0001002e
|
|
||||||
|
|
||||||
[PcdsDynamic]
|
[PcdsDynamic]
|
||||||
|
## PCD is used to mark if the machine has complete one boot cycle before.
|
||||||
|
# After the complete boot, the variable BootState will be set to TRUE.
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdBootState|TRUE|BOOLEAN|0x0001002f
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdBootState|TRUE|BOOLEAN|0x0001002f
|
||||||
|
|
||||||
## Timeout value for displaying progressing bar in before boot OS.
|
## Timeout value for displaying progressing bar in before boot OS.
|
||||||
# According to UEFI 2.0 spec, it should treat the Timeout value as 0xffff.
|
# According to UEFI 2.0 spec, the default TimeOut should be 0xffff.
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPlatformBootTimeOut|0xffff|UINT16|0x40000001
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPlatformBootTimeOut|0xffff|UINT16|0x40000001
|
||||||
|
|
||||||
## Error level for hardware recorder. If value 0, platform does not support feature of hardware error record.
|
## Error level for hardware recorder. If value 0, platform does not support feature of hardware error record.
|
||||||
|
|
|
@ -132,16 +132,6 @@
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdComponentName2Disable|FALSE
|
gEfiMdePkgTokenSpaceGuid.PcdComponentName2Disable|FALSE
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdDriverDiagnostics2Disable|FALSE
|
gEfiMdePkgTokenSpaceGuid.PcdDriverDiagnostics2Disable|FALSE
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE
|
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseOEM|FALSE
|
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseEfiSerial|FALSE
|
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseHardSerial|FALSE
|
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseRuntimeMemory|FALSE
|
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseDataHub|FALSE
|
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeReplayInSerial|FALSE
|
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeReplayInRuntimeMemory|FALSE
|
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeReplayInDataHub|FALSE
|
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeReplayInOEM|FALSE
|
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPciIsaEnable|FALSE
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPciIsaEnable|FALSE
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPciVgaEnable|FALSE
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPciVgaEnable|FALSE
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPciBusHotplugDeviceSupport|TRUE
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPciBusHotplugDeviceSupport|TRUE
|
||||||
|
@ -169,10 +159,11 @@
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits|1
|
gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits|1
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|0
|
gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|0
|
||||||
|
|
||||||
|
[PcdsDynamicDefault.PEIM.DEFAULT]
|
||||||
[PcdsDynamicDefault.common.DEFAULT]
|
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeRuntimeMemorySize|4
|
|
||||||
|
[PcdsDynamicDefault.DXE_RUNTIME_DRIVER.DEFAULT]
|
||||||
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|4
|
||||||
|
|
||||||
[PcdsFixedAtBuild.IPF]
|
[PcdsFixedAtBuild.IPF]
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdIoBlockBaseAddressForIpf|0x0ffffc000000
|
gEfiMdePkgTokenSpaceGuid.PcdIoBlockBaseAddressForIpf|0x0ffffc000000
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
|
|
||||||
|
|
||||||
[Pcd.common]
|
[Pcd.common]
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1|PcdStatusCodeUseMemory
|
||||||
|
|
||||||
[Depex]
|
[Depex]
|
||||||
TRUE
|
TRUE
|
||||||
|
|
|
@ -32,15 +32,14 @@ RtMemoryStatusCodeInitializeWorker (
|
||||||
//
|
//
|
||||||
mRtMemoryStatusCodeTable = AllocateRuntimePool (
|
mRtMemoryStatusCodeTable = AllocateRuntimePool (
|
||||||
sizeof (RUNTIME_MEMORY_STATUSCODE_HEADER) +
|
sizeof (RUNTIME_MEMORY_STATUSCODE_HEADER) +
|
||||||
PcdGet16 (PcdStatusCodeRuntimeMemorySize) *
|
PcdGet16 (PcdStatusCodeMemorySize) * 1024
|
||||||
1024
|
|
||||||
);
|
);
|
||||||
ASSERT (mRtMemoryStatusCodeTable != NULL);
|
ASSERT (mRtMemoryStatusCodeTable != NULL);
|
||||||
|
|
||||||
mRtMemoryStatusCodeTable->RecordIndex = 0;
|
mRtMemoryStatusCodeTable->RecordIndex = 0;
|
||||||
mRtMemoryStatusCodeTable->NumberOfRecords = 0;
|
mRtMemoryStatusCodeTable->NumberOfRecords = 0;
|
||||||
mRtMemoryStatusCodeTable->MaxRecordsNumber =
|
mRtMemoryStatusCodeTable->MaxRecordsNumber =
|
||||||
(PcdGet16 (PcdStatusCodeRuntimeMemorySize) * 1024) / sizeof (MEMORY_STATUSCODE_RECORD);
|
(PcdGet16 (PcdStatusCodeMemorySize) * 1024) / sizeof (MEMORY_STATUSCODE_RECORD);
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,33 +14,6 @@
|
||||||
|
|
||||||
#include "StatusCodeRuntimeDxe.h"
|
#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.
|
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;
|
UINTN CharCount;
|
||||||
BASE_LIST Marker;
|
BASE_LIST Marker;
|
||||||
|
|
||||||
if (FeaturePcdGet (PcdStatusCodeUseEfiSerial)) {
|
|
||||||
if (EfiAtRuntime ()) {
|
|
||||||
return EFI_DEVICE_ERROR;
|
|
||||||
}
|
|
||||||
if (EfiGetCurrentTpl () > TPL_CALLBACK ) {
|
|
||||||
return EFI_DEVICE_ERROR;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Buffer[0] = '\0';
|
Buffer[0] = '\0';
|
||||||
|
|
||||||
if (Data != NULL &&
|
if (Data != NULL &&
|
||||||
|
@ -174,20 +138,10 @@ SerialStatusCodeReportWorker (
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
if (FeaturePcdGet (PcdStatusCodeUseHardSerial)) {
|
// Call SerialPort Lib function to do print.
|
||||||
//
|
//
|
||||||
// Call SerialPort Lib function to do print.
|
SerialPortWrite ((UINT8 *) Buffer, CharCount);
|
||||||
//
|
|
||||||
SerialPortWrite ((UINT8 *) Buffer, CharCount);
|
|
||||||
}
|
|
||||||
if (FeaturePcdGet (PcdStatusCodeUseEfiSerial)) {
|
|
||||||
mSerialIoProtocol->Write (
|
|
||||||
mSerialIoProtocol,
|
|
||||||
&CharCount,
|
|
||||||
Buffer
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,7 +119,7 @@ ReportDispatcher (
|
||||||
return EFI_DEVICE_ERROR;
|
return EFI_DEVICE_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FeaturePcdGet (PcdStatusCodeUseEfiSerial) || FeaturePcdGet (PcdStatusCodeUseHardSerial)) {
|
if (FeaturePcdGet (PcdStatusCodeUseSerial)) {
|
||||||
SerialStatusCodeReportWorker (
|
SerialStatusCodeReportWorker (
|
||||||
CodeType,
|
CodeType,
|
||||||
Value,
|
Value,
|
||||||
|
@ -128,7 +128,7 @@ ReportDispatcher (
|
||||||
Data
|
Data
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (FeaturePcdGet (PcdStatusCodeUseRuntimeMemory)) {
|
if (FeaturePcdGet (PcdStatusCodeUseMemory)) {
|
||||||
RtMemoryStatusCodeReportWorker (
|
RtMemoryStatusCodeReportWorker (
|
||||||
CodeType,
|
CodeType,
|
||||||
Value,
|
Value,
|
||||||
|
@ -214,18 +214,14 @@ InitializationDispatcherWorker (
|
||||||
// if enable UseRuntimeMemory, then initialize runtime memory status code worker.
|
// if enable UseRuntimeMemory, then initialize runtime memory status code worker.
|
||||||
// if enable UseDataHub, then initialize data hub status code worker.
|
// if enable UseDataHub, then initialize data hub status code worker.
|
||||||
//
|
//
|
||||||
if (FeaturePcdGet (PcdStatusCodeUseEfiSerial)) {
|
if (FeaturePcdGet (PcdStatusCodeUseSerial)) {
|
||||||
Status = EfiSerialStatusCodeInitializeWorker ();
|
|
||||||
ASSERT_EFI_ERROR (Status);
|
|
||||||
}
|
|
||||||
if (FeaturePcdGet (PcdStatusCodeUseHardSerial)) {
|
|
||||||
//
|
//
|
||||||
// Call Serial Port Lib API to initialize serial port.
|
// Call Serial Port Lib API to initialize serial port.
|
||||||
//
|
//
|
||||||
Status = SerialPortInitialize ();
|
Status = SerialPortInitialize ();
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
}
|
}
|
||||||
if (FeaturePcdGet (PcdStatusCodeUseRuntimeMemory)) {
|
if (FeaturePcdGet (PcdStatusCodeUseMemory)) {
|
||||||
Status = RtMemoryStatusCodeInitializeWorker ();
|
Status = RtMemoryStatusCodeInitializeWorker ();
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
}
|
}
|
||||||
|
@ -244,82 +240,78 @@ InitializationDispatcherWorker (
|
||||||
//
|
//
|
||||||
// Replay Status code which saved in GUID'ed HOB to all supported devices.
|
// Replay Status code which saved in GUID'ed HOB to all supported devices.
|
||||||
//
|
//
|
||||||
|
if (FeaturePcdGet (PcdStatusCodeReplayIn)) {
|
||||||
//
|
//
|
||||||
// Journal GUID'ed HOBs to find all record entry, if found,
|
// Journal GUID'ed HOBs to find all record entry, if found,
|
||||||
// then output record to support replay device.
|
// then output record to support replay device.
|
||||||
//
|
//
|
||||||
ExpectedPacketIndex = 0;
|
ExpectedPacketIndex = 0;
|
||||||
Hob.Raw = GetFirstGuidHob (&gMemoryStatusCodeRecordGuid);
|
Hob.Raw = GetFirstGuidHob (&gMemoryStatusCodeRecordGuid);
|
||||||
HobStart = Hob.Raw;
|
HobStart = Hob.Raw;
|
||||||
while (Hob.Raw != NULL) {
|
while (Hob.Raw != NULL) {
|
||||||
PacketHeader = (MEMORY_STATUSCODE_PACKET_HEADER *) GET_GUID_HOB_DATA (Hob.Guid);
|
PacketHeader = (MEMORY_STATUSCODE_PACKET_HEADER *) GET_GUID_HOB_DATA (Hob.Guid);
|
||||||
if (PacketHeader->PacketIndex == ExpectedPacketIndex) {
|
if (PacketHeader->PacketIndex == ExpectedPacketIndex) {
|
||||||
Record = (MEMORY_STATUSCODE_RECORD *) (PacketHeader + 1);
|
Record = (MEMORY_STATUSCODE_RECORD *) (PacketHeader + 1);
|
||||||
for (Index = 0; Index < PacketHeader->RecordIndex; Index++) {
|
for (Index = 0; Index < PacketHeader->RecordIndex; Index++) {
|
||||||
//
|
|
||||||
// Dispatch records to devices based on feature flag.
|
|
||||||
//
|
|
||||||
if (FeaturePcdGet (PcdStatusCodeReplayInSerial) &&
|
|
||||||
(FeaturePcdGet (PcdStatusCodeUseHardSerial) ||
|
|
||||||
FeaturePcdGet (PcdStatusCodeUseEfiSerial))) {
|
|
||||||
SerialStatusCodeReportWorker (
|
|
||||||
Record[Index].CodeType,
|
|
||||||
Record[Index].Value,
|
|
||||||
Record[Index].Instance,
|
|
||||||
NULL,
|
|
||||||
NULL
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if (FeaturePcdGet (PcdStatusCodeReplayInRuntimeMemory) &&
|
|
||||||
FeaturePcdGet (PcdStatusCodeUseRuntimeMemory)) {
|
|
||||||
RtMemoryStatusCodeReportWorker (
|
|
||||||
Record[Index].CodeType,
|
|
||||||
Record[Index].Value,
|
|
||||||
Record[Index].Instance
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if (FeaturePcdGet (PcdStatusCodeReplayInDataHub) &&
|
|
||||||
FeaturePcdGet (PcdStatusCodeUseDataHub)) {
|
|
||||||
DataHubStatusCodeReportWorker (
|
|
||||||
Record[Index].CodeType,
|
|
||||||
Record[Index].Value,
|
|
||||||
Record[Index].Instance,
|
|
||||||
NULL,
|
|
||||||
NULL
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if (FeaturePcdGet (PcdStatusCodeReplayInOEM) &&
|
|
||||||
FeaturePcdGet (PcdStatusCodeUseOEM)) {
|
|
||||||
//
|
//
|
||||||
// Call OEM hook status code library API to report status code to OEM device
|
// Dispatch records to devices based on feature flag.
|
||||||
//
|
//
|
||||||
OemHookStatusCodeReport (
|
if (FeaturePcdGet (PcdStatusCodeUseSerial)) {
|
||||||
Record[Index].CodeType,
|
SerialStatusCodeReportWorker (
|
||||||
Record[Index].Value,
|
Record[Index].CodeType,
|
||||||
Record[Index].Instance,
|
Record[Index].Value,
|
||||||
NULL,
|
Record[Index].Instance,
|
||||||
NULL
|
NULL,
|
||||||
);
|
NULL
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (FeaturePcdGet (PcdStatusCodeUseMemory)) {
|
||||||
|
RtMemoryStatusCodeReportWorker (
|
||||||
|
Record[Index].CodeType,
|
||||||
|
Record[Index].Value,
|
||||||
|
Record[Index].Instance
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (FeaturePcdGet (PcdStatusCodeUseDataHub)) {
|
||||||
|
DataHubStatusCodeReportWorker (
|
||||||
|
Record[Index].CodeType,
|
||||||
|
Record[Index].Value,
|
||||||
|
Record[Index].Instance,
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (FeaturePcdGet (PcdStatusCodeUseOEM)) {
|
||||||
|
//
|
||||||
|
// Call OEM hook status code library API to report status code to OEM device
|
||||||
|
//
|
||||||
|
OemHookStatusCodeReport (
|
||||||
|
Record[Index].CodeType,
|
||||||
|
Record[Index].Value,
|
||||||
|
Record[Index].Instance,
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
ExpectedPacketIndex++;
|
||||||
ExpectedPacketIndex++;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// See whether there is gap of packet or not
|
// See whether there is gap of packet or not
|
||||||
//
|
//
|
||||||
if (HobStart != NULL) {
|
if (HobStart != NULL) {
|
||||||
HobStart = NULL;
|
HobStart = NULL;
|
||||||
Hob.Raw = HobStart;
|
Hob.Raw = HobStart;
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
} else if (HobStart != NULL) {
|
||||||
|
//
|
||||||
|
// Cache the found packet for improve the performance
|
||||||
|
//
|
||||||
|
HobStart = Hob.Raw;
|
||||||
}
|
}
|
||||||
} else if (HobStart != NULL) {
|
|
||||||
//
|
Hob.Raw = GetNextGuidHob (&gMemoryStatusCodeRecordGuid, Hob.Raw);
|
||||||
// Cache the found packet for improve the performance
|
|
||||||
//
|
|
||||||
HobStart = Hob.Raw;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Hob.Raw = GetNextGuidHob (&gMemoryStatusCodeRecordGuid, Hob.Raw);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,23 +71,16 @@
|
||||||
[Protocols]
|
[Protocols]
|
||||||
gEfiStatusCodeRuntimeProtocolGuid ## PRODUCES
|
gEfiStatusCodeRuntimeProtocolGuid ## PRODUCES
|
||||||
gEfiDataHubProtocolGuid ## SOMETIMES_CONSUMES (Needed if Data Hub is supported for status code.)
|
gEfiDataHubProtocolGuid ## SOMETIMES_CONSUMES (Needed if Data Hub is supported for status code.)
|
||||||
gEfiSerialIoProtocolGuid ## SOMETIMES_CONSUMES (Needed if Serial is supported for status code.)
|
|
||||||
|
|
||||||
|
[FeaturePcd]
|
||||||
[FeaturePcd.common]
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeReplayIn
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeReplayInOEM
|
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeReplayInRuntimeMemory
|
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeReplayInDataHub
|
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeReplayInSerial
|
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseOEM
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseOEM
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseDataHub
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseDataHub
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseRuntimeMemory
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseEfiSerial
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseHardSerial
|
|
||||||
|
|
||||||
|
[Pcd]
|
||||||
[Pcd.common]
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize |128| PcdStatusCodeUseMemory
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeRuntimeMemorySize
|
|
||||||
|
|
||||||
[Depex]
|
[Depex]
|
||||||
TRUE
|
TRUE
|
|
@ -240,9 +240,6 @@
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|TRUE
|
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|TRUE
|
||||||
|
|
||||||
[PcdsFixedAtBuild.IA32]
|
[PcdsFixedAtBuild.IA32]
|
||||||
#gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxPeiStackSize|0x20000
|
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1
|
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeRuntimeMemorySize|128
|
|
||||||
gEfiNt32PkgTokenSpaceGuid.PcdWinNtMemorySizeForSecMain|L"64!64"|VOID*|12
|
gEfiNt32PkgTokenSpaceGuid.PcdWinNtMemorySizeForSecMain|L"64!64"|VOID*|12
|
||||||
gEfiNt32PkgTokenSpaceGuid.PcdWinNtFirmwareVolume|L"..\\Fv\\Nt32.fd"|VOID*|52
|
gEfiNt32PkgTokenSpaceGuid.PcdWinNtFirmwareVolume|L"..\\Fv\\Nt32.fd"|VOID*|52
|
||||||
gEfiNt32PkgTokenSpaceGuid.PcdWinNtBootMode|1
|
gEfiNt32PkgTokenSpaceGuid.PcdWinNtBootMode|1
|
||||||
|
@ -300,18 +297,8 @@
|
||||||
|
|
||||||
[PcdsFeatureFlag.IA32]
|
[PcdsFeatureFlag.IA32]
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE
|
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseOEM|TRUE
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseOEM|TRUE
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|FALSE
|
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|FALSE
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseHardSerial|FALSE
|
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseEfiSerial|FALSE
|
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseRuntimeMemory|FALSE
|
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseDataHub|FALSE
|
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseOEM|TRUE
|
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeReplayInSerial|FALSE
|
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeReplayInDataHub|FALSE
|
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeReplayInRuntimeMemory|FALSE
|
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeReplayInOEM|FALSE
|
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdComponentNameDisable|FALSE
|
gEfiMdePkgTokenSpaceGuid.PcdComponentNameDisable|FALSE
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdDriverDiagnosticsDisable|FALSE
|
gEfiMdePkgTokenSpaceGuid.PcdDriverDiagnosticsDisable|FALSE
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdDevicePathSupportDevicePathToText|TRUE
|
gEfiMdeModulePkgTokenSpaceGuid.PcdDevicePathSupportDevicePathToText|TRUE
|
||||||
|
|
|
@ -221,9 +221,6 @@
|
||||||
#
|
#
|
||||||
################################################################################
|
################################################################################
|
||||||
[PcdsFixedAtBuild.IA32]
|
[PcdsFixedAtBuild.IA32]
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1
|
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeRuntimeMemorySize|128
|
|
||||||
|
|
||||||
gEfiUnixPkgTokenSpaceGuid.PcdUnixFlashNvStorageVariableBase|0x280000
|
gEfiUnixPkgTokenSpaceGuid.PcdUnixFlashNvStorageVariableBase|0x280000
|
||||||
gEfiUnixPkgTokenSpaceGuid.PcdUnixFlashNvStorageFtwSpareBase|0x290000
|
gEfiUnixPkgTokenSpaceGuid.PcdUnixFlashNvStorageFtwSpareBase|0x290000
|
||||||
gEfiUnixPkgTokenSpaceGuid.PcdUnixFlashNvStorageFtwWorkingBase|0x28e000
|
gEfiUnixPkgTokenSpaceGuid.PcdUnixFlashNvStorageFtwWorkingBase|0x28e000
|
||||||
|
@ -312,21 +309,11 @@
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiPcdDatabaseExEnabled|TRUE
|
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiPcdDatabaseExEnabled|TRUE
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiPcdDatabaseGetSizeEnabled|TRUE
|
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiPcdDatabaseGetSizeEnabled|TRUE
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiPcdDatabaseSetEnabled|TRUE
|
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiPcdDatabaseSetEnabled|TRUE
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
|
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE
|
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseOEM|TRUE
|
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|FALSE
|
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|FALSE
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportUefiDecompress|TRUE
|
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportUefiDecompress|TRUE
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdDxePcdDatabaseTraverseEnabled|TRUE
|
gEfiMdeModulePkgTokenSpaceGuid.PcdDxePcdDatabaseTraverseEnabled|TRUE
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseHardSerial|FALSE
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseEfiSerial|FALSE
|
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseRuntimeMemory|FALSE
|
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseDataHub|FALSE
|
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseOEM|TRUE
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseOEM|TRUE
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeReplayInSerial|FALSE
|
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeReplayInDataHub|FALSE
|
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeReplayInRuntimeMemory|FALSE
|
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeReplayInOEM|FALSE
|
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdSupportUpdateCapsuleReset|FALSE
|
gEfiMdeModulePkgTokenSpaceGuid.PcdSupportUpdateCapsuleReset|FALSE
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdComponentNameDisable|FALSE
|
gEfiMdePkgTokenSpaceGuid.PcdComponentNameDisable|FALSE
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdDriverDiagnosticsDisable|FALSE
|
gEfiMdePkgTokenSpaceGuid.PcdDriverDiagnosticsDisable|FALSE
|
||||||
|
|
Loading…
Reference in New Issue