Aspeed XDMA Engine Driver Interfaces (PCI communications with host)

Brad Bishop bradleyb at fuzziesquirrel.com
Tue Jan 29 13:32:28 AEDT 2019


On Mon, Jan 28, 2019 at 03:50:57PM -0600, Eddie James wrote:
> Hi,
> 
> I'm working on a driver for the XDMA engine to enable DMA operations between
> the host and the BMC. I thought I'd get up a proposal for the interfaces to
> get some feedback.
> 
> Driver provides one or two simple read/write file handles under /dev/,
> depending on whether or not we're restricted to using the VGA memory only.
> 
> /dev/xdma:
> 
>     seek: user sets the host DMA address
> 
>     write: user provides the BMC address and specifies the operation type
> ("upstream", meaning from the BMC to the host, or "downstream", meaning from
> the host to the BMC). If we're using only VGA memory, the BMC address can be
> skipped, as it will always be from/to the VGA space.
> 
>     read: the syscall blocks or returns EAGAIN until the operation is
> complete
> 
> If we only use VGA memory, we need another device to interact with that
> memory space easily, as well as prevent multiple users overwriting each
> others data. VGA memory space is configurable by HW strap on the Aspeed
> between 8 and 64MB, but is 16MB by default.
> 
> /dev/xdma-buffer:
> 
>     open/close: lock access to the memory
> 
>     read/write: read or write the VGA memory
> 
> Locking access in this way is quite a limitation, but I'm not sure how else
> to guarantee user's data is OK...
> 
> Suggestions are very welcome, on all aspects of the design.
> 
> Thanks,
> 
> Eddie

Hi Eddie

There is a linux-aspeed list:

https://lists.ozlabs.org/pipermail/linux-aspeed/

It might make sense to copy that list too.

-brad


More information about the openbmc mailing list