All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Heiko Stübner" <heiko@sntech.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/3] bouncebuf: Add DMA validation check to addr_aligned().【请注意,邮件由u-boot-bounces@lists.denx.de代发】 addr_aligned().
Date: Thu, 04 Jul 2019 22:43:25 +0200	[thread overview]
Message-ID: <2220262.IZ0ZhdZ1cB@diego> (raw)
In-Reply-To: <bccfb338-4b62-3590-ceb9-0037595d5a5d@rock-chips.com>

Hi Simon,

Am Dienstag, 4. Juni 2019, 05:23:14 CEST schrieb Kever Yang:
> On 05/19/2019 12:08 AM, Simon Glass wrote:
> > On Tue, 7 May 2019 at 03:05, Christoph Muellner
> > <christoph.muellner@theobroma-systems.com> wrote:
> >> Currently addr_aligned() performs an alignment and a length check
> >> to validate the DMA address. However, some machines have stricter
> >> restrictions of DMA-able addresses.
> >>
> >> This patch adds a call to mach_addr_is_dmaable() to honor this
> >> machine specific restrictions.
> >>
> >> Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
> >> ---
> >>
> >>  common/bouncebuf.c | 6 ++++++
> >>  1 file changed, 6 insertions(+)
> > I feel like this should be handled with DM. Can we add a new method to
> > the DMA uclass to check an address? If not provided by the DMA driver,
> > we can assume the address is OK.
> 
> The DMA in MMC controller which is not stand alone, do not using the
> driver of DMA uclass, so I'm afraid this is not able to using DMA uclass
> for this address check.

were you able to consider Kever's response?

The issue bites us for example when the mmc-driver with its internal dma
does transfer atf loadables to the socs sram. There is no system dma
controller involved but so far we're experiencing this on _all_ Rockchip
socs that need multiple parts of the ATF be written to different memory
locations. (the sram code is obviously needed for suspend/resume).


Thanks
Heiko

  reply	other threads:[~2019-07-04 20:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-07  9:05 [U-Boot] [PATCH 1/3] board_f: Add mach specific DMA address check function Christoph Muellner
2019-05-07  9:05 ` [U-Boot] [PATCH 2/3] bouncebuf: Add DMA validation check to addr_aligned() Christoph Muellner
2019-05-07 13:05   ` Marek Vasut
2019-05-07 13:48     ` Christoph Müllner
2019-05-07 13:52       ` Christoph Müllner
2019-05-07 13:53         ` Marek Vasut
2019-05-07 14:01           ` Christoph Müllner
2019-05-07 15:04             ` Marek Vasut
2019-05-07 15:22               ` Christoph Müllner
2019-05-07 15:56                 ` Marek Vasut
2019-05-07 16:02                   ` Christoph Müllner
2019-05-18 16:08   ` Simon Glass
2019-06-04  3:23     ` [U-Boot] [PATCH 2/3] bouncebuf: Add DMA validation check to addr_aligned().【请注意,邮件由u-boot-bounces@lists.denx.de代发】 addr_aligned() Kever Yang
2019-07-04 20:43       ` Heiko Stübner [this message]
2019-07-06 17:16         ` Simon Glass
2019-07-06 18:04           ` Heiko Stuebner
2019-08-22 23:12             ` Heiko Stuebner
2019-05-07  9:05 ` [U-Boot] [PATCH 3/3] rk3399: Add restriction for DMA-able addresses Christoph Muellner
2019-06-04  3:07   ` Kever Yang
2019-06-04  3:09 ` [U-Boot] [PATCH 1/3] board_f: Add mach specific DMA address check function Kever Yang

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=2220262.IZ0ZhdZ1cB@diego \
    --to=heiko@sntech.de \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.