MdeModulePkg.dec: Change PCDs for status code.
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2786 In order to support enable/disable report status code through memory or serial dynamic, change the following PCDs from [PcdsFeatureFlag] to [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]: PcdStatusCodeUseSerial PcdStatusCodeUseMemory The original plaforms can use PcdsFixedAtBuild in .dsc files to save size. Reviewed-by: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Signed-off-by: Ming Tan <ming.tan@intel.com>
This commit is contained in:
parent
8f22a331b9
commit
45bc28172f
|
@ -760,19 +760,6 @@
|
||||||
# @Prompt Enable PCI bridge IO alignment probe.
|
# @Prompt Enable PCI bridge IO alignment probe.
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdPciBridgeIoAlignmentProbe|FALSE|BOOLEAN|0x0001004e
|
gEfiMdeModulePkgTokenSpaceGuid.PcdPciBridgeIoAlignmentProbe|FALSE|BOOLEAN|0x0001004e
|
||||||
|
|
||||||
## Indicates if StatusCode is reported via Serial port.<BR><BR>
|
|
||||||
# TRUE - Reports StatusCode via Serial port.<BR>
|
|
||||||
# FALSE - Does not report StatusCode via Serial port.<BR>
|
|
||||||
# @Prompt Enable StatusCode via Serial port.
|
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE|BOOLEAN|0x00010022
|
|
||||||
|
|
||||||
## Indicates if StatusCode is stored in memory.
|
|
||||||
# The memory is boot time memory in PEI Phase and is runtime memory in DXE Phase.<BR><BR>
|
|
||||||
# TRUE - Stores StatusCode in memory.<BR>
|
|
||||||
# FALSE - Does not store StatusCode in memory.<BR>
|
|
||||||
# @Prompt Enable StatusCode via memory.
|
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE|BOOLEAN|0x00010023
|
|
||||||
|
|
||||||
## Indicates if PEI phase StatusCode will be replayed in DXE phase.<BR><BR>
|
## Indicates if PEI phase StatusCode will be replayed in DXE phase.<BR><BR>
|
||||||
# TRUE - Replays PEI phase StatusCode in DXE phased.<BR>
|
# TRUE - Replays PEI phase StatusCode in DXE phased.<BR>
|
||||||
# FALSE - Does not replay PEI phase StatusCode in DXE phase.<BR>
|
# FALSE - Does not replay PEI phase StatusCode in DXE phase.<BR>
|
||||||
|
@ -2001,6 +1988,19 @@
|
||||||
# @Prompt TCG Platform Firmware Profile revision.
|
# @Prompt TCG Platform Firmware Profile revision.
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdTcgPfpMeasurementRevision|0|UINT32|0x00010077
|
gEfiMdeModulePkgTokenSpaceGuid.PcdTcgPfpMeasurementRevision|0|UINT32|0x00010077
|
||||||
|
|
||||||
|
## Indicates if StatusCode is reported via Serial port.<BR><BR>
|
||||||
|
# TRUE - Reports StatusCode via Serial port.<BR>
|
||||||
|
# FALSE - Does not report StatusCode via Serial port.<BR>
|
||||||
|
# @Prompt Enable StatusCode via Serial port.
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE|BOOLEAN|0x00010022
|
||||||
|
|
||||||
|
## Indicates if StatusCode is stored in memory.
|
||||||
|
# The memory is boot time memory in PEI Phase and is runtime memory in DXE Phase.<BR><BR>
|
||||||
|
# TRUE - Stores StatusCode in memory.<BR>
|
||||||
|
# FALSE - Does not store StatusCode in memory.<BR>
|
||||||
|
# @Prompt Enable StatusCode via memory.
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE|BOOLEAN|0x00010023
|
||||||
|
|
||||||
[PcdsPatchableInModule]
|
[PcdsPatchableInModule]
|
||||||
## Specify memory size with page number for PEI code when
|
## Specify memory size with page number for PEI code when
|
||||||
# Loading Module at Fixed Address feature is enabled.
|
# Loading Module at Fixed Address feature is enabled.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
Report Status Code Handler PEIM which produces general handlers and hook them
|
Report Status Code Handler PEIM which produces general handlers and hook them
|
||||||
onto the PEI status code router.
|
onto the PEI status code router.
|
||||||
|
|
||||||
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.<BR>
|
||||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
@ -45,13 +45,13 @@ StatusCodeHandlerPeiEntry (
|
||||||
// If enable UseSerial, then initialize serial port.
|
// If enable UseSerial, then initialize serial port.
|
||||||
// if enable UseMemory, then initialize memory status code worker.
|
// if enable UseMemory, then initialize memory status code worker.
|
||||||
//
|
//
|
||||||
if (FeaturePcdGet (PcdStatusCodeUseSerial)) {
|
if (PcdGetBool (PcdStatusCodeUseSerial)) {
|
||||||
Status = SerialPortInitialize();
|
Status = SerialPortInitialize();
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
Status = RscHandlerPpi->Register (SerialStatusCodeReportWorker);
|
Status = RscHandlerPpi->Register (SerialStatusCodeReportWorker);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
}
|
}
|
||||||
if (FeaturePcdGet (PcdStatusCodeUseMemory)) {
|
if (PcdGetBool (PcdStatusCodeUseMemory)) {
|
||||||
Status = MemoryStatusCodeInitializeWorker ();
|
Status = MemoryStatusCodeInitializeWorker ();
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
Status = RscHandlerPpi->Register (MemoryStatusCodeReportWorker);
|
Status = RscHandlerPpi->Register (MemoryStatusCodeReportWorker);
|
||||||
|
|
|
@ -53,11 +53,9 @@
|
||||||
[Ppis]
|
[Ppis]
|
||||||
gEfiPeiRscHandlerPpiGuid ## CONSUMES
|
gEfiPeiRscHandlerPpiGuid ## CONSUMES
|
||||||
|
|
||||||
[FeaturePcd]
|
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory ## CONSUMES
|
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial ## CONSUMES
|
|
||||||
|
|
||||||
[Pcd]
|
[Pcd]
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial ## CONSUMES
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory ## CONSUMES
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1|gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory ## SOMETIMES_CONSUMES
|
gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1|gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory ## SOMETIMES_CONSUMES
|
||||||
|
|
||||||
[Depex]
|
[Depex]
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
Status Code Handler Driver which produces general handlers and hook them
|
Status Code Handler Driver which produces general handlers and hook them
|
||||||
onto the DXE status code router.
|
onto the DXE status code router.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.<BR>
|
||||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
@ -29,7 +29,7 @@ UnregisterBootTimeHandlers (
|
||||||
IN VOID *Context
|
IN VOID *Context
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (FeaturePcdGet (PcdStatusCodeUseSerial)) {
|
if (PcdGetBool (PcdStatusCodeUseSerial)) {
|
||||||
mRscHandlerProtocol->Unregister (SerialStatusCodeReportWorker);
|
mRscHandlerProtocol->Unregister (SerialStatusCodeReportWorker);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -80,14 +80,14 @@ InitializationDispatcherWorker (
|
||||||
// If enable UseSerial, then initialize serial port.
|
// If enable UseSerial, then initialize serial port.
|
||||||
// if enable UseRuntimeMemory, then initialize runtime memory status code worker.
|
// if enable UseRuntimeMemory, then initialize runtime memory status code worker.
|
||||||
//
|
//
|
||||||
if (FeaturePcdGet (PcdStatusCodeUseSerial)) {
|
if (PcdGetBool (PcdStatusCodeUseSerial)) {
|
||||||
//
|
//
|
||||||
// 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 (PcdStatusCodeUseMemory)) {
|
if (PcdGetBool (PcdStatusCodeUseMemory)) {
|
||||||
Status = RtMemoryStatusCodeInitializeWorker ();
|
Status = RtMemoryStatusCodeInitializeWorker ();
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
}
|
}
|
||||||
|
@ -115,7 +115,7 @@ InitializationDispatcherWorker (
|
||||||
//
|
//
|
||||||
// Dispatch records to devices based on feature flag.
|
// Dispatch records to devices based on feature flag.
|
||||||
//
|
//
|
||||||
if (FeaturePcdGet (PcdStatusCodeUseSerial)) {
|
if (PcdGetBool (PcdStatusCodeUseSerial)) {
|
||||||
SerialStatusCodeReportWorker (
|
SerialStatusCodeReportWorker (
|
||||||
Record[Index].CodeType,
|
Record[Index].CodeType,
|
||||||
Record[Index].Value,
|
Record[Index].Value,
|
||||||
|
@ -124,7 +124,7 @@ InitializationDispatcherWorker (
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (FeaturePcdGet (PcdStatusCodeUseMemory)) {
|
if (PcdGetBool (PcdStatusCodeUseMemory)) {
|
||||||
RtMemoryStatusCodeReportWorker (
|
RtMemoryStatusCodeReportWorker (
|
||||||
Record[Index].CodeType,
|
Record[Index].CodeType,
|
||||||
Record[Index].Value,
|
Record[Index].Value,
|
||||||
|
@ -171,10 +171,10 @@ StatusCodeHandlerRuntimeDxeEntry (
|
||||||
//
|
//
|
||||||
InitializationDispatcherWorker ();
|
InitializationDispatcherWorker ();
|
||||||
|
|
||||||
if (FeaturePcdGet (PcdStatusCodeUseSerial)) {
|
if (PcdGetBool (PcdStatusCodeUseSerial)) {
|
||||||
mRscHandlerProtocol->Register (SerialStatusCodeReportWorker, TPL_HIGH_LEVEL);
|
mRscHandlerProtocol->Register (SerialStatusCodeReportWorker, TPL_HIGH_LEVEL);
|
||||||
}
|
}
|
||||||
if (FeaturePcdGet (PcdStatusCodeUseMemory)) {
|
if (PcdGetBool (PcdStatusCodeUseMemory)) {
|
||||||
mRscHandlerProtocol->Register (RtMemoryStatusCodeReportWorker, TPL_HIGH_LEVEL);
|
mRscHandlerProtocol->Register (RtMemoryStatusCodeReportWorker, TPL_HIGH_LEVEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,12 +58,10 @@
|
||||||
[Protocols]
|
[Protocols]
|
||||||
gEfiRscHandlerProtocolGuid ## CONSUMES
|
gEfiRscHandlerProtocolGuid ## CONSUMES
|
||||||
|
|
||||||
[FeaturePcd]
|
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeReplayIn ## CONSUMES
|
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory ## CONSUMES
|
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial ## CONSUMES
|
|
||||||
|
|
||||||
[Pcd]
|
[Pcd]
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeReplayIn ## CONSUMES
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial ## CONSUMES
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory ## CONSUMES
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize |128| gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory ## SOMETIMES_CONSUMES
|
gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize |128| gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory ## SOMETIMES_CONSUMES
|
||||||
|
|
||||||
[Depex]
|
[Depex]
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
Status Code Handler Driver which produces general handlers and hook them
|
Status Code Handler Driver which produces general handlers and hook them
|
||||||
onto the SMM status code router.
|
onto the SMM status code router.
|
||||||
|
|
||||||
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.<BR>
|
||||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
@ -28,14 +28,14 @@ InitializationDispatcherWorker (
|
||||||
// If enable UseSerial, then initialize serial port.
|
// If enable UseSerial, then initialize serial port.
|
||||||
// if enable UseRuntimeMemory, then initialize runtime memory status code worker.
|
// if enable UseRuntimeMemory, then initialize runtime memory status code worker.
|
||||||
//
|
//
|
||||||
if (FeaturePcdGet (PcdStatusCodeUseSerial)) {
|
if (PcdGetBool (PcdStatusCodeUseSerial)) {
|
||||||
//
|
//
|
||||||
// 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 (PcdStatusCodeUseMemory)) {
|
if (PcdGetBool (PcdStatusCodeUseMemory)) {
|
||||||
Status = MemoryStatusCodeInitializeWorker ();
|
Status = MemoryStatusCodeInitializeWorker ();
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
}
|
}
|
||||||
|
@ -73,10 +73,10 @@ StatusCodeHandlerSmmEntry (
|
||||||
//
|
//
|
||||||
InitializationDispatcherWorker ();
|
InitializationDispatcherWorker ();
|
||||||
|
|
||||||
if (FeaturePcdGet (PcdStatusCodeUseSerial)) {
|
if (PcdGetBool (PcdStatusCodeUseSerial)) {
|
||||||
mRscHandlerProtocol->Register (SerialStatusCodeReportWorker);
|
mRscHandlerProtocol->Register (SerialStatusCodeReportWorker);
|
||||||
}
|
}
|
||||||
if (FeaturePcdGet (PcdStatusCodeUseMemory)) {
|
if (PcdGetBool (PcdStatusCodeUseMemory)) {
|
||||||
mRscHandlerProtocol->Register (MemoryStatusCodeReportWorker);
|
mRscHandlerProtocol->Register (MemoryStatusCodeReportWorker);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,11 +53,9 @@
|
||||||
[Protocols]
|
[Protocols]
|
||||||
gEfiSmmRscHandlerProtocolGuid ## CONSUMES
|
gEfiSmmRscHandlerProtocolGuid ## CONSUMES
|
||||||
|
|
||||||
[FeaturePcd]
|
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory ## CONSUMES
|
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial ## CONSUMES
|
|
||||||
|
|
||||||
[Pcd]
|
[Pcd]
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial ## CONSUMES
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory ## CONSUMES
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize |128| gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory ## SOMETIMES_CONSUMES
|
gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize |128| gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory ## SOMETIMES_CONSUMES
|
||||||
|
|
||||||
[Depex]
|
[Depex]
|
||||||
|
|
Loading…
Reference in New Issue