2 * Copyright (c) 1999 Doug Rabson
3 * Copyright (c) 2000 Mitsuru IWASAKI <iwasaki@FreeBSD.org>
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 /* Root System Description Pointer */
46 /* System Description Table */
57 #define SIZEOF_SDT_HDR 36 /* struct size except body */
58 u_int32_t body[1];/* This member should be casted */
61 struct MADT_local_apic {
65 #define ACPI_MADT_APIC_LOCAL_FLAG_ENABLED 1
75 struct MADT_int_override {
80 #define MPS_INT_FLAG_POLARITY_MASK 0x3
81 #define MPS_INT_FLAG_POLARITY_CONFORM 0x0
82 #define MPS_INT_FLAG_POLARITY_HIGH 0x1
83 #define MPS_INT_FLAG_POLARITY_LOW 0x3
84 #define MPS_INT_FLAG_TRIGGER_MASK 0xc
85 #define MPS_INT_FLAG_TRIGGER_CONFORM 0x0
86 #define MPS_INT_FLAG_TRIGGER_EDGE 0x4
87 #define MPS_INT_FLAG_TRIGGER_LEVEL 0xc
95 struct MADT_local_nmi {
101 struct MADT_local_apic_override {
106 struct MADT_io_sapic {
113 struct MADT_local_sapic {
121 struct MADT_int_src {
124 #define ACPI_MADT_APIC_INT_SOURCE_PMI 1
125 #define ACPI_MADT_APIC_INT_SOURCE_INIT 2
126 #define ACPI_MADT_APIC_INT_SOURCE_CPEI 3 /* Corrected Platform Error */
136 #define ACPI_MADT_APIC_TYPE_LOCAL_APIC 0
137 #define ACPI_MADT_APIC_TYPE_IO_APIC 1
138 #define ACPI_MADT_APIC_TYPE_INT_OVERRIDE 2
139 #define ACPI_MADT_APIC_TYPE_NMI 3
140 #define ACPI_MADT_APIC_TYPE_LOCAL_NMI 4
141 #define ACPI_MADT_APIC_TYPE_LOCAL_OVERRIDE 5
142 #define ACPI_MADT_APIC_TYPE_IO_SAPIC 6
143 #define ACPI_MADT_APIC_TYPE_LOCAL_SAPIC 7
144 #define ACPI_MADT_APIC_TYPE_INT_SRC 8
147 struct MADT_local_apic local_apic;
148 struct MADT_io_apic io_apic;
149 struct MADT_int_override int_override;
151 struct MADT_local_nmi local_nmi;
152 struct MADT_local_apic_override local_apic_override;
153 struct MADT_io_sapic io_sapic;
154 struct MADT_local_sapic local_sapic;
155 struct MADT_int_src int_src;
160 u_int32_t lapic_addr;
162 #define ACPI_APIC_FLAG_PCAT_COMPAT 1 /* System has dual-8259 setup. */
167 * Addresses to scan on ia32 for the RSD PTR. According to section 5.2.2
168 * of the ACPI spec, we only consider two regions for the base address:
169 * 1. EBDA (1 KB area addressed to by 16 bit pointer at 0x40E)
170 * 2. High memory (0xE0000 - 0xFFFFF)
172 #define RSDP_EBDA_PTR 0x40E
173 #define RSDP_EBDA_SIZE 0x400
174 #define RSDP_HI_START 0xE0000
175 #define RSDP_HI_SIZE 0x20000
177 #endif /* !_ACPIDUMP_H_ */