Re: [edk2-devel] [PATCH] UefiCpuPkg:Limit PhysicalAddressBits in speicial case

2024-01-10 Thread duntan
Hi Gerd, Thanks for your comments. I agree with your opinion. Will change the code and related comments in V2 patch. Thanks, Dun -Original Message- From: Gerd Hoffmann Sent: Wednesday, January 10, 2024 6:55 PM To: Tan, Dun Cc: devel@edk2.groups.io; Ni, Ray ; Laszlo Ersek ; Kumar,

Re: [edk2-devel] [PATCH] UefiCpuPkg:Limit PhysicalAddressBits in speicial case

2024-01-10 Thread Laszlo Ersek
On 1/10/24 11:54, Gerd Hoffmann wrote: > On Wed, Jan 10, 2024 at 04:05:44PM +0800, Dun Tan wrote: >> When creating smm page table, limit maximum >> supported physical address bits returned by >> CalculateMaximumSupportAddress() to 48 if >> 5-Level Paging is disabled. >> When 5-Level Paging is

Re: [edk2-devel] [PATCH] UefiCpuPkg:Limit PhysicalAddressBits in speicial case

2024-01-10 Thread Gerd Hoffmann
On Wed, Jan 10, 2024 at 04:05:44PM +0800, Dun Tan wrote: > When creating smm page table, limit maximum > supported physical address bits returned by > CalculateMaximumSupportAddress() to 48 if > 5-Level Paging is disabled. > When 5-Level Paging is disabled and the > PhysicalAddressBits retrived

Re: [edk2-devel] [PATCH] UefiCpuPkg:Limit PhysicalAddressBits in speicial case

2024-01-10 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray > -Original Message- > From: Tan, Dun > Sent: Wednesday, January 10, 2024 4:06 PM > To: devel@edk2.groups.io > Cc: Ni, Ray ; Laszlo Ersek ; Kumar, > Rahul R ; Gerd Hoffmann > Subject: [PATCH] UefiCpuPkg:Limit PhysicalAddressBits in speicial case > >

[edk2-devel] [PATCH] UefiCpuPkg:Limit PhysicalAddressBits in speicial case

2024-01-10 Thread duntan
When creating smm page table, limit maximum supported physical address bits returned by CalculateMaximumSupportAddress() to 48 if 5-Level Paging is disabled. When 5-Level Paging is disabled and the PhysicalAddressBits retrived from CPU HOB or CpuId is bigger than 48, only [0, 2^48 -1] range in