]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.h
Update the industryStandard in MdePkg:
[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, 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 // Ensure proper structure formats
23 //
24 #ifdef _MSC_EXTENSIONS
25 #pragma pack(1)
26 #endif
27
28 //
29 // SPCR Revision (defined in spec)
30 //
31 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_REVISION 0x01
32
33 //
34 // SPCR Structure Definition
35 //
36 typedef struct {
37 EFI_ACPI_DESCRIPTION_HEADER Header;
38 UINT8 InterfaceType;
39 UINT8 Reserved1[3];
40 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE BaseAddress;
41 UINT8 InterruptType;
42 UINT8 Irq;
43 UINT32 GlobalSystemInterrupt;
44 UINT8 BaudRate;
45 UINT8 Parity;
46 UINT8 StopBits;
47 UINT8 FlowControl;
48 UINT8 TerminalType;
49 UINT8 Language;
50 UINT16 PciDeviceId;
51 UINT16 PciVendorId;
52 UINT8 PciBusNumber;
53 UINT8 PciDeviceNumber;
54 UINT8 PciFunctionNumber;
55 UINT32 PciFlags;
56 UINT8 PciSegment;
57 UINT32 Reserved2;
58 } EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE;
59
60 #ifdef _MSC_EXTENSIONS
61 #pragma pack()
62 #endif
63
64 //
65 // SPCR Definitions
66 //
67
68 //
69 // Interface Type
70 //
71 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_16550 0
72 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_16450 1
73
74 //
75 // Interrupt Type
76 //
77 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERRUPT_TYPE_8259 0x1
78 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERRUPT_TYPE_APIC 0x2
79 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERRUPT_TYPE_SAPIC 0x4
80
81 //
82 // Baud Rate
83 //
84 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_BAUD_RATE_9600 3
85 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_BAUD_RATE_19200 4
86 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_BAUD_RATE_57600 5
87 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_BAUD_RATE_115200 6
88
89 //
90 // Parity
91 //
92 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_PARITY_NO_PARITY 0
93
94 //
95 // Stop Bits
96 //
97 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_STOP_BITS_1 1
98
99 //
100 // Flow Control
101 //
102 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_FLOW_CONTROL_DCD 0x1
103 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_FLOW_CONTROL_RTS_CTS 0x2
104 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_FLOW_CONTROL_XON_XOFF 0x4
105
106 //
107 // Terminal Type
108 //
109 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_TERMINAL_TYPE_VT100 0
110 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_TERMINAL_TYPE_VT100_PLUS 1
111 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_TERMINAL_TYPE_VT_UTF8 2
112 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_TERMINAL_TYPE_ANSI 3
113
114 #endif