Re: [edk2] [Patch] MdeModulePkg/PiSmmCore: Check valid memory range.

2018-08-21 Thread Dong, Eric
Hi Star, Good catch. I tried to boot an test platform and it passed. I assume it has cases to free the smm memory. Seems like actually it doesn't. I will add test code to verify the patch and send v2 change. Thanks, Eric > -Original Message- > From: Zeng, Star > Sent: Tuesday, August 21

Re: [edk2] [Patch] MdeModulePkg/PiSmmCore: Check valid memory range.

2018-08-21 Thread Zeng, Star
Hi Eric, About + EFI_PHYSICAL_ADDRESS Last; + Last = Memory + EFI_PAGES_TO_SIZE (NumberOfPages); Shouldn't "-1" be also added like the code below in ConvertSmmMemoryMapEntry()? EFI_PHYSICAL_ADDRESS End; End = Memory + EFI_PAGES_TO_SIZE(NumberOfPages) - 1; Could you double check the

[edk2] [Patch] MdeModulePkg/PiSmmCore: Check valid memory range.

2018-08-20 Thread Eric Dong
Call BS.AllocatePages in DXE driver and call SMM FreePages with the address of the buffer allocated in the DXE driver. SMM FreePages success and add a non-SMRAM range into SMM heap list. This is not an expected behavior. SMM FreePages should return error for this case and not free the pages. BZ