linux-aspeed.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Eddie James <eajames@linux.ibm.com>
To: linux-aspeed@lists.ozlabs.org
Subject: Aspeed XDMA Engine Driver Interfaces (PCI communications with host)
Date: Tue, 29 Jan 2019 09:49:37 -0600	[thread overview]
Message-ID: <867a30d2-27c2-2c26-be72-959b6c01ebe0@linux.ibm.com> (raw)
In-Reply-To: <c3ab751d-d3a8-8491-3353-92ad91e73966@linux.vnet.ibm.com>



On 01/28/2019 03:50 PM, 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

Slight revision here; Drop the seek interface and just use the write 
call to specify the host address. Thanks Jeremy for pointing out that 
read/write are expected to increment the seek offset, so this would be 
confusing.

Eddie

>
> ??? 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
>


           reply	other threads:[~2019-01-29 15:49 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <c3ab751d-d3a8-8491-3353-92ad91e73966@linux.vnet.ibm.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=867a30d2-27c2-2c26-be72-959b6c01ebe0@linux.ibm.com \
    --to=eajames@linux.ibm.com \
    --cc=linux-aspeed@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).