blob: c4e3c51ab4c48341a343120064ab0fa714d7e9a2 [file] [log] [blame]
Kevin O'Connor35746442009-02-27 20:54:51 -05001#ifndef __MPTABLE_H
2#define __MPTABLE_H
3
4#include "types.h" // u32
5
6#define MPTABLE_SIGNATURE 0x5f504d5f // "_MP_"
7
8struct mptable_floating_s {
9 u32 signature;
10 u32 physaddr;
11 u8 length;
12 u8 spec_rev;
13 u8 checksum;
14 u8 feature1;
15 u8 feature2;
16 u8 reserved[3];
17};
18
Kevin O'Connor11ac1622009-02-28 18:19:30 -050019#define MPCONFIG_SIGNATURE 0x504d4350 // "PCMP"
Kevin O'Connor35746442009-02-27 20:54:51 -050020
21struct mptable_config_s {
22 u32 signature;
23 u16 length;
24 u8 spec;
25 u8 checksum;
26 char oemid[8];
27 char productid[12];
28 u32 oemptr;
29 u16 oemsize;
30 u16 entrycount;
31 u32 lapic;
32 u16 exttable_length;
33 u8 exttable_checksum;
34 u8 reserved;
35} PACKED;
36
37#define MPT_TYPE_CPU 0
38#define MPT_TYPE_BUS 1
39#define MPT_TYPE_IOAPIC 2
40#define MPT_TYPE_INTSRC 3
Kevin O'Connorb021a572009-11-14 13:49:06 -050041#define MPT_TYPE_LOCAL_INT 4
Kevin O'Connor35746442009-02-27 20:54:51 -050042
43struct mpt_cpu {
44 u8 type;
45 u8 apicid;
46 u8 apicver;
47 u8 cpuflag;
Kevin O'Connore97ca7b2009-06-21 09:10:28 -040048 u32 cpusignature;
Kevin O'Connor35746442009-02-27 20:54:51 -050049 u32 featureflag;
50 u32 reserved[2];
51} PACKED;
52
53struct mpt_bus {
54 u8 type;
55 u8 busid;
56 char bustype[6];
57} PACKED;
58
59struct mpt_ioapic {
60 u8 type;
61 u8 apicid;
62 u8 apicver;
63 u8 flags;
64 u32 apicaddr;
65} PACKED;
66
67struct mpt_intsrc {
68 u8 type;
69 u8 irqtype;
70 u16 irqflag;
71 u8 srcbus;
72 u8 srcbusirq;
73 u8 dstapic;
74 u8 dstirq;
75} PACKED;
76
77// mptable.c
78void mptable_init(void);
79
80#endif // mptable.h