term/serial: Continue processing SPCR table even if revision is < 2
PATCH 1/1 term/serial: Continue processing SPCR table even if revision is < 2
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."
--- grub-core/term/ns8250-spcr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
grub-core/term/ns8250-spcr.c +3 -1
@@ -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 ;
Signature · 1 line
2.34.1
Quoted 7 lines · 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 <[email protected]>
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.
Quoted 28 lines
---
grub-core/term/ns8250-spcr.c | 4 +++-1 file changed, 3 insertions(+), 1 deletion(-)grub-core/term/ns8250- renamed from grub-core/term/ns8250-spcr.c +0
-0
spcr.c
indexd101bffb512d..d52b52c26561100644grub-core/term/ns8250-spcr.c +0
-0@@ -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>grub-core/term/ns8250-spcr.c +2
-1@@ -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;
Daniel Kiper
Reviewed-byQuoted 10 lines · Benjamin Herrenschmidt
Quoted 7 lines · 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 <[email protected]>Reviewd-by Benjamin Herrenschmidt <[email protected]>
Quoted 2 lines
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
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
Quoted 12 lines · Daniel Kiper
Quoted 10 lines · Benjamin Herrenschmidt
Quoted 7 lines · 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 <[email protected]>Reviewd-by Benjamin Herrenschmidt <[email protected]>
Quoted 7 lines
Reviewed-by Daniel Kiper <[email protected]>Quoted 2 lines
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
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel