]>
Commit | Line | Data |
---|---|---|
42eedea9 | 1 | /** @file\r |
568eb0cb | 2 | ACPI Serial Port Console Redirection Table as defined by Microsoft in\r |
3 | http://www.microsoft.com/whdc/system/platform/server/spcr.mspx\r | |
4 | \r | |
4135253b | 5 | Copyright (c) 2007 - 2008, Intel Corporation\r |
568eb0cb | 6 | All rights reserved. This program and the accompanying materials \r |
7 | are licensed and made available under the terms and conditions of the BSD License \r | |
8 | which accompanies this distribution. The full text of the license may be found at \r | |
9 | http://opensource.org/licenses/bsd-license.php \r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
13 | **/\r | |
14 | \r | |
15 | #ifndef _SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_H_\r | |
16 | #define _SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_H_\r | |
17 | \r | |
ecc40942 | 18 | \r |
19 | #include <IndustryStandard/Acpi.h>\r | |
568eb0cb | 20 | \r |
1bc5d021 | 21 | ///\r |
22 | /// SPCR Revision (defined in spec)\r | |
23 | ///\r | |
568eb0cb | 24 | #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_REVISION 0x01\r |
25 | \r | |
54569f0f | 26 | //\r |
27 | // Ensure proper structure formats\r | |
28 | //\r | |
29 | #pragma pack(1)\r | |
1bc5d021 | 30 | ///\r |
4135253b | 31 | /// Serial Port Console Redirection Table Format\r |
1bc5d021 | 32 | ///\r |
568eb0cb | 33 | typedef struct {\r |
34 | EFI_ACPI_DESCRIPTION_HEADER Header;\r | |
35 | UINT8 InterfaceType;\r | |
36 | UINT8 Reserved1[3];\r | |
37 | EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE BaseAddress;\r | |
38 | UINT8 InterruptType;\r | |
39 | UINT8 Irq;\r | |
40 | UINT32 GlobalSystemInterrupt;\r | |
41 | UINT8 BaudRate;\r | |
42 | UINT8 Parity;\r | |
43 | UINT8 StopBits;\r | |
44 | UINT8 FlowControl;\r | |
45 | UINT8 TerminalType;\r | |
46 | UINT8 Language;\r | |
47 | UINT16 PciDeviceId;\r | |
48 | UINT16 PciVendorId;\r | |
49 | UINT8 PciBusNumber;\r | |
50 | UINT8 PciDeviceNumber;\r | |
51 | UINT8 PciFunctionNumber;\r | |
52 | UINT32 PciFlags;\r | |
53 | UINT8 PciSegment;\r | |
54 | UINT32 Reserved2;\r | |
55 | } EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE;\r | |
568eb0cb | 56 | #pragma pack()\r |
568eb0cb | 57 | \r |
58 | //\r | |
59 | // SPCR Definitions\r | |
60 | //\r | |
61 | \r | |
62 | //\r | |
63 | // Interface Type\r | |
64 | //\r | |
4135253b | 65 | \r |
66 | ///\r | |
67 | /// Full 16550 interface\r | |
68 | ///\r | |
568eb0cb | 69 | #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_16550 0\r |
4135253b | 70 | ///\r |
71 | /// Full 16450 interface\r | |
72 | ///\r | |
568eb0cb | 73 | #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_16450 1\r |
74 | \r | |
75 | //\r | |
76 | // Interrupt Type\r | |
77 | //\r | |
4135253b | 78 | \r |
79 | ///\r | |
80 | /// PC-AT-compatible dual-8259 IRQ interrupt\r | |
81 | ///\r | |
568eb0cb | 82 | #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERRUPT_TYPE_8259 0x1\r |
4135253b | 83 | ///\r |
84 | /// I/O APIC interrupt (Global System Interrupt)\r | |
85 | ///\r | |
568eb0cb | 86 | #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERRUPT_TYPE_APIC 0x2\r |
4135253b | 87 | ///\r |
88 | /// I/O SAPIC interrupt (Global System Interrupt)\r | |
89 | ///\r | |
568eb0cb | 90 | #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERRUPT_TYPE_SAPIC 0x4\r |
91 | \r | |
92 | //\r | |
93 | // Baud Rate\r | |
94 | //\r | |
95 | #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_BAUD_RATE_9600 3\r | |
96 | #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_BAUD_RATE_19200 4\r | |
97 | #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_BAUD_RATE_57600 5\r | |
98 | #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_BAUD_RATE_115200 6\r | |
99 | \r | |
100 | //\r | |
101 | // Parity\r | |
102 | //\r | |
103 | #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_PARITY_NO_PARITY 0\r | |
104 | \r | |
105 | //\r | |
106 | // Stop Bits\r | |
107 | //\r | |
108 | #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_STOP_BITS_1 1\r | |
109 | \r | |
110 | //\r | |
111 | // Flow Control\r | |
112 | //\r | |
4135253b | 113 | \r |
114 | ///\r | |
115 | /// DCD required for transmit\r | |
116 | ///\r | |
568eb0cb | 117 | #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_FLOW_CONTROL_DCD 0x1\r |
4135253b | 118 | ///\r |
119 | /// RTS/CTS hardware flow control\r | |
120 | ///\r | |
568eb0cb | 121 | #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_FLOW_CONTROL_RTS_CTS 0x2\r |
4135253b | 122 | ///\r |
123 | /// XON/XOFF software control\r | |
124 | ///\r | |
568eb0cb | 125 | #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_FLOW_CONTROL_XON_XOFF 0x4\r |
126 | \r | |
127 | //\r | |
128 | // Terminal Type\r | |
129 | //\r | |
130 | #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_TERMINAL_TYPE_VT100 0\r | |
131 | #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_TERMINAL_TYPE_VT100_PLUS 1\r | |
132 | #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_TERMINAL_TYPE_VT_UTF8 2\r | |
133 | #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_TERMINAL_TYPE_ANSI 3\r | |
134 | \r | |
135 | #endif\r |