]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.h
remove un-necessary #pragma pack(1) and clean up doxgen format.
[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 - 2008, Intel Corporation
6 All rights reserved. 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 /// SPCR Revision (defined in spec)
23 ///
24 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_REVISION 0x01
25
26 //
27 // Ensure proper structure formats
28 //
29 #pragma pack(1)
30 ///
31 /// Serial Port Console Redirection Table Format
32 ///
33 typedef struct {
34 EFI_ACPI_DESCRIPTION_HEADER Header;
35 UINT8 InterfaceType;
36 UINT8 Reserved1[3];
37 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE BaseAddress;
38 UINT8 InterruptType;
39 UINT8 Irq;
40 UINT32 GlobalSystemInterrupt;
41 UINT8 BaudRate;
42 UINT8 Parity;
43 UINT8 StopBits;
44 UINT8 FlowControl;
45 UINT8 TerminalType;
46 UINT8 Language;
47 UINT16 PciDeviceId;
48 UINT16 PciVendorId;
49 UINT8 PciBusNumber;
50 UINT8 PciDeviceNumber;
51 UINT8 PciFunctionNumber;
52 UINT32 PciFlags;
53 UINT8 PciSegment;
54 UINT32 Reserved2;
55 } EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE;
56 #pragma pack()
57
58 //
59 // SPCR Definitions
60 //
61
62 //
63 // Interface Type
64 //
65
66 ///
67 /// Full 16550 interface
68 ///
69 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_16550 0
70 ///
71 /// Full 16450 interface
72 ///
73 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_16450 1
74
75 //
76 // Interrupt Type
77 //
78
79 ///
80 /// PC-AT-compatible dual-8259 IRQ interrupt
81 ///
82 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERRUPT_TYPE_8259 0x1
83 ///
84 /// I/O APIC interrupt (Global System Interrupt)
85 ///
86 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERRUPT_TYPE_APIC 0x2
87 ///
88 /// I/O SAPIC interrupt (Global System Interrupt)
89 ///
90 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERRUPT_TYPE_SAPIC 0x4
91
92 //
93 // Baud Rate
94 //
95 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_BAUD_RATE_9600 3
96 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_BAUD_RATE_19200 4
97 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_BAUD_RATE_57600 5
98 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_BAUD_RATE_115200 6
99
100 //
101 // Parity
102 //
103 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_PARITY_NO_PARITY 0
104
105 //
106 // Stop Bits
107 //
108 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_STOP_BITS_1 1
109
110 //
111 // Flow Control
112 //
113
114 ///
115 /// DCD required for transmit
116 ///
117 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_FLOW_CONTROL_DCD 0x1
118 ///
119 /// RTS/CTS hardware flow control
120 ///
121 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_FLOW_CONTROL_RTS_CTS 0x2
122 ///
123 /// XON/XOFF software control
124 ///
125 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_FLOW_CONTROL_XON_XOFF 0x4
126
127 //
128 // Terminal Type
129 //
130 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_TERMINAL_TYPE_VT100 0
131 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_TERMINAL_TYPE_VT100_PLUS 1
132 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_TERMINAL_TYPE_VT_UTF8 2
133 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_TERMINAL_TYPE_ANSI 3
134
135 #endif