AquilaOS documentation
How it works, and its code
Loading...
Searching...
No Matches
sdt.h
Go to the documentation of this file.
1#ifndef _X86_SDT_H
2#define _X86_SDT_H
3
4#include <core/system.h>
5
6/* x86: ACPI's tables, as the firmware lays them out (see the ACPI
7 * specification). acpi.c finds them, apic.c and hpet.c read them. */
8
17
27
40
46
52
61
71
72/* The MADT (signature "APIC") lists the interrupt controllers, in
73 * entries after its header, each with a type and a length. */
74#define ACPI_MADT_LOCAL_APIC 0
75#define ACPI_MADT_IO_APIC 1
76#define ACPI_MADT_INT_SRC_OVERRIDE 2
77#define ACPI_MADT_LOCAL_APIC_NMI 4
78
79#define ACPI_MADT_PCAT_COMPAT 0x1 /* the machine has 8259s too */
80
81#define ACPI_MADT_ENABLED 0x1 /* a local APIC's flag: its CPU is there */
82
83/* an override's flags: the polarity (bits 0 and 1), the trigger mode
84 * (bits 2 and 3) */
85#define ACPI_MPS_POLARITY_MASK 0x3
86#define ACPI_MPS_POLARITY_HIGH 0x1
87#define ACPI_MPS_POLARITY_LOW 0x3
88#define ACPI_MPS_TRIGGER_MASK 0xc
89#define ACPI_MPS_TRIGGER_EDGE 0x4
90#define ACPI_MPS_TRIGGER_LEVEL 0xc
91
97
105
114
124
128 uint8_t processor_id; /* 0xff for all CPUs */
130 uint8_t lint; /* LINT0 or LINT1 */
131} __packed;
132
139
140#endif /* ! _X86_SDT_H */
#define __packed
Definition system.h:30
unsigned int uint32_t
Definition stddef.h:22
unsigned char uint8_t
Definition stddef.h:20
unsigned long long int uint64_t
Definition stddef.h:23
unsigned short int uint16_t
Definition stddef.h:21
A register's address, ACPI's Generic Address Structure.
Definition sdt.h:54
uint8_t bit_offset
Definition sdt.h:57
uint8_t bit_width
Definition sdt.h:56
uint8_t access_size
Definition sdt.h:58
uint64_t address
Definition sdt.h:59
uint8_t space
Definition sdt.h:55
The HPET table: where the HPET's registers are.
Definition sdt.h:63
uint32_t event_timer_block_id
Definition sdt.h:65
uint8_t hpet_number
Definition sdt.h:67
uint8_t page_protection
Definition sdt.h:69
uint16_t minimum_tick
Definition sdt.h:68
struct acpi_sdt_header header
Definition sdt.h:64
struct acpi_gas address
Definition sdt.h:66
The start of every MADT entry.
Definition sdt.h:93
uint8_t length
Definition sdt.h:95
uint8_t type
Definition sdt.h:94
An I/O APIC: its registers, and the first GSI its pins bring.
Definition sdt.h:107
struct acpi_madt_entry entry
Definition sdt.h:108
uint8_t id
Definition sdt.h:109
uint32_t gsi_base
Definition sdt.h:112
uint32_t address
Definition sdt.h:111
uint8_t reserved
Definition sdt.h:110
Which local APIC input (LINT0 or LINT1) is the NMI.
Definition sdt.h:126
struct acpi_madt_entry entry
Definition sdt.h:127
A CPU's local APIC.
Definition sdt.h:99
uint32_t flags
Definition sdt.h:103
uint8_t apic_id
Definition sdt.h:102
struct acpi_madt_entry entry
Definition sdt.h:100
uint8_t processor_id
Definition sdt.h:101
An ISA IRQ that comes on another GSI, or with another polarity or trigger mode, than the default.
Definition sdt.h:117
uint8_t bus
Definition sdt.h:119
struct acpi_madt_entry entry
Definition sdt.h:118
uint32_t gsi
Definition sdt.h:121
uint8_t source
Definition sdt.h:120
uint16_t flags
Definition sdt.h:122
The MADT's header: the local APICs' address, and flags.
Definition sdt.h:134
uint32_t flags
Definition sdt.h:137
uint32_t local_apic_address
Definition sdt.h:136
struct acpi_sdt_header header
Definition sdt.h:135
ACPI 2.0's RSDP (revision 2 or more), which also says where the XSDT is, with 64-bit addresses.
Definition sdt.h:20
uint32_t length
Definition sdt.h:22
uint8_t xchecksum
Definition sdt.h:24
uint8_t reserved[3]
Definition sdt.h:25
uint64_t xsdt
Definition sdt.h:23
struct acpi_rsdp v1
Definition sdt.h:21
The Root System Description Pointer, which says where the RSDT is.
Definition sdt.h:10
uint32_t rsdt
Definition sdt.h:15
char signature[8]
Definition sdt.h:11
uint8_t checksum
Definition sdt.h:12
char oem_id[6]
Definition sdt.h:13
uint8_t rev
Definition sdt.h:14
The RSDT: the other tables' 32-bit addresses.
Definition sdt.h:42
uint32_t sdt[0]
Definition sdt.h:44
struct acpi_sdt_header header
Definition sdt.h:43
The header that every table starts with.
Definition sdt.h:29
uint8_t checksum
Definition sdt.h:33
uint32_t oem_rev
Definition sdt.h:36
char signature[4]
Definition sdt.h:30
uint32_t length
Definition sdt.h:31
uint32_t creator_rev
Definition sdt.h:38
char oem_table_id[8]
Definition sdt.h:35
uint8_t rev
Definition sdt.h:32
uint32_t creator_id
Definition sdt.h:37
char oemid[6]
Definition sdt.h:34
The XSDT: the other tables' 64-bit addresses.
Definition sdt.h:48
uint64_t sdt[0]
Definition sdt.h:50
struct acpi_sdt_header header
Definition sdt.h:49