[edk2-devel] [edk2-platforms PATCH] Platform/RaspberryPi: Fix miniuart base address and length

Adrien Thierry athierry at redhat.com
Tue Dec 14 22:49:00 UTC 2021


> 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



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#84835): https://edk2.groups.io/g/devel/message/84835
Mute This Topic: https://groups.io/mt/87501357/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list