All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] term/serial: Continue processing SPCR table even if revision is < 2
@ 2023-07-26 21:02 Glenn Washburn
  2023-07-27  1:55 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 4+ messages in thread
From: Glenn Washburn @ 2023-07-26 21:02 UTC (permalink / raw)
  To: grub-devel, Daniel Kiper; +Cc: Benjamin Herrenschmidt, Glenn Washburn

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

Signed-off-by: Glenn Washburn <development@efficientek.com>
---
 grub-core/term/ns8250-spcr.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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 @@
 
 #if !defined(GRUB_MACHINE_IEEE1275) && !defined(GRUB_MACHINE_QEMU)
 
+#include <grub/misc.h>
 #include <grub/serial.h>
 #include <grub/ns8250.h>
 #include <grub/types.h>
@@ -34,7 +35,8 @@ grub_ns8250_spcr_init (void)
   if (spcr == NULL)
     return NULL;
   if (spcr->hdr.revision < 2)
-    return NULL;
+    grub_dprintf ("serial", "SPCR table revision %d < 2, continuing anyway\n",
+		  (int) spcr->hdr.revision);
   if (spcr->intf_type != GRUB_ACPI_SPCR_INTF_TYPE_16550 &&
       spcr->intf_type != GRUB_ACPI_SPCR_INTF_TYPE_16550X)
     return NULL;
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] term/serial: Continue processing SPCR table even if revision is < 2
  2023-07-26 21:02 [PATCH] term/serial: Continue processing SPCR table even if revision is < 2 Glenn Washburn
@ 2023-07-27  1:55 ` Benjamin Herrenschmidt
  2023-08-11 15:53   ` Daniel Kiper
  0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2023-07-27  1:55 UTC (permalink / raw)
  To: Glenn Washburn, grub-devel, Daniel Kiper

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."
> 
> Signed-off-by: Glenn Washburn <development@efficientek.com>

Reviewd-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

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.

> ---
>  grub-core/term/ns8250-spcr.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> 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 @@
>  
>  #if !defined(GRUB_MACHINE_IEEE1275) && !defined(GRUB_MACHINE_QEMU)
>  
> +#include <grub/misc.h>
>  #include <grub/serial.h>
>  #include <grub/ns8250.h>
>  #include <grub/types.h>
> @@ -34,7 +35,8 @@ grub_ns8250_spcr_init (void)
>    if (spcr == NULL)
>      return NULL;
>    if (spcr->hdr.revision < 2)
> -    return NULL;
> +    grub_dprintf ("serial", "SPCR table revision %d < 2, continuing
> anyway\n",
> +                 (int) spcr->hdr.revision);
>    if (spcr->intf_type != GRUB_ACPI_SPCR_INTF_TYPE_16550 &&
>        spcr->intf_type != GRUB_ACPI_SPCR_INTF_TYPE_16550X)
>      return NULL;



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] term/serial: Continue processing SPCR table even if revision is < 2
  2023-07-27  1:55 ` Benjamin Herrenschmidt
@ 2023-08-11 15:53   ` Daniel Kiper
  2023-08-14  3:12     ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Kiper @ 2023-08-11 15:53 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: Glenn Washburn, grub-devel

On Thu, Jul 27, 2023 at 11:55:30AM +1000, Benjamin Herrenschmidt wrote:
> 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."
> >
> > Signed-off-by: Glenn Washburn <development@efficientek.com>
>
> Reviewd-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>

> Note: We should also start using the new UART clock field when
> available (rev 3 or later) and precise baud rate (rev 4)

I think these should not be big changes. If you could make patches soon
then I would be willing include them in the upcoming GRUB release.

Daniel

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] term/serial: Continue processing SPCR table even if revision is < 2
  2023-08-11 15:53   ` Daniel Kiper
@ 2023-08-14  3:12     ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2023-08-14  3:12 UTC (permalink / raw)
  To: Daniel Kiper; +Cc: Glenn Washburn, grub-devel

On Fri, 2023-08-11 at 17:53 +0200, Daniel Kiper wrote:
> On Thu, Jul 27, 2023 at 11:55:30AM +1000, Benjamin Herrenschmidt wrote:
> > 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."
> > > 
> > > Signed-off-by: Glenn Washburn <development@efficientek.com>
> > 
> > Reviewd-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> 
> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
> 
> > Note: We should also start using the new UART clock field when
> > available (rev 3 or later) and precise baud rate (rev 4)
> 
> I think these should not be big changes. If you could make patches soon
> then I would be willing include them in the upcoming GRUB release.

I would be but I lack a firmware providing that information to test with...

Anybody has that ?

Cheers,
Ben.

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-08-14  3:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-26 21:02 [PATCH] term/serial: Continue processing SPCR table even if revision is < 2 Glenn Washburn
2023-07-27  1:55 ` Benjamin Herrenschmidt
2023-08-11 15:53   ` Daniel Kiper
2023-08-14  3:12     ` Benjamin Herrenschmidt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.