[edk2-devel] [PATCH V1 1/1] UefiCpuPkg/ResetVector: Cache Disable should not be set by default in CR0

Ni, Ray ray.ni at intel.com
Wed Jul 26 09:55:45 UTC 2023


This patch is not right.

Intel SDM explicitly says the initial CR0 value is 6000_0010. CD bit is set.

So the ResetVector code that still sets CD bit should be good.

If you are facing NEM enable failure, can you change your NEM enable logic to explicitly clear CD bit instead of changing here?

Thanks,
Ray


> -----Original Message-----
> From: xueshengfeng <xueshengfeng at byosoft.com.cn>
> Sent: Wednesday, July 26, 2023 5:48 PM
> To: devel at edk2.groups.io; Dong, Eric <eric.dong at intel.com>; Ni, Ray
> <ray.ni at intel.com>; Kumar, Rahul R <rahul.r.kumar at intel.com>;
> kraxel at redhat.com; De, Debkumar <debkumar.de at intel.com>; West, Catharine
> <catharine.west at intel.com>
> Cc: Wu, MingliangX <mingliangx.wu at intel.com>; Wu
> Subject: [PATCH V1 1/1] UefiCpuPkg/ResetVector: Cache Disable should not be
> set by default in CR0
> 
> From: "Wu, MingliangX" <mingliangx.wu at intel.com>
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4511
> 
> With 64 bit build we are seeing the CD in control register CR 0 set.
> This causes the NEM to disabled for some specific bios profiles.
> 
> Cc: Eric Dong <eric.dong at intel.com>
> Cc: Ray Ni <ray.ni at intel.com>
> Cc: Rahul Kumar <rahul1.kumar at intel.com>
> Cc: Gerd Hoffmann <kraxel at redhat.com>
> Cc: Debkumar De <debkumar.de at intel.com>
> Cc: Catharine West <catharine.west at intel.com>
> Signed-off-by: Wu, Mingliang <mingliangx.wu at intel.com>
> ---
>  UefiCpuPkg/ResetVector/Vtf0/Ia16/Real16ToFlat32.asm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/UefiCpuPkg/ResetVector/Vtf0/Ia16/Real16ToFlat32.asm
> b/UefiCpuPkg/ResetVector/Vtf0/Ia16/Real16ToFlat32.asm
> index f59fc6ead4ba..4af2e875c31c 100644
> --- a/UefiCpuPkg/ResetVector/Vtf0/Ia16/Real16ToFlat32.asm
> +++ b/UefiCpuPkg/ResetVector/Vtf0/Ia16/Real16ToFlat32.asm
> @@ -7,7 +7,7 @@
>  ;
>  ;------------------------------------------------------------------------------
> 
> -%define SEC_DEFAULT_CR0  0x40000023
> +%define SEC_DEFAULT_CR0  0x00000023
>  %define SEC_DEFAULT_CR4  0x640
> 
>  BITS    16
> --
> 2.26.2.windows.1
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#107267): https://edk2.groups.io/g/devel/message/107267
Mute This Topic: https://groups.io/mt/100367559/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/3943202/1813853/130120423/xyzzy [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list