Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1qOqGA-0006Zn-Hc for mharc-grub-devel@gnu.org; Wed, 26 Jul 2023 21:57:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qOqG7-0006YM-VH for grub-devel@gnu.org; Wed, 26 Jul 2023 21:57:43 -0400 Received: from gate.crashing.org ([63.228.1.57]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qOqG4-0000hw-Fz for grub-devel@gnu.org; Wed, 26 Jul 2023 21:57:42 -0400 Received: from [IPv6:::1] (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 36R1tUS3002802; Wed, 26 Jul 2023 20:55:31 -0500 Message-ID: <88f2bd83ab134e95850e66c20062e9a3fc9b8d64.camel@kernel.crashing.org> Subject: Re: [PATCH] term/serial: Continue processing SPCR table even if revision is < 2 From: Benjamin Herrenschmidt To: Glenn Washburn , grub-devel@gnu.org, Daniel Kiper Date: Thu, 27 Jul 2023 11:55:30 +1000 In-Reply-To: <20230726210236.1393757-1-development@efficientek.com> References: <20230726210236.1393757-1-development@efficientek.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4-0ubuntu1 MIME-Version: 1.0 Received-SPF: pass client-ip=63.228.1.57; envelope-from=benh@kernel.crashing.org; helo=gate.crashing.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Jul 2023 01:57:44 -0000 On Wed, 2023-07-26 at 16:02 -0500, Glenn Washburn wrote: > According to commit 0231d00082 ("ACPI: SPCR: Make SPCR available to > x86") > to the Linux kernel, "On x86, many systems have a valid SPCR table > but the > table version is not 2 so the table version check must be a warning." >=20 > Signed-off-by: Glenn Washburn Reviewd-by: Benjamin Herrenschmidt Note: We should also start using the new UART clock field when available (rev 3 or later) and precise baud rate (rev 4) Cheers, Ben. > --- > =C2=A0grub-core/term/ns8250-spcr.c | 4 +++- > =C2=A01 file changed, 3 insertions(+), 1 deletion(-) >=20 > diff --git a/grub-core/term/ns8250-spcr.c b/grub-core/term/ns8250- > spcr.c > index d101bffb512d..d52b52c26561 100644 > --- a/grub-core/term/ns8250-spcr.c > +++ b/grub-core/term/ns8250-spcr.c > @@ -18,6 +18,7 @@ > =C2=A0 > =C2=A0#if !defined(GRUB_MACHINE_IEEE1275) && !defined(GRUB_MACHINE_QEMU) > =C2=A0 > +#include > =C2=A0#include > =C2=A0#include > =C2=A0#include > @@ -34,7 +35,8 @@ grub_ns8250_spcr_init (void) > =C2=A0=C2=A0 if (spcr =3D=3D NULL) > =C2=A0=C2=A0=C2=A0=C2=A0 return NULL; > =C2=A0=C2=A0 if (spcr->hdr.revision < 2) > -=C2=A0=C2=A0=C2=A0 return NULL; > +=C2=A0=C2=A0=C2=A0 grub_dprintf ("serial", "SPCR table revision %d < 2, = continuing > anyway\n", > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 (int) spcr->hdr.revision); > =C2=A0=C2=A0 if (spcr->intf_type !=3D GRUB_ACPI_SPCR_INTF_TYPE_16550 && > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 spcr->intf_type !=3D GRUB_ACPI_SPCR_= INTF_TYPE_16550X) > =C2=A0=C2=A0=C2=A0=C2=A0 return NULL;