2 |
- |
1 |
/*
|
|
|
2 |
* ACPI definitions
|
|
|
3 |
*
|
|
|
4 |
* A System Descriptor Table starts with a header of 4 bytes of signature
|
|
|
5 |
* followed by 4 bytes of total table length then 28 bytes of ID information
|
|
|
6 |
* (including the table checksum).
|
|
|
7 |
*/
|
|
|
8 |
typedef struct Dsdt Dsdt;
|
|
|
9 |
typedef struct Facp Facp;
|
|
|
10 |
typedef struct Hpet Hpet;
|
|
|
11 |
typedef struct Madt Madt;
|
|
|
12 |
typedef struct Mcfg Mcfg;
|
|
|
13 |
typedef struct Mcfgd Mcfgd;
|
|
|
14 |
typedef struct Rsd Rsd;
|
|
|
15 |
|
|
|
16 |
struct Dsdt { /* Differentiated System DT */
|
|
|
17 |
uchar sdthdr[36]; /* "DSDT" + length[4] + [28] */
|
|
|
18 |
uchar db[]; /* Definition Block */
|
|
|
19 |
};
|
|
|
20 |
struct Facp { /* Fixed ACPI DT */
|
|
|
21 |
uchar sdthdr[36]; /* "FACP" + length[4] + [28] */
|
|
|
22 |
uchar faddr[4]; /* Firmware Control Address */
|
|
|
23 |
uchar dsdt[4]; /* DSDT Address */
|
|
|
24 |
uchar pad[200]; /* total table is 244 */
|
|
|
25 |
};
|
|
|
26 |
struct Hpet { /* High-Precision Event Timer DT */
|
|
|
27 |
uchar sdthdr[36]; /* "HPET" + length[4] + [28] */
|
|
|
28 |
uchar id[4]; /* Event Timer Block ID */
|
|
|
29 |
uchar addr[12]; /* ACPI Format Address */
|
|
|
30 |
uchar seqno; /* Sequence Number */
|
|
|
31 |
uchar minticks[2]; /* Minimum Clock Tick */
|
|
|
32 |
uchar attr; /* Page Protection */
|
|
|
33 |
};
|
|
|
34 |
struct Madt { /* Multiple APIC DT */
|
|
|
35 |
uchar sdthdr[36]; /* "MADT" + length[4] + [28] */
|
|
|
36 |
uchar addr[4]; /* Local APIC Address */
|
|
|
37 |
uchar flags[4];
|
|
|
38 |
uchar structures[];
|
|
|
39 |
};
|
|
|
40 |
typedef struct Mcfg { /* PCI Memory Mapped Config */
|
|
|
41 |
uchar sdthdr[36]; /* "MCFG" + length[4] + [28] */
|
|
|
42 |
uchar pad[8]; /* reserved */
|
|
|
43 |
Mcfgd mcfgd[]; /* descriptors */
|
|
|
44 |
} Mcfg;
|
|
|
45 |
struct Mcfgd { /* MCFG Descriptor */
|
|
|
46 |
uchar addr[8]; /* base address */
|
|
|
47 |
uchar segno[2]; /* segment group number */
|
|
|
48 |
uchar sbno; /* start bus number */
|
|
|
49 |
uchar ebno; /* end bus number */
|
|
|
50 |
uchar pad[4]; /* reserved */
|
|
|
51 |
};
|
|
|
52 |
struct Rsd { /* Root System Description * */
|
|
|
53 |
uchar signature[8]; /* "RSD PTR " */
|
|
|
54 |
uchar rchecksum;
|
|
|
55 |
uchar oemid[6];
|
|
|
56 |
uchar revision;
|
|
|
57 |
uchar raddr[4]; /* RSDT */
|
|
|
58 |
uchar length[4];
|
|
|
59 |
uchar xaddr[8]; /* XSDT */
|
|
|
60 |
uchar xchecksum; /* XSDT */
|
|
|
61 |
uchar pad[3]; /* reserved */
|
|
|
62 |
};
|