public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 1/3] net: designware: fix descriptor layout and warnings on 64-bit archs
Date: Mon, 18 Apr 2016 23:52:17 +0200	[thread overview]
Message-ID: <57155711.1000501@suse.de> (raw)
In-Reply-To: <20160418213840.GA3707@gmail.com>



On 18.04.16 23:38, Beniamino Galvani wrote:
> On Mon, Apr 18, 2016 at 01:06:37PM +0200, Alexander Graf wrote:
>> Hmm, this is going to get very interesting with efi_loader support. By
>> default we allocate memory at the highest possible free address, so payloads
>> will probably (unless they specify limits) have their buffers above 32bit on
>> this platform. If we now deny any DMA to them, we basically break I/O
>> access.
> 
> I'm not familiar with efi_loader, but on this platform the physical
> RAM is within the 32bit memory range, so I don't think a workaround is
> needed. And I guess probably it's the same for the other 64bit ARM SoC
> using this driver.

So if RAM is always within the lower 32bits, then we don't have a problem.

> BTW, I see that another driver (sunxi_mmc) also truncates the upper 32
> bits of addresses on 64bit platforms. Maybe this issue should be
> addresses in a generic way?

The only 64bit sunxi platform (A64) also only has 32bit physical RAM
addresses.

>> Could you by any chance just use a bounce buffer?
> 
> Do you have any suggestions on how to do it? Are there any primitives
> in u-boot to request memory from low addresses?

Thinking about this I don't think we have the memory reservation
logistics to maintain a good bounce buffer. You could create a global
array in bss that you read to / write from, but I'm not sure it's really
worth it.

At the end of the day, if you know that your platform can only ever do
32bit DMA to a physical address range that's only 32bits, it's perfectly
ok IMHO.

We only have a problem if you have a platform that has RAM above 4G and
can only do DMA to 32bit addresses.


Alex

  reply	other threads:[~2016-04-18 21:52 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-17  7:48 [U-Boot] [PATCH v4 0/3] Amlogic Meson GXBaby and ODROID-C2 support Beniamino Galvani
2016-04-17  7:48 ` [U-Boot] [PATCH v4 1/3] net: designware: fix descriptor layout and warnings on 64-bit archs Beniamino Galvani
2016-04-17  9:56   ` Marek Vasut
2016-04-17 11:14     ` Beniamino Galvani
2016-04-17 20:59       ` Marek Vasut
2016-04-18 10:57         ` Beniamino Galvani
2016-04-18 11:06           ` Alexander Graf
2016-04-18 21:38             ` Beniamino Galvani
2016-04-18 21:52               ` Alexander Graf [this message]
2016-04-25 21:43           ` Joe Hershberger
2016-04-18 11:55   ` Andreas Färber
2016-04-18 22:05     ` Beniamino Galvani
2016-04-17  7:48 ` [U-Boot] [PATCH v4 2/3] arm: add initial support for Amlogic Meson and ODROID-C2 Beniamino Galvani
2016-04-17  7:48 ` [U-Boot] [PATCH v4 3/3] arm: meson: implement calls to secure monitor Beniamino Galvani
2016-04-17  9:48   ` Alexander Graf
2016-04-18 21:50     ` Beniamino Galvani
2016-04-17 10:00   ` Marek Vasut
2016-04-18 21:52     ` Beniamino Galvani

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=57155711.1000501@suse.de \
    --to=agraf@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox