summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2023-06-07 12:12:45 +0200
committerLean Sheng Tan <sheng.tan@9elements.com>2023-06-09 13:48:44 +0000
commite7aaf04cf5a3d3d679de5f7949a374deed5ec37b (patch)
treede06b55097ccbda1ff4b91a3db78ddfb1a7f2251 /src/include
parentc3ff7d6900d0ff892360222de486fd6da1930913 (diff)
acpi: Add struct for SPCR table
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Change-Id: I46d5caa0af95ec27fd49b0cf8fa704d656c89e7e Reviewed-on: https://review.coreboot.org/c/coreboot/+/75684 Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/acpi/acpi.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/include/acpi/acpi.h b/src/include/acpi/acpi.h
index 78a6005a7d..548b4c3e63 100644
--- a/src/include/acpi/acpi.h
+++ b/src/include/acpi/acpi.h
@@ -1298,6 +1298,36 @@ typedef struct acpi_einj {
acpi_einj_action_table_t action_table[ACTION_COUNT];
} __packed acpi_einj_t;
+/* SPCR (Serial Port Console Redirection Table) */
+typedef struct acpi_spcr {
+ acpi_header_t header;
+ uint8_t interface_type;
+ uint8_t reserved[3];
+ acpi_addr_t base_address;
+ uint8_t interrupt_type;
+ uint8_t irq;
+ uint32_t global_system_interrupt;
+ uint8_t configured_baudrate;
+ uint8_t parity;
+ uint8_t stop_bits;
+ uint8_t flow_control;
+ uint8_t terminal_type;
+ uint8_t language;
+ uint16_t pci_did;
+ uint16_t pci_vid;
+ uint8_t pci_bus;
+ uint8_t pci_dev;
+ uint8_t pci_fun;
+ uint32_t pci_flags;
+ uint8_t pci_segment;
+ uint32_t uart_clock;
+ uint32_t precise_baud_rate;
+ uint16_t namespace_string_length;
+ uint16_t namespace_string_offset;
+ char namespacestring[];
+} __packed acpi_spcr_t;
+_Static_assert(sizeof(acpi_spcr_t) == 88, "acpi_spcr_t must have an 88 byte size\n");
+
uintptr_t get_coreboot_rsdp(void);
void acpi_create_einj(acpi_einj_t *einj, uintptr_t addr, u8 actions);