Thanks Laszlo.

You have sharp eyes to catch the minus 1 issue. :)

Thank you
Yao Jiewen

From: Laszlo Ersek [mailto:[email protected]]
Sent: Wednesday, June 29, 2016 9:47 PM
To: Yao, Jiewen <[email protected]>; [email protected]
Cc: Kinney, Michael D <[email protected]>; Fan, Jeff 
<[email protected]>
Subject: Re: [edk2] [PATCH] MdeModulePkg/PiSmmCore: Replace BASE_4GB with 
MAX_ADDRESS check.

On 06/29/16 15:28, Yao, Jiewen wrote:
> I forget to mention:
>
> I agree with you on #2 -
> (2) The comparison is not appropriate here (after the patch); it is toostrict.
>
> BASE_4GB is an exclusive limit, hence the pre-patch status is good. But
> MAX_ADDRESS is an inclusive limit, so the condition should be
>
>   CpuStart + PhysicalSize - 1 <= MAX_ADDRESS
>
> Because CpuStart and PhysicalSize are UINT64, it may cause problem when
> the source is CpuStart+PhysicalSize==0x10000000000000000, theoretically.
>
> So I think we should update DxeCore and PeiCore as well - to use
> Start+Size - 1 <= MAX_ADDRESS.

Sorry, I missed this second email of yours a minute ago. It answers my
question.

Thanks!
Laszlo
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to