Thanks Laszlo. I think this is a special case we did not test before. And it is
a bug we need fix.
Unfortunately, I am out of office these days with limited email access. I just
saw the email today.
I have a quick look at the code. I believe we need add below check in
UefiCpuPkg\PiSmmCpuDxeSmm\SmmCpuMemoryManagement.c,
ConvertMemoryPageAttributes()
==========================
if (BaseAddress > MAX_ADDRESS) {
return RETURN_UNSUPPORTED;
}
if (Length > MAX_ADDRESS) {
return RETURN_UNSUPPORTED;
}
if ((Length != 0) && (BaseAddress > MAX_ADDRESS - (Length - 1))) {
return RETURN_UNSUPPORTED;
}
==========================
to filter invalid address in IA32.
(Well, it is valid for OS, because OS may use PAE to match to lower. But it is
invalid for UEFI, because UEFI uses identical address)
Would you please file an HSD for that?
Thank you
Yao Jiewen
> -----Original Message-----
> From: Laszlo Ersek [mailto:[email protected]]
> Sent: Saturday, July 8, 2017 10:12 AM
> To: Yao, Jiewen <[email protected]>
> Cc: edk2-devel-01 <[email protected]>
> Subject: memory protection crash in PiSmmCpuDxeSmm, Ia32 build with RAM
> above 4GB
>
> Hi Jiewen,
>
> I just noticed that building OvmfIa32.dsc with -D SMM_REQUIRE, and then
> running the 32-bit guest with 4G RAM (of which 2GB are placed in 64-bit
> address pace), the guest crashes when PiSmmCpuDxeSmm tries to protect
> the memory range at 4GB. Please find the log attached (it ends with the
> crash).
>
> Is this expected to work?
>
> Thanks
> Laszlo
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel