iPXE
spcr.h
Go to the documentation of this file.
1#ifndef _IPXE_SPCR_H
2#define _IPXE_SPCR_H
3
4/** @file
5 *
6 * ACPI Serial Port Console Redirection (SPCR)
7 *
8 */
9
10FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11
12#include <stdint.h>
13#include <ipxe/acpi.h>
14
15/** Serial Port Console Redirection table signature */
16#define SPCR_SIGNATURE ACPI_SIGNATURE ( 'S', 'P', 'C', 'R' )
17
18/** A Serial Port Console Redirection table */
19struct spcr_table {
20 /** ACPI header */
22 /** Interface type */
24 /** Reserved */
26 /** Base address */
28 /** Reserved */
30 /** Baud rate
31 *
32 * 0: leave unchanged
33 * 1: 2400 = 115200 / 48 (not defined in standard)
34 * 2: 4800 = 115200 / 24 (not defined in standard)
35 * 3: 9600 = 115200 / 12
36 * 4: 19200 = 115200 / 6
37 * 5: 38400 = 115200 / 3 (not defined in standard)
38 * 6: 57600 = 115200 / 2
39 * 7: 115200 = 115200 / 1
40 */
42 /** Parity */
44 /** Stop bits */
46 /** Flow control */
48 /** Terminal type */
50 /** Language */
52 /** PCI device ID */
54 /** PCI vendor ID */
56 /** PCI bus number */
58 /** PCI device number */
60 /** PCI function number */
62 /** Reserved */
64 /** PCI segment */
66 /** Clock frequency */
68 /** Precise baud rate */
70 /** Reserved */
72} __attribute__ (( packed ));
73
74/* SPCR interface types */
75#define SPCR_TYPE_16550 0x0000 /**< 16550-compatible */
76#define SPCR_TYPE_16450 0x0001 /**< 16450-compatible */
77#define SPCR_TYPE_16550_GAS 0x0012 /**< 16550-compatible */
78
79/** SPCR baud rates */
90
91#endif /* _IPXE_SPCR_H */
unsigned short uint16_t
Definition stdint.h:11
unsigned int uint32_t
Definition stdint.h:12
unsigned char uint8_t
Definition stdint.h:10
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
#define __attribute__(x)
Definition compiler.h:10
ACPI data structures.
spcr_baud
SPCR baud rates.
Definition spcr.h:80
@ SPCR_BAUD_4800
Definition spcr.h:82
@ SPCR_BAUD_115200
Definition spcr.h:87
@ SPCR_BAUD_MAX
Definition spcr.h:88
@ SPCR_BAUD_38400
Definition spcr.h:85
@ SPCR_BAUD_57600
Definition spcr.h:86
@ SPCR_BAUD_2400
Definition spcr.h:81
@ SPCR_BAUD_9600
Definition spcr.h:83
@ SPCR_BAUD_19200
Definition spcr.h:84
An ACPI generic address structure.
Definition acpi.h:23
An ACPI description header.
Definition acpi.h:180
A Serial Port Console Redirection table.
Definition spcr.h:19
uint8_t pci_segment
PCI segment.
Definition spcr.h:65
struct acpi_header acpi
ACPI header.
Definition spcr.h:21
uint8_t reserved_d[4]
Reserved.
Definition spcr.h:71
uint32_t clock
Clock frequency.
Definition spcr.h:67
uint8_t pci_func
PCI function number.
Definition spcr.h:61
uint8_t pci_dev
PCI device number.
Definition spcr.h:59
uint8_t terminal
Terminal type.
Definition spcr.h:49
uint8_t lang
Language.
Definition spcr.h:51
uint8_t reserved_b[6]
Reserved.
Definition spcr.h:29
uint8_t stop
Stop bits.
Definition spcr.h:45
uint8_t type
Interface type.
Definition spcr.h:23
uint8_t reserved_c[4]
Reserved.
Definition spcr.h:63
uint8_t flow
Flow control.
Definition spcr.h:47
uint8_t parity
Parity.
Definition spcr.h:43
uint8_t baud
Baud rate.
Definition spcr.h:41
uint32_t precise
Precise baud rate.
Definition spcr.h:69
uint8_t reserved_a[3]
Reserved.
Definition spcr.h:25
uint16_t pci_device_id
PCI device ID.
Definition spcr.h:53
uint8_t pci_bus
PCI bus number.
Definition spcr.h:57
struct acpi_address base
Base address.
Definition spcr.h:27
uint16_t pci_vendor_id
PCI vendor ID.
Definition spcr.h:55