> On Oct 15, 2015, at 8:56 AM, Kinney, Michael D <[email protected]> 
> wrote:
> 
> Dimiri,
> 
> Can you please clarify what OS move operation is being performed?
> 
> Memory ranges of type EfiRuntimeServicesData must remain at the same physical 
> address.  When SetVirtualAddressMap() is called, the OS can specify a virtual 
> address that is different than the physical address, but the memory can not 
> be moved to a different physical address.
> 

Mike,

I’ve seen debug code move the physical addresses too… We had to resort to a 
EfiReservedMemoryType buffer for SMM. 

From an UEFI spec perspective all EFI defined services must be called in 
virtual mode, and there is no contract with the OS to provide a physical 
mapping. So some folks seem to assume this means they Physical address is a 
don’t care. I would point out all the usage case are PI related stuff…..

Thanks,

Andrew Fish


> Thanks,
> 
> Mike
> 
>> -----Original Message-----
>> From: edk2-devel [mailto:[email protected]] On Behalf Of iMac
>> Pro
>> Sent: Thursday, October 15, 2015 1:59 AM
>> To: [email protected]
>> Subject: [edk2] SMM core problems
>> 
>> Hi,
>> 
>> Found that problems in PiSmmIpl.c/PiSmmCore.c:
>> 
>> 1.  SMM_CORE_PRIVATE_DATA *gSmmCorePrivate  is pointer
>> to EfiRuntimeServicesCode (.code and .data segs are merged in x86) memory
>> that can be declared as ReadOnly by OS. But
>> SmmCommunicationCommunicate
>> write to it. GPE in OS !!!
>> 
>> 2. EfiRuntimeServicesData memory can be moved by OS loader physically.
>> ("preserved by the loader" in spec - not means in the same place). So this
>> is not best place to store SMM_CORE_PRIVATE_DATA also, because
>> PiSmmCore.c.does not know that boot loader moved it.
>> 
>> Best regards,
>> Dimitri
>> _______________________________________________
>> edk2-devel mailing list
>> [email protected]
>> https://lists.01.org/mailman/listinfo/edk2-devel
> _______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.01.org/mailman/listinfo/edk2-devel

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

Reply via email to