On Sep 6, 2012, at 8:48 AM, Bhavana Brar wrote:
> Hi,
> I'm using the UDK2010 package and I was able to read/write the PCI config
> space by using the PCIReadCf8/WriteCf8 functions (PciLib/PciExpresslib). I
> was also able to access the config space using the memory mapped PCI
> functions ( memread8/memwrite8) etc.
> However, if I try and get the base address ( using one of the helper
> functions defined in the Lib) and then add the offset to it and dereference
> this , I don't read the expected value. Is there any virtual mapping being
> done or to be done for memory mapped access of PCI Config space in order for
> this direct method to work.
>
> I'm trying to do the above steps in an efi application that is loaded via the
> Shell prior to the OS booting.
>
Don't use the low level library functions, as they are for the low level
platform firmware for early init. To make PCI Express work you need to know a
base address that can vary. I will also point out that the PCI config space
access mechanism is not standardized in the PCI spec. How do you do CF8/CFC on
an ARM platform that does not have IO space?
>From an application, or even and EFI Driver, the PCI IO Protocol is used to
>access PCI Config space. There is a chapter on PCI in the UEFI spec that you
>will find helpful.
Thanks,
Andrew
> Thanks
> !------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats.
> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel