[edk2-devel] [Patch] NetworkPkg/SnpDxe: Use PcdGetBool() instead of FixedPcdGetBool in Snp.c

Wu, Jiaxin jiaxin.wu at intel.com
Tue Oct 29 01:43:08 UTC 2019


Reviewed-by: Jiaxin Wu <jiaxin.wu at intel.com>



> -----Original Message-----
> From: Fu, Siyuan <siyuan.fu at intel.com>
> Sent: Tuesday, October 29, 2019 9:41 AM
> To: devel at edk2.groups.io
> Cc: Wu, Jiaxin <jiaxin.wu at intel.com>
> Subject: [Patch] NetworkPkg/SnpDxe: Use PcdGetBool() instead of
> FixedPcdGetBool in Snp.c
> 
> This patch fixes a problem introduced by commit
>   61bb6eeb4d93c0a34c1995d87914ab41398f9550.
> 
> The PcdSnpCreateExitBootServicesEvent is not guaranteed to be
> FixedAtBuild,
> so use PcdGetBool() to supports both fixed and patchable PCD.
> 
> Change-Id: Ic1791bb598306e9251792113797c3bad317d0dda
> Cc: Jiaxin Wu <jiaxin.wu at intel.com>
> Signed-off-by: Siyuan Fu <siyuan.fu at intel.com>
> ---
>  NetworkPkg/SnpDxe/Snp.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/NetworkPkg/SnpDxe/Snp.c b/NetworkPkg/SnpDxe/Snp.c
> index 9fb007f7ae..1099dbfa6a 100644
> --- a/NetworkPkg/SnpDxe/Snp.c
> +++ b/NetworkPkg/SnpDxe/Snp.c
> @@ -647,7 +647,7 @@ SimpleNetworkDriverStart (
>    PxeShutdown (Snp);
>    PxeStop (Snp);
> 
> -  if (FixedPcdGetBool (PcdSnpCreateExitBootServicesEvent)) {
> +  if (PcdGetBool (PcdSnpCreateExitBootServicesEvent)) {
>      //
>      // Create EXIT_BOOT_SERIVES Event
>      //
> @@ -780,7 +780,7 @@ SimpleNetworkDriverStop (
>      return Status;
>    }
> 
> -  if (FixedPcdGetBool (PcdSnpCreateExitBootServicesEvent)) {
> +  if (PcdGetBool (PcdSnpCreateExitBootServicesEvent)) {
>      //
>      // Close EXIT_BOOT_SERIVES Event
>      //
> --
> 2.19.1.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#49573): https://edk2.groups.io/g/devel/message/49573
Mute This Topic: https://groups.io/mt/39177854/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