Chameleon

Chameleon Svn Source Tree

Root/branches/meklort/i386/libsaio/acpi.h

Source at commit 284 created 13 years 10 months ago.
By blackosx, Amended my mistake by updating the Default theme images in the trunk. Now put them back as they were.. (Sorry)
1#ifndef __LIBSAIO_ACPI_H
2#define __LIBSAIO_ACPI_H
3
4#define ACPI_RANGE_START (0x0E0000)
5#define ACPI_RANGE_END (0x0FFFFF)
6
7#define UINT64_LE_FROM_CHARS(a,b,c,d,e,f,g,h) \
8( ((uint64_t)h << 56) \
9| ((uint64_t)g << 48) \
10| ((uint64_t)f << 40) \
11| ((uint64_t)e << 32) \
12| ((uint64_t)d << 24) \
13| ((uint64_t)c << 16) \
14| ((uint64_t)b << 8) \
15| ((uint64_t)a << 0) \
16)
17
18#define ACPI_SIGNATURE_UINT64_LE UINT64_LE_FROM_CHARS('R','S','D',' ','P','T','R',' ')
19
20/* Per ACPI 3.0a spec */
21
22// TODO Migrate
23struct acpi_2_rsdp {
24 char Signature[8];
25 uint8_t Checksum;
26 char OEMID[6];
27 uint8_t Revision;
28 uint32_t RsdtAddress;
29 uint32_t Length;
30 uint64_t XsdtAddress;
31 uint8_t ExtendedChecksum;
32 char Reserved[3];
33} __attribute__((packed));
34
35// TODO Migrate
36struct acpi_2_rsdt {
37char Signature[4];
38uint32_t Length;
39uint8_t Revision;
40uint8_t Checksum;
41char OEMID[6];
42char OEMTableId[8];
43uint32_t OEMRevision;
44uint32_t CreatorId;
45uint32_t CreatorRevision;
46} __attribute__((packed));
47
48// TODO Migrate
49struct acpi_2_xsdt {
50char Signature[4];
51uint32_t Length;
52uint8_t Revision;
53uint8_t Checksum;
54char OEMID[6];
55char OEMTableId[8];
56uint32_t OEMRevision;
57uint32_t CreatorId;
58uint32_t CreatorRevision;
59} __attribute__((packed));
60
61// TODO Migrate
62struct acpi_2_fadt {
63char Signature[4];
64uint32_t Length;
65uint8_t Revision;
66uint8_t Checksum;
67char OEMID[6];
68char OEMTableId[8];
69uint32_t OEMRevision;
70uint32_t CreatorId;
71uint32_t CreatorRevision;
72uint32_t FIRMWARE_CTRL;
73uint32_t DSDT;
74uint8_t Model;// JrCs
75uint8_t PM_Profile;// JrCs
76/*We absolutely don't care about theese fields*/
77uint8_t notimp1[66];
78/* Begin Asere */
79//Reset Fix
80uint32_t Flags;
81uint8_t Reset_SpaceID;
82uint8_t Reset_BitWidth;
83uint8_t Reset_BitOffset;
84uint8_t Reset_AccessWidth;
85uint64_t Reset_Address;
86uint8_t Reset_Value;
87uint8_t Reserved[3];
88
89uint64_t X_FIRMWARE_CTRL;
90uint64_t X_DSDT;
91/* End Asere */
92/*We absolutely don't care about theese fields*/
93uint8_tnotimp2[96];
94} __attribute__((packed));
95
96struct acpi_2_dsdt {
97char Signature[4];
98uint32_t Length;
99uint8_t Revision;
100uint8_t Checksum;
101char OEMID[6];
102char OEMTableId[8];
103char OEMRevision[4];
104char CreatorId[4];
105char CreatorRevision[4];
106chardsdtStart;// actual length is .Length
107} __attribute__((packed));
108
109
110#endif /* !__LIBSAIO_ACPI_H */
111

Archive Download this file

Revision: 284