On May 16, 2013, at 9:13 AM, Andrew Fish <[email protected]> wrote:
> You can check the EFI memory map to see if the EFI_MEMORY_RUNTIME is set. You
> should get a virtual mapping from the OS. Are you using the virtual address
> provided by the OS for the access?
>
> Andrew Fish
>
>
>
> On May 16, 2013, at 9:09 AM, "Prakash, Sathya" <[email protected]> wrote:
>
>> Thanks Mike, We understand the risk and we are trying to move away from this
>> model.
>>
>> Andrew, The Memory is allocated using the below call, will it not
>> automatically set the region internally as EFI_MEMORY_RUNTIME?
>>
>> gBS->AllocatePages(X, EfiRuntimeServicesData, Sz, &MemoryToDrvr);
>>
>> This doesn’t cause any issue in a system in which IOMMU (Vt-d) is not
>> enabled, but when IOMMU is enabled accessing this address creates fault.
>>
Forgot to mention that IOMMU is not covered in UEFI. So there may be another
spec involved, maybe ACPI?
>> Do you mean to say we need to explicitly set the memory descriptor type
>> using GetMemorySpaceDescriptor and SetMemorySpaceAttributes?
>>
>>
>> Thanks
>> Sathya
>>
>> From: Kinney, Michael D [mailto:[email protected]]
>> Sent: Wednesday, May 15, 2013 7:05 PM
>> To: [email protected]; Kinney, Michael D
>> Subject: Re: [edk2] Memory reserved using EfiRuntimeServicesData and IOMMU
>>
>> Sathya,
>>
>> In general, this technique can be problematic. UEFI Drivers are not
>> required to run every boot. If your OS driver depends on the UEFI Driver
>> running, then the OS Driver may fail. It is better if the OS Driver does
>> not depend on information from the UEFI Driver.
>>
>> Mike
>>
>>
>>
>> From: Andrew Fish [mailto:[email protected]]
>> Sent: Wednesday, May 15, 2013 4:15 PM
>> To: [email protected]
>> Subject: Re: [edk2] Memory reserved using EfiRuntimeServicesData and IOMMU
>>
>> Did you mark the memory region as EFI_MEMORY_RUNTIME. This should force the
>> OS to give you a kernel virtual address for this region, and implies that
>> firmware may access it at runtime.
>>
>> Andrew Fish
>>
>>
>>
>>
>>
>> On May 15, 2013, at 4:11 PM, "Prakash, Sathya" <[email protected]>
>> wrote:
>>
>>
>> Chip,
>> Thanks for the response, I am able to pass the address through my controller
>> firmware (UEFI driver and OS driver can handshake with controller firmware
>> for the address) but my question is, is it legal to access. I am seeing
>> some issues when IOMMU comes into picture, it consider the address is
>> reserved (from memory map) and faults the access from my OS driver.
>>
>> Thanks
>> Sathya
>>
>> From: Chip Ueltschey [mailto:[email protected]]
>> Sent: Wednesday, May 15, 2013 4:16 PM
>> To: [email protected]
>> Subject: Re: [edk2] Memory reserved using EfiRuntimeServicesData and IOMMU
>>
>> Sathya,
>>
>> You need a way to pass the address to your OS. The memory is already there.
>> You could use a variable, but you need to have a pointer to variable
>> services.
>> You can store the information in ASL. Non-trivial to make this work, but I
>> know that it is possible to do.
>>
>> -chip
>>
>>
>> On Tue, May 14, 2013 at 4:16 PM, Prakash, Sathya <[email protected]>
>> wrote:
>> Just to clarify further. Are we allowed to access the memory allocated by
>> our UEFI driver as RuntimeServiceData in our OS drivers (the physical
>> address is passed by the uefi driver to controller and controller to OS
>> driver)?
>>
>> Thanks
>> Sathya
>>
>> -----Original Message-----
>> From: Prakash, Sathya [mailto:[email protected]]
>> Sent: Tuesday, May 14, 2013 10:17 AM
>> To: [email protected]
>> Subject: [edk2] Memory reserved using EfiRuntimeServicesData and IOMMU
>>
>> Folks,
>> We allocate some host memory as EfiRuntimeServicesData and utilize the
>> memory in host driver for a certain purpose. This works fine with normal
>> cases, but will it work with IOMMU?. I see the IOMMU module in linux needs
>> to know about the reserved regions through RMRR address table to map the
>> access, does the GetMemoryMap supports this?
>>
>> Thanks
>> Sathya
>>
>>
>>
>> ------------------------------------------------------------------------------
>> AlienVault Unified Security Management (USM) platform delivers complete
>> security visibility with the essential security capabilities. Easily and
>> efficiently configure, manage, and operate all of your security controls
>> from a single console and one unified framework. Download a free trial.
>> http://p.sf.net/sfu/alienvault_d2d
>> _______________________________________________
>> edk2-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>>
>>
>>
>> ------------------------------------------------------------------------------
>> AlienVault Unified Security Management (USM) platform delivers complete
>> security visibility with the essential security capabilities. Easily and
>> efficiently configure, manage, and operate all of your security controls
>> from a single console and one unified framework. Download a free trial.
>> http://p.sf.net/sfu/alienvault_d2d
>> _______________________________________________
>> edk2-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>>
>> ------------------------------------------------------------------------------
>> AlienVault Unified Security Management (USM) platform delivers complete
>> security visibility with the essential security capabilities. Easily and
>> efficiently configure, manage, and operate all of your security controls
>> from a single console and one unified framework. Download a free trial.
>> http://p.sf.net/sfu/alienvault_d2d_______________________________________________
>> edk2-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>>
>> ------------------------------------------------------------------------------
>> AlienVault Unified Security Management (USM) platform delivers complete
>> security visibility with the essential security capabilities. Easily and
>> efficiently configure, manage, and operate all of your security controls
>> from a single console and one unified framework. Download a free trial.
>> http://p.sf.net/sfu/alienvault_d2d_______________________________________________
>> edk2-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>
> ------------------------------------------------------------------------------
> AlienVault Unified Security Management (USM) platform delivers complete
> security visibility with the essential security capabilities. Easily and
> efficiently configure, manage, and operate all of your security controls
> from a single console and one unified framework. Download a free trial.
> http://p.sf.net/sfu/alienvault_d2d_______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel