From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web09.6623.1572313273450321291 for ; Mon, 28 Oct 2019 18:41:13 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: siyuan.fu@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Oct 2019 18:41:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,242,1569308400"; d="scan'208";a="224817340" Received: from shwdeopenpsi787.ccr.corp.intel.com ([10.239.158.56]) by fmsmga004.fm.intel.com with ESMTP; 28 Oct 2019 18:41:12 -0700 From: "Siyuan, Fu" To: devel@edk2.groups.io Cc: Jiaxin Wu Subject: [Patch] NetworkPkg/SnpDxe: Use PcdGetBool() instead of FixedPcdGetBool in Snp.c Date: Tue, 29 Oct 2019 09:41:10 +0800 Message-Id: <20191029014110.18728-1-siyuan.fu@intel.com> X-Mailer: git-send-email 2.19.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Siyuan Fu --- 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