You can refer to Omap35xxPkg\PciEmulation which produces PCI_IO protocol on arm 
board and try to build this driver and EDKII xHCI driver in your firmware to 
see if it works.

DMA issue mentioned by Andrew is the most likely to bring bugs as in most cases 
IA platforms are 1:1 mapping(identical) for host address and physical address 
(for example, DCBAAP should be filled with physical address rather than host 
address. As usually they are 1:1 mapping in IA platforms it will not bring 
issue even if we wrongly fill this register with host address) but ARM 
platforms aren't. 

EDKII xHCI driver has been enhanced to follow EFI DMA rule, so it should work 
on arm platforms with a fake PciEmulation driver. If not, it's welcome for your 
contribution/fix:)

Thanks
Feng

-----Original Message-----
From: Andrew Fish [mailto:af...@apple.com] 
Sent: Tuesday, July 7, 2015 5:39 AM
To: edk2-devel@lists.sourceforge.net
Subject: Re: [edk2] XHCI with ARM-v8 based platform


> On Jul 6, 2015, at 11:47 AM, Thomas Jacob <thomas.jacob.onl...@gmail.com> 
> wrote:
> 
> Hi All,
> 
> I am working on bringing up EDK-II on a ARM-v8 based platform. I was 
> wondering if somebody has already brought up XHCI controllers on such similar 
> platforms. If so, did you face any problems ?
> 

Thomas,

There are two generic problems:
1) Not all ARM systems have PCI, and most existing code assumes PCI (that is 
how PCs work). 
2) Bad DMA implementations. On x86 systems if code Violates the EFI DMA rules 
in a lot of cases you get lucky and it just works. 

DMA Bus Master Read Operation
--------------------------------------------
Call Map() for EfiPciIoOperationBusMasterRead.
Program the DMA Bus Master with the DeviceAddress returned by Map(). Start the 
DMA Bus Master.
Wait for DMA Bus Master to complete the read operation.
Call Unmap().

DMA Bus Master Write Operation
--------------------------------------------
Call Map() for EfiPciOperationBusMasterWrite.
Program the DMA Bus Master with the DeviceAddress returned by Map().
Start the DMA Bus Master.
Wait for DMA Bus Master to complete the write operation.
Perform a PCI controller specific read transaction to flush all PCI write 
buffers (See PCI Specification Section 3.2.5.2) .
Call Flush().
Call Unmap().

DMA Bus Master Common Buffer Operation
----------------------------------------------------------
Call AllocateBuffer() to allocate a common buffer.
Call Map() for EfiPciIoOperationBusMasterCommonBuffer.
Program the DMA Bus Master with the DeviceAddress returned by Map().
The common buffer can now be accessed equally by the processor and the DMA bus 
master. 
Call Unmap().
Call FreeBuffer().

Thanks,

Andrew Fish

> Regards,
> Thomas
> 
> ----------------------------------------------------------------------
> -------- Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that 
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/_________________________________________
> ______
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that you need 
to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to