public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ni, Ray" <ray.ni@intel.com>
To: "Liu, Zhiguang" <zhiguang.liu@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Dong, Guo" <guo.dong@intel.com>,
	"Ma, Maurice" <maurice.ma@intel.com>,
	"You, Benjamin" <benjamin.you@intel.com>
Subject: Re: [PATCH 2/4] UefiPayloadPkg: define some PCD as DynamicEX PCD
Date: Fri, 6 Aug 2021 13:59:40 +0000	[thread overview]
Message-ID: <CO1PR11MB49301AB02F1EFE68452C637D8CF39@CO1PR11MB4930.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20210806043116.1547-2-zhiguang.liu@intel.com>

Reviewed-by: Ray Ni <ray.ni@intel.com>

> -----Original Message-----
> From: Liu, Zhiguang <zhiguang.liu@intel.com>
> Sent: Friday, August 6, 2021 12:31 PM
> To: devel@edk2.groups.io
> Cc: Dong, Guo <guo.dong@intel.com>; Ni, Ray <ray.ni@intel.com>; Ma, Maurice <maurice.ma@intel.com>; You, Benjamin
> <benjamin.you@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@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Maurice Ma <maurice.ma@intel.com>
> Cc: Benjamin You <benjamin.you@intel.com>
> 
> Signed-off-by: Zhiguang Liu <zhiguang.liu@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


  reply	other threads:[~2021-08-06 13:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-06  4:31 [PATCH 1/4] UefiPayloadPkg: Add Fixed PCDs and use Macro to define the default value Zhiguang Liu
2021-08-06  4:31 ` [PATCH 2/4] UefiPayloadPkg: define some PCD as DynamicEX PCD Zhiguang Liu
2021-08-06 13:59   ` Ni, Ray [this message]
2021-08-06 17:23   ` Guo Dong
2021-08-06  4:31 ` [PATCH 3/4] UefiPayloadPkg: change the default value of some PCDs Zhiguang Liu
2021-08-06 13:59   ` Ni, Ray
2021-08-06 17:20   ` Guo Dong
2021-08-06  4:31 ` [PATCH 4/4] UefiPayloadPkg: Add a macro to enable or diable the serial driver Zhiguang Liu
2021-08-06 14:00   ` Ni, Ray
2021-08-06 17:19   ` Guo Dong
2021-08-06 13:59 ` [PATCH 1/4] UefiPayloadPkg: Add Fixed PCDs and use Macro to define the default value Ni, Ray
2021-08-06 17:23 ` [edk2-devel] " Guo Dong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CO1PR11MB49301AB02F1EFE68452C637D8CF39@CO1PR11MB4930.namprd11.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox