]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
term/ns8250-spcr: Add one more 16550 debug type
authorUdo Steinberg <udo@hypervisor.org>
Fri, 7 Jun 2024 21:44:43 +0000 (23:44 +0200)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 20 Jun 2024 12:58:29 +0000 (14:58 +0200)
Type 0x01 was introduced with the ACPI DBGP table and type 0x12 was introduced
with the ACPI DBG2 table. Type 0x12 is used by the ACPI SPCR table on recent
AWS bare-metal instances (c6i/c7i). Also give each debug type a proper name.

Signed-off-by: Udo Steinberg <udo@hypervisor.org>
Reviewed-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/term/ns8250-spcr.c
include/grub/acpi.h

index d52b52c265613a90dac4d24df60b6c02b0c23595..4efaaf768ce518627f74aa80da31de8cd7b59baa 100644 (file)
@@ -38,7 +38,8 @@ grub_ns8250_spcr_init (void)
     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)
+      spcr->intf_type != GRUB_ACPI_SPCR_INTF_TYPE_16550_DBGP &&
+      spcr->intf_type != GRUB_ACPI_SPCR_INTF_TYPE_16550_DBG2)
     return NULL;
   /* For now, we only support byte accesses. */
   if (spcr->base_addr.access_size != GRUB_ACPI_GENADDR_SIZE_BYTE &&
index f2862da7421ad71d94de25b85f6260ac24c62352..1046f22d70e111861a75b95ef828c787a3efd391 100644 (file)
@@ -200,8 +200,9 @@ struct grub_acpi_genaddr {
 struct grub_acpi_spcr {
   struct grub_acpi_table_header hdr;
   grub_uint8_t intf_type;
-#define GRUB_ACPI_SPCR_INTF_TYPE_16550  0x00
-#define GRUB_ACPI_SPCR_INTF_TYPE_16550X 0x01
+#define GRUB_ACPI_SPCR_INTF_TYPE_16550      0x00
+#define GRUB_ACPI_SPCR_INTF_TYPE_16550_DBGP 0x01
+#define GRUB_ACPI_SPCR_INTF_TYPE_16550_DBG2 0x12
   grub_uint8_t reserved_0[3];
   struct grub_acpi_genaddr base_addr;
   grub_uint8_t interrupt_type;