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:
Tan, Ming
2020-06-10 10:56:31 +08:00
committed by mergify[bot]
parent 8f22a331b9
commit 45bc28172f
7 changed files with 36 additions and 42 deletions

View File

@ -2,7 +2,7 @@
Status Code Handler Driver which produces general handlers and hook them
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
**/
@ -28,14 +28,14 @@ InitializationDispatcherWorker (
// If enable UseSerial, then initialize serial port.
// 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.
//
Status = SerialPortInitialize ();
ASSERT_EFI_ERROR (Status);
}
if (FeaturePcdGet (PcdStatusCodeUseMemory)) {
if (PcdGetBool (PcdStatusCodeUseMemory)) {
Status = MemoryStatusCodeInitializeWorker ();
ASSERT_EFI_ERROR (Status);
}
@ -73,10 +73,10 @@ StatusCodeHandlerSmmEntry (
//
InitializationDispatcherWorker ();
if (FeaturePcdGet (PcdStatusCodeUseSerial)) {
if (PcdGetBool (PcdStatusCodeUseSerial)) {
mRscHandlerProtocol->Register (SerialStatusCodeReportWorker);
}
if (FeaturePcdGet (PcdStatusCodeUseMemory)) {
if (PcdGetBool (PcdStatusCodeUseMemory)) {
mRscHandlerProtocol->Register (MemoryStatusCodeReportWorker);
}