]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.h
Code Scrub for Protocol Definition
[mirror_edk2.git] / MdePkg / Include / IndustryStandard / SerialPortConsoleRedirectionTable.h
CommitLineData
568eb0cb 1/**@file\r
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
5 Copyright (c) 2007, Intel Corporation\r
6 All rights reserved. This program and the accompanying materials \r
7 are licensed and made available under the terms and conditions of the BSD License \r
8 which accompanies this distribution. The full text of the license may be found at \r
9 http://opensource.org/licenses/bsd-license.php \r
10\r
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
13**/\r
14\r
15#ifndef _SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_H_\r
16#define _SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_H_\r
17\r
ecc40942 18\r
19#include <IndustryStandard/Acpi.h>\r
568eb0cb 20\r
21//\r
22// Ensure proper structure formats\r
23//\r
568eb0cb 24#pragma pack(1)\r
568eb0cb 25\r
26//\r
27// SPCR Revision (defined in spec)\r
28//\r
29#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_REVISION 0x01\r
30\r
31//\r
32// SPCR Structure Definition\r
33//\r
34typedef struct {\r
35 EFI_ACPI_DESCRIPTION_HEADER Header;\r
36 UINT8 InterfaceType;\r
37 UINT8 Reserved1[3];\r
38 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE BaseAddress;\r
39 UINT8 InterruptType;\r
40 UINT8 Irq;\r
41 UINT32 GlobalSystemInterrupt;\r
42 UINT8 BaudRate;\r
43 UINT8 Parity;\r
44 UINT8 StopBits;\r
45 UINT8 FlowControl;\r
46 UINT8 TerminalType;\r
47 UINT8 Language;\r
48 UINT16 PciDeviceId;\r
49 UINT16 PciVendorId;\r
50 UINT8 PciBusNumber;\r
51 UINT8 PciDeviceNumber;\r
52 UINT8 PciFunctionNumber;\r
53 UINT32 PciFlags;\r
54 UINT8 PciSegment;\r
55 UINT32 Reserved2;\r
56} EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE;\r
57\r
568eb0cb 58#pragma pack()\r
568eb0cb 59\r
60//\r
61// SPCR Definitions\r
62//\r
63\r
64//\r
65// Interface Type\r
66//\r
67#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_16550 0\r
68#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_16450 1\r
69\r
70//\r
71// Interrupt Type\r
72//\r
73#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERRUPT_TYPE_8259 0x1\r
74#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERRUPT_TYPE_APIC 0x2\r
75#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERRUPT_TYPE_SAPIC 0x4\r
76\r
77//\r
78// Baud Rate\r
79//\r
80#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_BAUD_RATE_9600 3\r
81#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_BAUD_RATE_19200 4\r
82#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_BAUD_RATE_57600 5\r
83#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_BAUD_RATE_115200 6\r
84\r
85//\r
86// Parity\r
87//\r
88#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_PARITY_NO_PARITY 0\r
89\r
90//\r
91// Stop Bits\r
92//\r
93#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_STOP_BITS_1 1\r
94\r
95//\r
96// Flow Control\r
97//\r
98#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_FLOW_CONTROL_DCD 0x1\r
99#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_FLOW_CONTROL_RTS_CTS 0x2\r
100#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_FLOW_CONTROL_XON_XOFF 0x4\r
101\r
102//\r
103// Terminal Type\r
104//\r
105#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_TERMINAL_TYPE_VT100 0\r
106#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_TERMINAL_TYPE_VT100_PLUS 1\r
107#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_TERMINAL_TYPE_VT_UTF8 2\r
108#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_TERMINAL_TYPE_ANSI 3\r
109\r
110#endif\r