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