Re: git: 2f3f867ac6dd - main - ACPI: Add ACPI_Q_AEI_NOPULL quirk and use in EC2

From: Jessica Clarke <jrtc27_at_freebsd.org>
Date: Sat, 26 Oct 2024 02:41:19 UTC
On 26 Oct 2024, at 03:35, Colin Percival <cperciva@FreeBSD.org> wrote:
> 
> The branch main has been updated by cperciva:
> 
> URL: https://cgit.FreeBSD.org/src/commit/?id=2f3f867ac6dd7ff3769366b828b79c44b38828e1
> 
> commit 2f3f867ac6dd7ff3769366b828b79c44b38828e1
> Author:     Colin Percival <cperciva@FreeBSD.org>
> AuthorDate: 2024-10-22 14:47:30 +0000
> Commit:     Colin Percival <cperciva@FreeBSD.org>
> CommitDate: 2024-10-26 02:34:56 +0000
> 
>    ACPI: Add ACPI_Q_AEI_NOPULL quirk and use in EC2
> 
>    AWS Graviton [1234] systems have a bug in their ACPI where they mark
>    the PL061's GPIO pins as needing to be configured in PullUp mode (in
>    fact the PL061 has no pullup/pulldown resistors); this flag needs to
>    be removed in order for _AEI objects to be handled on these systems.
> 
>    Reviewed by:    Ali Saidi
>    MFC after:      1 week
>    Sponsored by:   Amazon
>    Differential Revision:  https://reviews.freebsd.org/D47239
> ---
> release/tools/ec2.conf   | 5 +++++
> sys/dev/acpica/acpivar.h | 3 +++
> 2 files changed, 8 insertions(+)
> 
> diff --git a/release/tools/ec2.conf b/release/tools/ec2.conf
> index 54eb0b0b8060..ea61c2fa6db9 100644
> --- a/release/tools/ec2.conf
> +++ b/release/tools/ec2.conf
> @@ -70,6 +70,11 @@ ec2_common() {
> # nodes, but apply the workaround just in case.
> echo 'hw.broken_txfifo="1"' >> ${DESTDIR}/boot/loader.conf
> 
> + # Graviton 1 through Graviton 4 have a bug in their ACPI where they
> + # mark the PL061's pins as needing to be configured in PullUp mode
> + # (in fact the PL061 has no pullup/pulldown resistors).
> + echo 'debug.acpi.quirks="8"' >> ${DESTDIR}/boot/loader.conf

Should this not be restricted to arm64 in case it affects something on
amd64? Also, is there no way to be able to dynamically set this at run
time based on some _HID or similar? Requiring quirks in loader.conf in
order to get a working system is less than ideal, especially if
anyone’s trying to produce their own image, or updating an existing
system (whether via freebsd-update, pkg or make).

Jess