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 <xueshengf...@byosoft.com.cn>
> Sent: Wednesday, July 26, 2023 5:48 PM
> To: devel@edk2.groups.io; Dong, Eric <eric.d...@intel.com>; Ni, Ray
> <ray...@intel.com>; Kumar, Rahul R <rahul.r.ku...@intel.com>;
> kra...@redhat.com; De, Debkumar <debkumar...@intel.com>; West, Catharine
> <catharine.w...@intel.com>
> Cc: Wu, MingliangX <mingliangx...@intel.com>; Wu
> Subject: [PATCH V1 1/1] UefiCpuPkg/ResetVector: Cache Disable should not be
> set by default in CR0
> 
> From: "Wu, MingliangX" <mingliangx...@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.d...@intel.com>
> Cc: Ray Ni <ray...@intel.com>
> Cc: Rahul Kumar <rahul1.ku...@intel.com>
> Cc: Gerd Hoffmann <kra...@redhat.com>
> Cc: Debkumar De <debkumar...@intel.com>
> Cc: Catharine West <catharine.w...@intel.com>
> Signed-off-by: Wu, Mingliang <mingliangx...@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/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: 
https://edk2.groups.io/g/devel/leave/9847357/21656/1706620634/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to