From: "Chiu, Chasel" <chasel.chiu@intel.com>
To: "Pu, Yu" <yu.pu@intel.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Subject: Re: [PATCH v1 3/7] IntelFsp2Pkg: Invoke GetPhysicalAddressBits() and remove the duplicated code
Date: Wed, 2 Mar 2022 09:26:24 +0000 [thread overview]
Message-ID: <BN9PR11MB5483DA499F95101847476E18E6039@BN9PR11MB5483.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20220302091859.2783-4-yu.pu@intel.com>
Thanks Yu!
Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
> -----Original Message-----
> From: Pu, Yu <yu.pu@intel.com>
> Sent: Wednesday, March 2, 2022 5:19 PM
> To: devel@edk2.groups.io
> Cc: Pu, Yu <yu.pu@intel.com>; Chiu, Chasel <chasel.chiu@intel.com>
> Subject: [PATCH v1 3/7] IntelFsp2Pkg: Invoke GetPhysicalAddressBits() and
> remove the duplicated code
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3394
>
> Invoke GetPhysicalAddressBits() defined in UefiCpuPkg for CPU physical address
> mask calculation and remove the duplicated code in
> edk2\IntelFsp2Pkg\Library\BaseCacheLib\CacheLib.c.
>
> Cc: Chasel Chiu <chasel.chiu@intel.com>
>
> Signed-off-by: Yu Pu <yu.pu@intel.com>
> ---
> IntelFsp2Pkg/Library/BaseCacheLib/CacheLib.c | 10 ++--------
> IntelFsp2Pkg/Library/BaseCacheLib/BaseCacheLib.inf | 2 ++
> 2 files changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/IntelFsp2Pkg/Library/BaseCacheLib/CacheLib.c
> b/IntelFsp2Pkg/Library/BaseCacheLib/CacheLib.c
> index f879c268e7ec..3f8ed122b2be 100644
> --- a/IntelFsp2Pkg/Library/BaseCacheLib/CacheLib.c
> +++ b/IntelFsp2Pkg/Library/BaseCacheLib/CacheLib.c
> @@ -9,6 +9,7 @@
> #include <Library/BaseLib.h> #include <Library/CacheLib.h> #include
> <Library/CacheAsRamLib.h>+#include <Library/UefiCpuLib.h> #include
> "CacheLibInternal.h" /**@@ -388,15 +389,8 @@ SetCacheAttributes (
> UINT32 UsedMsrNum; EFI_MEMORY_CACHE_TYPE
> UsedMemoryCacheType; UINT64 ValidMtrrAddressMask;- UINT32
> Cpuid_RegEax; - AsmCpuid (CPUID_EXTENDED_FUNCTION, &Cpuid_RegEax,
> NULL, NULL, NULL);- if (Cpuid_RegEax >= CPUID_VIR_PHY_ADDRESS_SIZE) {-
> AsmCpuid (CPUID_VIR_PHY_ADDRESS_SIZE, &Cpuid_RegEax, NULL, NULL,
> NULL);- ValidMtrrAddressMask = (LShiftU64 ((UINT64)1, (Cpuid_RegEax &
> 0xFF)) - 1) & (~(UINT64)0x0FFF);- } else {- ValidMtrrAddressMask = (LShiftU64
> ((UINT64)1, 36) - 1) & (~(UINT64)0x0FFF);- }+ GetPhysicalAddressBits(NULL,
> &ValidMtrrAddressMask); // // Check for invalid parameterdiff --git
> a/IntelFsp2Pkg/Library/BaseCacheLib/BaseCacheLib.inf
> b/IntelFsp2Pkg/Library/BaseCacheLib/BaseCacheLib.inf
> index 9a513fb6df77..e6b14ae4a802 100644
> --- a/IntelFsp2Pkg/Library/BaseCacheLib/BaseCacheLib.inf
> +++ b/IntelFsp2Pkg/Library/BaseCacheLib/BaseCacheLib.inf
> @@ -21,9 +21,11 @@
> [Packages] MdePkg/MdePkg.dec+ UefiCpuPkg/UefiCpuPkg.dec
> IntelFsp2Pkg/IntelFsp2Pkg.dec [LibraryClasses] BaseMemoryLib
> CacheAsRamLib+ UefiCpuLib --
> 2.30.0.windows.2
next prev parent reply other threads:[~2022-03-02 9:26 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-02 9:18 [PATCH v1 0/7] *** SUBJECT HERE *** Yu Pu
2022-03-02 9:18 ` [PATCH v1 1/7] UefiCpuPackage: Add APIs for CPU physical address mask calculation Yu Pu
2022-03-02 9:18 ` [PATCH v1 2/7] MdeModulePkg: Invoke GetPhysicalAddressBits() and remove the duplicated code Yu Pu
2022-03-07 3:54 ` [edk2-devel] " Ni, Ray
2022-03-10 8:47 ` Pu, Yu
2022-03-11 1:02 ` 回复: " gaoliming
2022-03-02 9:18 ` [PATCH v1 3/7] IntelFsp2Pkg: " Yu Pu
2022-03-02 9:26 ` Chiu, Chasel [this message]
2022-03-02 9:18 ` [PATCH v1 4/7] StandaloneMmPkg: " Yu Pu
2022-03-03 9:58 ` Ard Biesheuvel
2022-03-04 7:39 ` [edk2-devel] " Ni, Ray
2022-03-02 9:18 ` [PATCH v1 5/7] OvmfPkg: " Yu Pu
2022-03-02 9:18 ` [PATCH v1 6/7] EmulatorPkg: fixed a bug caused by Invoking GetPhysicalAddressBits() Yu Pu
2022-03-02 9:18 ` [PATCH v1 7/7] UefiPayloadPkg: Invoke GetPhysicalAddressBits() and remove the duplicated code Yu Pu
2022-03-04 18:09 ` Guo Dong
[not found] ` <16D93FE5C3E39310.28436@groups.io>
2022-03-05 3:43 ` [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=BN9PR11MB5483DA499F95101847476E18E6039@BN9PR11MB5483.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