Root/
Source at commit 1793 created 12 years 5 months ago. By blackosx, Attempt to overcome issue 211 by revising the code to remove all package .svn files before function makeSubstitutions() is called. The line it replaces should work but I can't figure out why it doesn't... | |
---|---|
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␊ |
23 | struct 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␊ |
36 | struct acpi_2_rsdt {␊ |
37 | ␉char Signature[4];␊ |
38 | ␉uint32_t Length;␊ |
39 | ␉uint8_t Revision;␊ |
40 | ␉uint8_t Checksum;␊ |
41 | ␉char OEMID[6];␊ |
42 | ␉char OEMTableId[8];␊ |
43 | ␉uint32_t OEMRevision;␊ |
44 | ␉uint32_t CreatorId;␊ |
45 | ␉uint32_t CreatorRevision;␊ |
46 | } __attribute__((packed));␊ |
47 | ␊ |
48 | // TODO Migrate␊ |
49 | struct acpi_2_xsdt {␊ |
50 | ␉char Signature[4];␊ |
51 | ␉uint32_t Length;␊ |
52 | ␉uint8_t Revision;␊ |
53 | ␉uint8_t Checksum;␊ |
54 | ␉char OEMID[6];␊ |
55 | ␉char OEMTableId[8];␊ |
56 | ␉uint32_t OEMRevision;␊ |
57 | ␉uint32_t CreatorId;␊ |
58 | ␉uint32_t CreatorRevision;␊ |
59 | } __attribute__((packed));␊ |
60 | ␊ |
61 | // TODO Migrate␊ |
62 | struct acpi_2_ssdt {␊ |
63 | ␉char Signature[4];␊ |
64 | ␉uint32_t Length;␊ |
65 | ␉uint8_t Revision;␊ |
66 | ␉uint8_t Checksum;␊ |
67 | ␉char OEMID[6];␊ |
68 | ␉char OEMTableId[8];␊ |
69 | ␉uint32_t OEMRevision;␊ |
70 | ␉uint32_t CreatorId;␊ |
71 | ␉uint32_t CreatorRevision;␊ |
72 | } __attribute__((packed));␊ |
73 | ␊ |
74 | // TODO Migrate␊ |
75 | struct acpi_2_dsdt {␊ |
76 | ␉char Signature[4];␊ |
77 | ␉uint32_t Length;␊ |
78 | ␉uint8_t Revision;␊ |
79 | ␉uint8_t Checksum;␊ |
80 | ␉char OEMID[6];␊ |
81 | ␉char OEMTableId[8];␊ |
82 | ␉uint32_t OEMRevision;␊ |
83 | ␉uint32_t CreatorId;␊ |
84 | ␉uint32_t CreatorRevision;␊ |
85 | } __attribute__((packed));␊ |
86 | ␊ |
87 | // TODO Migrate␊ |
88 | struct acpi_2_fadt {␊ |
89 | ␉char Signature[4];␊ |
90 | ␉uint32_t Length;␊ |
91 | ␉uint8_t Revision;␊ |
92 | ␉uint8_t Checksum;␊ |
93 | ␉char OEMID[6];␊ |
94 | ␉char OEMTableId[8];␊ |
95 | ␉uint32_t OEMRevision;␊ |
96 | ␉uint32_t CreatorId;␊ |
97 | ␉uint32_t CreatorRevision;␊ |
98 | ␉uint32_t FIRMWARE_CTRL;␊ |
99 | ␉uint32_t DSDT;␊ |
100 | ␉uint8_t Model;␉␉␉// JrCs␊ |
101 | ␉uint8_t PM_Profile;␉␉// JrCs␊ |
102 | ␉uint16_t␉␉SCI_Interrupt;␊ |
103 | ␉uint32_t␉␉SMI_Command_Port;␊ |
104 | ␉uint8_t␉␉␉ACPI_Enable;␊ |
105 | ␉uint8_t␉␉␉ACPI_Disable;␊ |
106 | ␉uint8_t␉␉␉S4BIOS_Command;␊ |
107 | ␉uint8_t␉␉␉PState_Control;␊ |
108 | ␉uint32_t␉␉PM1A_Event_Block_Address;␊ |
109 | ␉uint32_t␉␉PM1B_Event_Block_Address;␊ |
110 | ␉uint32_t␉␉PM1A_Control_Block_Address;␊ |
111 | ␉uint32_t␉␉PM1B_Control_Block_Address;␊ |
112 | ␉uint32_t␉␉PM2_Control_Block_Address;␊ |
113 | ␉uint32_t␉␉PM_Timer_Block_Address;␊ |
114 | ␉uint32_t␉␉GPE0_Block_Address;␊ |
115 | ␉uint32_t␉␉GPE1_Block_Address;␊ |
116 | ␉uint8_t␉␉␉PM1_Event_Block_Length;␊ |
117 | ␉uint8_t␉␉␉PM1_Control_Block_Length;␊ |
118 | ␉uint8_t␉␉␉PM2_Control_Block_Length;␊ |
119 | ␉uint8_t␉␉␉PM_Timer_Block_Length;␊ |
120 | ␉uint8_t␉␉␉GPE0_Block_Length;␊ |
121 | ␉uint8_t␉␉␉GPE1_Block_Length;␊ |
122 | ␉uint8_t␉␉␉GPE1_Base_Offset;␊ |
123 | ␉uint8_t␉␉␉CST_Support;␊ |
124 | ␉uint16_t␉␉C2_Latency;␊ |
125 | ␉uint16_t␉␉C3_Latency;␊ |
126 | ␉uint16_t␉␉CPU_Cache_Size;␊ |
127 | ␉uint16_t␉␉Cache_Flush_Stride;␊ |
128 | ␉uint8_t␉␉␉Duty_Cycle_Offset;␊ |
129 | ␉uint8_t␉␉␉Duty_Cycle_Width;␊ |
130 | ␉uint8_t␉␉␉RTC_Day_Alarm_Index;␊ |
131 | ␉uint8_t␉␉␉RTC_Month_Alarm_Index;␊ |
132 | ␉uint8_t␉␉␉RTC_Century_Index;␊ |
133 | ␉uint16_t␉␉Boot_Flags;␊ |
134 | ␉uint8_t␉␉␉Reserved0;␊ |
135 | /* Begin Asere */␊ |
136 | ␉//Reset Fix␊ |
137 | ␉uint32_t Flags;␊ |
138 | ␉uint8_t Reset_SpaceID;␊ |
139 | ␉uint8_t Reset_BitWidth;␊ |
140 | ␉uint8_t Reset_BitOffset;␊ |
141 | ␉uint8_t Reset_AccessWidth;␊ |
142 | ␉uint64_t Reset_Address;␊ |
143 | ␉uint8_t Reset_Value;␊ |
144 | ␉uint8_t Reserved[3];␊ |
145 | ␊ |
146 | ␉uint64_t␉ X_FIRMWARE_CTRL;␊ |
147 | ␉uint64_t␉ X_DSDT;␊ |
148 | /* End Asere */␊ |
149 | ␉/*We absolutely don't care about theese fields*/␊ |
150 | ␉uint8_t␉␉notimp2[96];␊ |
151 | } __attribute__((packed));␊ |
152 | ␊ |
153 | #endif /* !__LIBSAIO_ACPI_H */␊ |
154 |