public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Andrei Warkentin" <awarkentin@vmware.com>
To: Ard Biesheuvel <ardb@kernel.org>, Jeremy Linton <jeremy.linton@arm.com>
Cc: 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 07:59:21 +0000	[thread overview]
Message-ID: <SN7PR05MB7582C17CF48EAD8DD54F0123B9869@SN7PR05MB7582.namprd05.prod.outlook.com> (raw)
In-Reply-To: <CAMj1kXEG8WKmBt_60W=wupsrv6=t5fz_iM0NUx+bJG+YJCkRJg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4905 bytes --]

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

A
________________________________
From: Ard Biesheuvel <ardb@kernel.org>
Sent: Wednesday, February 17, 2021 1:55 AM
To: Jeremy Linton <jeremy.linton@arm.com>
Cc: jlinton <lintonrjeremy@gmail.com>; devel@edk2.groups.io <devel@edk2.groups.io>; Peter Batard <pete@akeo.ie>; Andrei Warkentin <awarkentin@vmware.com>; 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

On Wed, 17 Feb 2021 at 08:30, Jeremy Linton <jeremy.linton@arm.com> wrote:
>
> Hi,
>
> On 2/17/21 12:56 AM, Ard Biesheuvel wrote:
> > On Wed, 17 Feb 2021 at 07:18, jlinton <lintonrjeremy@gmail.com> wrote:
> >>
> >> From: Jeremy Linton <jeremy.linton@arm.com>
> >>
> >> The existing RPi3 ACPI entries for the Arasan
> >> and SDHCI controllers need updating to work
> >> with the RPi4. This is done by adding a caps
> >> override for the legacy Arasan controller and
> >> then adding an entirely new entry for the newer
> >> eMMC2 controller.
> >>
> >> Then we flip the default routing to make the eMMC2
> >> the default for the SD card, so that the WiFi can
> >> start working on the Arasan.
> >>
> >> Additional we add a menu item to enable the SDMA/ADMA2
> >> modes on the controller.
> >>
> >> v2->v3: Various small review tweaks, whitespace, wording
> >>              spelling, etc.
> >>
> >
> > What happened to the IORT change? Don't we need that to ensure that
> > Linux sizes ZONE_DMA appropriately?
>
> Ha, I gave up! There are more important things to fix, especially when I
> found another case that couldn't just be fixed by the IORT tweaking
> without more kernel patches.
>

Which case is that?


> The default in this set is PIO mode, no DMA, same as the Arasan. If I
> get motivated (or someone else does) they can pick up the pieces to
> finish turning the DMA on in linux. It also simplifies that IORT disable
> patch I posted separately since I don't have to worry about enabling it
> for a limit <2G.
>

But having a 1 GB limit for only the eMMC2 in the IORT and a matching
_DMA method in its container should not trigger this error, I'd
assume.

> The sdhci_caps_mask choice is what flags the device as not supporting
> DMA modes unless the user enables it. Yes this hurts perf, but not
> nearly as badly as disabling UHS mode because we can't lower the card
> voltage with the standard sdhci registers (rather having to depend on a
> nonstandard rpi mailbox call which isn't available without a _DSM() or
> something equally undesirable).
>

Are you saying switching to the Arasan disabled UHS mode, and this is
why this is an improvement nonetheless?

> Presumably windows, *bsd, etc could make some use of the _DMA in the
> SSDT as well.
>

I don't think Windows uses _DMA, but I am mostly interested in Linux
in any case. Modulo the 'other case' above, I don't think this is the
approach I would prefer tbh.

Thanks,
Ard.


>
> >
> >
> >> v1->v2: Add option for user to enable/disable eMMC DMA
> >>          Only enable the emmc2 table on rpi4 &
> >>              !Arasan routing
> >>          Move emmc2 into its own SSDT and drop
> >>              second _DMA entry
> >>
> >> Jeremy Linton (4):
> >>    Platform/RaspberryPi: Add Negative table check
> >>    Platform/RaspberryPi/Acpitables: Add eMMC2 device and tweak Arasan
> >>    Platform/RaspberryPi: User control of eMMC2 DMA
> >>    Platform/RaspberryPi: Invert default Arasan, eMMC2 routing
> >>
> >>   Platform/RaspberryPi/AcpiTables/AcpiTables.inf     |   1 +
> >>   Platform/RaspberryPi/AcpiTables/Emmc.asl           | 129 +++++++++++++++++++++
> >>   Platform/RaspberryPi/AcpiTables/Sdhc.asl           |  18 ++-
> >>   Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c |  26 +++++
> >>   .../RaspberryPi/Drivers/ConfigDxe/ConfigDxe.inf    |   1 +
> >>   .../RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.uni |   4 +
> >>   .../RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.vfr |  17 +++
> >>   Platform/RaspberryPi/Include/ConfigVars.h          |   8 ++
> >>   Platform/RaspberryPi/RPi3/RPi3.dsc                 |   1 +
> >>   Platform/RaspberryPi/RPi4/RPi4.dsc                 |   3 +-
> >>   Platform/RaspberryPi/RPi4/Readme.md                |   2 +-
> >>   Platform/RaspberryPi/RaspberryPi.dec               |   1 +
> >>   12 files changed, 206 insertions(+), 5 deletions(-)
> >>   create mode 100644 Platform/RaspberryPi/AcpiTables/Emmc.asl
> >>
> >> --
> >> 2.13.7
> >>
>

[-- Attachment #2: Type: text/html, Size: 7956 bytes --]

  reply	other threads:[~2021-02-17  7:59 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 [this message]
2021-02-17  8:08         ` Ard Biesheuvel
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=SN7PR05MB7582C17CF48EAD8DD54F0123B9869@SN7PR05MB7582.namprd05.prod.outlook.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