From: "Adrien Thierry" <athierry@redhat.com>
To: Jeremy Linton <jeremy.linton@arm.com>
Cc: Andrei Warkentin <awarkentin@vmware.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>,
Ard Biesheuvel <ardb@kernel.org>, Pete Batard <pete@akeo.ie>,
Ard Biesheuvel <ardb+tianocore@kernel.org>,
Leif Lindholm <leif@nuviainc.com>
Subject: Re: [edk2-devel] [edk2-platforms PATCH] Platform/RaspberryPi: Fix miniuart base address and length
Date: Tue, 14 Dec 2021 17:49:00 -0500 [thread overview]
Message-ID: <YbkfXGHyCk8oqLGu@fedora> (raw)
In-Reply-To: <737961b2-c92d-9d47-46eb-0631a08a2bbc@arm.com>
> The Raspberry Pi support in edk2-platforms, including ACPI, is a direct ancestor of the original ms-iot tree (https://github.com/ms-iot/RPi-UEFI, by way of https://github.com/andreiw/RaspberryPiPkg).
> The way the miniUART is described in ACPI came from Microsoft. Microsoft introduced DBG2/SPCR type 0x10 (https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/acpi-debug-port-table) and the BCM2836 _HID to describe the miniUART, and the contract is that the base address includes all those crazy registers.
>
> To the best of my knowledge, today there isn't any other way to correctly describe the miniUART in a DBG2, SPCR or DSDT. Moreover, because there's code out there in at least two operating systems coded against these specific definitions, you don't get to change how a _HID == BCM2836 device or SPCR/DBG2 type 0x10 is described.
Thanks for your feedback!
I only had Linux in mind and didn't think about the other implementations
that would break. Thank you for stating the historical reasons why things
are set that way, I better understand now and see why this patch wouldn't
be such a great idea.
> I guess I wasn't clear, I wasn't suggesting we change the existing
> mechanism, so yes, I agree we either need another mechanism, or linux is
> going to have to deal with it as is. The latter is IMHO the best option
> (and as I mentioned I have patches to make it work), but sort of moves
> us away from the standard uart/etc mechanisms we want for systemready.
> So in that regard its not ideal.
I'm very interested to play with your patches if you could send them :)
I've been trying to add ACPI support to the miniuart Linux driver, and
stumbled across two issues:
- the miniuart base address "off by 0x40" in the DSDT (the subject of
this thread)
- how to properly get the clock rate with ACPI
Ideally, the end goal would be to have both the serial console and BT
working with the miniuart.
Adrien
next prev parent reply other threads:[~2021-12-14 22:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-03 17:32 [edk2-platforms PATCH] Platform/RaspberryPi: Fix miniuart base address and length athierry
2021-12-13 14:54 ` Adrien Thierry
2021-12-13 15:14 ` Ard Biesheuvel
2021-12-13 19:17 ` Andrei Warkentin
2021-12-14 5:39 ` [edk2-devel] " Jeremy Linton
2021-12-14 6:21 ` Andrei Warkentin
2021-12-14 13:35 ` Samer El-Haj-Mahmoud
2021-12-14 16:42 ` Jeremy Linton
2021-12-14 22:49 ` Adrien Thierry [this message]
2021-12-15 23:53 ` Jeremy Linton
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=YbkfXGHyCk8oqLGu@fedora \
--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