[edk2-devel] [PATCH 2/4] UefiPayloadPkg: define some PCD as DynamicEX PCD
Ni, Ray
ray.ni at intel.com
Fri Aug 6 13:59:40 UTC 2021
Reviewed-by: Ray Ni <ray.ni at intel.com>
> -----Original Message-----
> From: Liu, Zhiguang <zhiguang.liu at intel.com>
> Sent: Friday, August 6, 2021 12:31 PM
> To: devel at edk2.groups.io
> Cc: Dong, Guo <guo.dong at intel.com>; Ni, Ray <ray.ni at intel.com>; Ma, Maurice <maurice.ma at intel.com>; You, Benjamin
> <benjamin.you at intel.com>
> Subject: [PATCH 2/4] UefiPayloadPkg: define some PCD as DynamicEX PCD
>
> Define some PCDs as DynamicEX PCD to be used as global variable.
> Because PcdUartDefaultBaudRate is defined as DynamicEX, remove the code
> to set it in platformlib. That code was actually redundant.
>
> Cc: Guo Dong <guo.dong at intel.com>
> Cc: Ray Ni <ray.ni at intel.com>
> Cc: Maurice Ma <maurice.ma at intel.com>
> Cc: Benjamin You <benjamin.you at intel.com>
>
> Signed-off-by: Zhiguang Liu <zhiguang.liu at intel.com>
> ---
> UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c | 5 -----
> UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf | 1 -
> UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.c | 4 ----
> UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.inf | 1 -
> UefiPayloadPkg/UefiPayloadPkg.dsc | 28 ++++++++++++++++++----------
> 5 files changed, 18 insertions(+), 21 deletions(-)
>
> diff --git a/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c
> b/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c
> index 72a17dc8a7..d8453e5957 100644
> --- a/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c
> +++ b/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c
> @@ -75,11 +75,6 @@ PlatformHookSerialPortInitialize (
> return Status;
>
> }
>
>
>
> - Status = PcdSet64S (PcdUartDefaultBaudRate, SerialPortInfo.Baud);
>
> - if (RETURN_ERROR (Status)) {
>
> - return Status;
>
> - }
>
> -
>
> Status = PcdSet32S (PcdSerialClockRate, SerialPortInfo.InputHertz);
>
> if (RETURN_ERROR (Status)) {
>
> return Status;
>
> diff --git a/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
> b/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
> index 2415d99c64..3eeb94d8fa 100644
> --- a/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
> +++ b/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
> @@ -35,5 +35,4 @@
> gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate ## PRODUCES
>
> gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride ## PRODUCES
>
> gEfiMdeModulePkgTokenSpaceGuid.PcdSerialClockRate ## PRODUCES
>
> - gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate ## PRODUCES
>
> gEfiMdeModulePkgTokenSpaceGuid.PcdPciSerialParameters ## PRODUCES
>
> diff --git a/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.c
> b/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.c
> index 6705f29505..bd433bdbe0 100644
> --- a/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.c
> +++ b/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.c
> @@ -70,10 +70,6 @@ PlatformHookSerialPortInitialize (
> if (RETURN_ERROR (Status)) {
>
> return Status;
>
> }
>
> - Status = PcdSet64S (PcdUartDefaultBaudRate, SerialPortInfo->BaudRate);
>
> - if (RETURN_ERROR (Status)) {
>
> - return Status;
>
> - }
>
>
>
> return RETURN_SUCCESS;
>
> }
>
> diff --git a/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.inf
> b/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.inf
> index 41e05ddf54..2dfd8b1216 100644
> --- a/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.inf
> +++ b/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.inf
> @@ -38,4 +38,3 @@
> gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase ## PRODUCES
>
> gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate ## PRODUCES
>
> gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride ## PRODUCES
>
> - gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate ## PRODUCES
>
> diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
> index ba54f2057f..d293211e46 100644
> --- a/UefiPayloadPkg/UefiPayloadPkg.dsc
> +++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
> @@ -308,11 +308,6 @@
> gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable|TRUE
>
>
>
> gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress|0x0
>
> -!if $(TARGET) == DEBUG
>
> - gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE
>
> -!else
>
> - gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
>
> -!endif
>
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE
>
> gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable|TRUE
>
>
>
> @@ -352,11 +347,6 @@
> gEfiMdeModulePkgTokenSpaceGuid.PcdSerialFifoControl|$(SERIAL_FIFO_CONTROL)
>
> gEfiMdeModulePkgTokenSpaceGuid.PcdSerialExtendedTxFifoSize|$(SERIAL_EXTENDED_TX_FIFO_SIZE)
>
>
>
> - gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|$(UART_DEFAULT_BAUD_RATE)
>
> - gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits|$(UART_DEFAULT_DATA_BITS)
>
> - gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity|$(UART_DEFAULT_PARITY)
>
> - gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits|$(UART_DEFAULT_STOP_BITS)
>
> - gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|$(DEFAULT_TERMINAL_TYPE)
>
> gEfiMdeModulePkgTokenSpaceGuid.PcdPciSerialParameters|$(PCI_SERIAL_PARAMETERS)
>
>
>
> gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber|$(MAX_LOGICAL_PROCESSORS)
>
> @@ -369,6 +359,24 @@
> ################################################################################
>
>
>
> [PcdsDynamicExDefault]
>
> + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|$(UART_DEFAULT_BAUD_RATE)
>
> + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits|$(UART_DEFAULT_DATA_BITS)
>
> + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity|$(UART_DEFAULT_PARITY)
>
> + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits|$(UART_DEFAULT_STOP_BITS)
>
> + gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|$(DEFAULT_TERMINAL_TYPE)
>
> + gEfiMdeModulePkgTokenSpaceGuid.PcdAriSupport
>
> + gEfiMdeModulePkgTokenSpaceGuid.PcdMrIovSupport
>
> + gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSupport
>
> + gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSystemPageSize
>
> + gUefiCpuPkgTokenSpaceGuid.PcdCpuApInitTimeOutInMicroSeconds
>
> + gUefiCpuPkgTokenSpaceGuid.PcdCpuApLoopMode
>
> + gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchAddress
>
> + gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchRegionSize
>
> +!if $(TARGET) == DEBUG
>
> + gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE
>
> +!else
>
> + gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
>
> +!endif
>
> gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE
>
> gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0
>
> gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0
>
> --
> 2.32.0.windows.2
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#78803): https://edk2.groups.io/g/devel/message/78803
Mute This Topic: https://groups.io/mt/84701796/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list