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