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