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