source: mainline/arch/ia32/include/acpi/madt.h@ f2ffad4

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since f2ffad4 was ed0dd65, checked in by Jakub Jermar <jakub@…>, 20 years ago

More ACPI work.
Initial MADT table parsing.

SMP renaming and reorganization to reflect there are more ways to bring SMP up.

  • Property mode set to 100644
File size: 3.7 KB
Line 
1/*
2 * Copyright (C) 2005 Jakub Jermar
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * - Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * - 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.
14 * - The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29#ifndef __MADT_H__
30#define __MADT_H__
31
32#include <arch/acpi/acpi.h>
33#include <arch/smp/apic.h>
34
35#define MADT_L_APIC 0
36#define MADT_IO_APIC 1
37#define MADT_INTR_SRC_OVRD 2
38#define MADT_NMI_SRC 3
39#define MADT_L_APIC_NMI 4
40#define MADT_L_APIC_ADDR_OVRD 5
41#define MADT_IO_SAPIC 6
42#define MADT_L_SAPIC 7
43#define MADT_PLATFORM_INTR_SRC 8
44#define MADT_RESERVED_SKIP_BEGIN 9
45#define MADT_RESERVED_SKIP_END 127
46#define MADT_RESERVED_OEM_BEGIN 128
47
48struct madt_apic_header {
49 __u8 type;
50 __u8 length;
51} __attribute__ ((packed));
52
53
54/* Multiple APIC Description Table */
55struct acpi_madt {
56 struct acpi_sdt_header header;
57 __u32 l_apic_address;
58 __u32 flags;
59 struct madt_apic_header apic_header[];
60} __attribute__ ((packed));
61
62struct madt_l_apic {
63 struct madt_apic_header header;
64 __u8 acpi_id;
65 __u8 apic_id;
66 __u32 flags;
67} __attribute__ ((packed));
68
69struct madt_io_apic {
70 struct madt_apic_header header;
71 __u8 io_apic_id;
72 __u8 reserved;
73 __u32 io_apic_address;
74 __u32 global_intr_base;
75} __attribute__ ((packed));
76
77struct madt_intr_src_ovrd {
78 struct madt_apic_header header;
79 __u8 bus;
80 __u8 source;
81 __u32 global_intr;
82 __u16 flags;
83} __attribute__ ((packed));
84
85struct madt_nmi_src {
86 struct madt_apic_header header;
87 __u16 flags;
88 __u32 global_intr;
89} __attribute__ ((packed));
90
91struct madt_l_apic_nmi {
92 struct madt_apic_header header;
93 __u8 acpi_id;
94 __u16 flags;
95 __u8 l_apic_lint;
96} __attribute__ ((packed));
97
98struct madt_l_apic_addr_ovrd {
99 struct madt_apic_header header;
100 __u16 reserved;
101 __u64 l_apic_address;
102} __attribute__ ((packed));
103
104struct madt_io_sapic {
105 struct madt_apic_header header;
106 __u8 io_apic_id;
107 __u8 reserved;
108 __u32 global_intr_base;
109 __u64 io_apic_address;
110} __attribute__ ((packed));
111
112struct madt_l_sapic {
113 struct madt_apic_header header;
114 __u8 acpi_id;
115 __u8 sapic_id;
116 __u8 sapic_eid;
117 __u8 reserved[3];
118 __u32 flags;
119 __u32 acpi_processor_uid_value;
120 __u8 acpi_processor_uid_str[1];
121} __attribute__ ((packed));
122
123struct madt_platform_intr_src {
124 struct madt_apic_header header;
125 __u16 flags;
126 __u8 intr_type;
127 __u8 processor_id;
128 __u8 processor_eid;
129 __u8 io_sapic_vector;
130 __u32 global_intr;
131 __u32 platform_intr_src_flags;
132} __attribute__ ((packed));
133
134extern struct acpi_madt *acpi_madt;
135
136extern void acpi_madt_parse(void);
137
138#endif /* __MADT_H__ */
Note: See TracBrowser for help on using the repository browser.