2 * Copyright (c) 2020, Rebecca Cran <rebecca@bsdio.com>
3 * Copyright (c) 2015, Nahanni Systems, Inc.
5 * SPDX-License-Identifier: BSD-2-Clause-Patent
10 #define EFI_ACPI_OEM_TABLE_ID SIGNATURE_64('B','V','S','P','C','R',' ',' ')
12 EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE SPCR = {
14 EFI_ACPI_2_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE,
15 sizeof (EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE),
16 EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_REVISION,
17 0, // to make sum of entire table == 0
18 {EFI_ACPI_OEM_ID}, // OEMID is a 6 bytes long field
19 EFI_ACPI_OEM_TABLE_ID, // OEM table identification(8 bytes long)
20 EFI_ACPI_OEM_REVISION, // OEM revision number
21 EFI_ACPI_CREATOR_ID, // ASL compiler vendor ID
22 EFI_ACPI_CREATOR_REVISION // ASL compiler revision number
24 EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_16550,
27 0x01, // AddressSpaceId
28 0x08, // RegisterBitWidth
29 0x00, // RegisterBitOffset
31 0x03F8 // Address (COM1)
33 EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERRUPT_TYPE_8259,
35 0, // GlobalSystemInterrupt
36 EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_BAUD_RATE_115200,
37 EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_PARITY_NO_PARITY,
38 EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_STOP_BITS_1,
39 0x03, // FlowControl: RTS/CTS | DCD
40 EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_TERMINAL_TYPE_VT_UTF8,
46 0, // PciFunctionNumber
59 // Reference the table being generated to prevent the optimizer from removing the
60 // data structure from the exeutable