public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ard Biesheuvel" <ardb@kernel.org>
To: Andrei Warkentin <awarkentin@vmware.com>
Cc: Jeremy Linton <jeremy.linton@arm.com>,
	jlinton <lintonrjeremy@gmail.com>,
	 "devel@edk2.groups.io" <devel@edk2.groups.io>,
	Peter Batard <pete@akeo.ie>,
	 Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@arm.com>,
	Leif Lindholm <leif@nuviainc.com>,
	 Ard Biesheuvel <ardb+tianocore@kernel.org>
Subject: Re: [PATCH v3 0/4] RPi: SD/WiFi ACPI updates
Date: Wed, 17 Feb 2021 09:08:28 +0100	[thread overview]
Message-ID: <CAMj1kXHtT8EWorru1XBH03LFWu-evOuUWN=3_UJX-bBzNwNMSw@mail.gmail.com> (raw)
In-Reply-To: <SN7PR05MB7582C17CF48EAD8DD54F0123B9869@SN7PR05MB7582.namprd05.prod.outlook.com>

On Wed, 17 Feb 2021 at 08:59, Andrei Warkentin <awarkentin@vmware.com> wrote:
>
> I'm not sure I truly follow the conversation you're having (sorry), but I'll raise my hand as a _DMA user. I'm not that married to it, but I haven't added support for the alternate IORT-based DMA range clamping. If long term we want to bail on _DMA and adopt IORT exclusively, I'd love to know that so I can plan accordingly...
>

SBSA requires that all memory is DMA addressable by all non-secure
masters, but Linux/arm64 can deal with systems that violate this
requirement, as long as the DMA limit is 4 GB or higher. The reason is
that the memory region from which bounce buffers are allocated is
created early during boot, and is allocated in the first 4 GB of
memory.

For devices such as RPi4, we have relaxed this requirement somewhat
when booting Linux/arm64 in ACPI mode, by adding an early IORT scan
that finds the smallest DMA limit, and using that limit for the bounce
buffer region if it is smaller than 4 GB. (At this point during the
boot, the AML interpreter is not up and running yet)

On Linux, the _DMA method supersedes the IORT limit, and so the IORT
limit is only used for sizing the bounce buffer region, and we get the
full 3GB range for XHCI.

In this particular case, I'd assume there is no ambiguity if the IORT
and the _DMA method both produce the same 1 GB DMA limit.

  reply	other threads:[~2021-02-17  8:08 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-17  6:18 [PATCH v3 0/4] RPi: SD/WiFi ACPI updates jlinton
2021-02-17  6:18 ` [PATCH v3 1/4] Platform/RaspberryPi: Add Negative table check jlinton
2021-02-17  6:18 ` [PATCH v3 2/4] Platform/RaspberryPi/Acpitables: Add eMMC2 device and tweak Arasan jlinton
2021-02-17  6:18 ` [PATCH v3 3/4] Platform/RaspberryPi: User control of eMMC2 DMA jlinton
2021-02-17  6:18 ` [PATCH v3 4/4] Platform/RaspberryPi: Invert default Arasan, eMMC2 routing jlinton
2021-02-17  6:56 ` [PATCH v3 0/4] RPi: SD/WiFi ACPI updates Ard Biesheuvel
2021-02-17  7:30   ` Jeremy Linton
2021-02-17  7:55     ` Ard Biesheuvel
2021-02-17  7:59       ` Andrei Warkentin
2021-02-17  8:08         ` Ard Biesheuvel [this message]
2021-02-17 17:16       ` [edk2-devel] " Jeremy Linton
2021-02-17 17:57         ` Ard Biesheuvel
2021-02-18 16:47           ` Jeremy Linton
2021-02-18 16:52             ` Ard Biesheuvel
2021-02-18 19:44               ` Jeremy Linton
2021-02-18 18:49 ` Ard Biesheuvel
2021-02-19 16:51   ` Jeremy Linton
2021-02-20 14:38     ` Ard Biesheuvel

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-list 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='CAMj1kXHtT8EWorru1XBH03LFWu-evOuUWN=3_UJX-bBzNwNMSw@mail.gmail.com' \
    --to=devel@edk2.groups.io \
    /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