Root/
Source at commit 2605 created 9 years 4 months ago. By ifabio, Temp disabled feature introduced in commit 2562 (Added ability to auto-select last booted partition as the boot volume), cause AllocateKernelMemory error. | |
---|---|
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 | {␊ |
25 | ␉char␉␉␉Signature[8];␊ |
26 | ␉uint8_t␉␉␉Checksum;␊ |
27 | ␉char␉␉␉OEMID[6];␊ |
28 | ␉uint8_t␉␉␉Revision;␊ |
29 | ␉uint32_t␉␉RsdtAddress;␊ |
30 | ␉uint32_t␉␉Length;␊ |
31 | ␉uint64_t␉␉XsdtAddress;␊ |
32 | ␉uint8_t␉␉␉ExtendedChecksum;␊ |
33 | ␉char␉␉␉Reserved[3];␊ |
34 | } __attribute__((packed));␊ |
35 | ␊ |
36 | // TODO Migrate␊ |
37 | struct acpi_2_rsdt␊ |
38 | {␊ |
39 | ␉char␉␉␉Signature[4];␊ |
40 | ␉uint32_t␉␉Length;␊ |
41 | ␉uint8_t␉␉␉Revision;␊ |
42 | ␉uint8_t␉␉␉Checksum;␊ |
43 | ␉char␉␉␉OEMID[6];␊ |
44 | ␉char␉␉␉OEMTableId[8];␊ |
45 | ␉uint32_t␉␉OEMRevision;␊ |
46 | ␉uint32_t␉␉CreatorId;␊ |
47 | ␉uint32_t␉␉CreatorRevision;␊ |
48 | } __attribute__((packed));␊ |
49 | ␊ |
50 | // TODO Migrate␊ |
51 | struct acpi_2_xsdt␊ |
52 | {␊ |
53 | ␉char␉␉␉Signature[4];␊ |
54 | ␉uint32_t␉␉Length;␊ |
55 | ␉uint8_t␉␉␉Revision;␊ |
56 | ␉uint8_t␉␉␉Checksum;␊ |
57 | ␉char␉␉␉OEMID[6];␊ |
58 | ␉char␉␉␉OEMTableId[8];␊ |
59 | ␉uint32_t␉␉OEMRevision;␊ |
60 | ␉uint32_t␉␉CreatorId;␊ |
61 | ␉uint32_t␉␉CreatorRevision;␊ |
62 | } __attribute__((packed));␊ |
63 | ␊ |
64 | // TODO Migrate␊ |
65 | struct acpi_2_ssdt␊ |
66 | {␊ |
67 | ␉char␉␉␉Signature[4];␊ |
68 | ␉uint32_t␉␉Length;␊ |
69 | ␉uint8_t␉␉␉Revision;␊ |
70 | ␉uint8_t␉␉␉Checksum;␊ |
71 | ␉char␉␉␉OEMID[6];␊ |
72 | ␉char␉␉␉OEMTableId[8];␊ |
73 | ␉uint32_t␉␉OEMRevision;␊ |
74 | ␉uint32_t␉␉CreatorId;␊ |
75 | ␉uint32_t␉␉CreatorRevision;␊ |
76 | } __attribute__((packed));␊ |
77 | ␊ |
78 | // TODO Migrate␊ |
79 | struct acpi_2_dsdt␊ |
80 | {␊ |
81 | ␉char␉␉␉Signature[4];␊ |
82 | ␉uint32_t␉␉Length;␊ |
83 | ␉uint8_t␉␉␉Revision;␊ |
84 | ␉uint8_t␉␉␉Checksum;␊ |
85 | ␉char␉␉␉OEMID[6];␊ |
86 | ␉char␉␉␉OEMTableId[8];␊ |
87 | ␉uint32_t␉␉OEMRevision;␊ |
88 | ␉uint32_t␉␉CreatorId;␊ |
89 | ␉uint32_t␉␉CreatorRevision;␊ |
90 | } __attribute__((packed));␊ |
91 | ␊ |
92 | // TODO Migrate␊ |
93 | struct acpi_2_fadt␊ |
94 | {␊ |
95 | ␉char␉␉␉Signature[4];␊ |
96 | ␉uint32_t␉␉Length;␊ |
97 | ␉uint8_t␉␉␉Revision;␊ |
98 | ␉uint8_t␉␉␉Checksum;␊ |
99 | ␉char␉␉␉OEMID[6];␊ |
100 | ␉char␉␉␉OEMTableId[8];␊ |
101 | ␉uint32_t␉␉OEMRevision;␊ |
102 | ␉uint32_t␉␉CreatorId;␊ |
103 | ␉uint32_t␉␉CreatorRevision;␊ |
104 | ␉uint32_t␉␉FIRMWARE_CTRL;␊ |
105 | ␉uint32_t␉␉DSDT;␊ |
106 | ␉uint8_t␉␉␉Model;␉␉␉// JrCs␊ |
107 | ␉uint8_t␉␉␉PM_Profile;␉␉// JrCs␊ |
108 | ␉uint16_t␉␉SCI_Interrupt;␊ |
109 | ␉uint32_t␉␉SMI_Command_Port;␊ |
110 | ␉uint8_t␉␉␉ACPI_Enable;␊ |
111 | ␉uint8_t␉␉␉ACPI_Disable;␊ |
112 | ␉uint8_t␉␉␉S4BIOS_Command;␊ |
113 | ␉uint8_t␉␉␉PState_Control;␊ |
114 | ␉uint32_t␉␉PM1A_Event_Block_Address;␊ |
115 | ␉uint32_t␉␉PM1B_Event_Block_Address;␊ |
116 | ␉uint32_t␉␉PM1A_Control_Block_Address;␊ |
117 | ␉uint32_t␉␉PM1B_Control_Block_Address;␊ |
118 | ␉uint32_t␉␉PM2_Control_Block_Address;␊ |
119 | ␉uint32_t␉␉PM_Timer_Block_Address;␊ |
120 | ␉uint32_t␉␉GPE0_Block_Address;␊ |
121 | ␉uint32_t␉␉GPE1_Block_Address;␊ |
122 | ␉uint8_t␉␉␉PM1_Event_Block_Length;␊ |
123 | ␉uint8_t␉␉␉PM1_Control_Block_Length;␊ |
124 | ␉uint8_t␉␉␉PM2_Control_Block_Length;␊ |
125 | ␉uint8_t␉␉␉PM_Timer_Block_Length;␊ |
126 | ␉uint8_t␉␉␉GPE0_Block_Length;␊ |
127 | ␉uint8_t␉␉␉GPE1_Block_Length;␊ |
128 | ␉uint8_t␉␉␉GPE1_Base_Offset;␊ |
129 | ␉uint8_t␉␉␉CST_Support;␊ |
130 | ␉uint16_t␉␉C2_Latency;␊ |
131 | ␉uint16_t␉␉C3_Latency;␊ |
132 | ␉uint16_t␉␉CPU_Cache_Size;␊ |
133 | ␉uint16_t␉␉Cache_Flush_Stride;␊ |
134 | ␉uint8_t␉␉␉Duty_Cycle_Offset;␊ |
135 | ␉uint8_t␉␉␉Duty_Cycle_Width;␊ |
136 | ␉uint8_t␉␉␉RTC_Day_Alarm_Index;␊ |
137 | ␉uint8_t␉␉␉RTC_Month_Alarm_Index;␊ |
138 | ␉uint8_t␉␉␉RTC_Century_Index;␊ |
139 | ␉uint16_t␉␉Boot_Flags;␊ |
140 | ␉uint8_t␉␉␉Reserved0;␊ |
141 | /* Begin Asere */␊ |
142 | ␉//Reset Fix␊ |
143 | ␉uint32_t Flags;␊ |
144 | ␉uint8_t Reset_SpaceID;␊ |
145 | ␉uint8_t Reset_BitWidth;␊ |
146 | ␉uint8_t Reset_BitOffset;␊ |
147 | ␉uint8_t Reset_AccessWidth;␊ |
148 | ␉uint64_t Reset_Address;␊ |
149 | ␉uint8_t Reset_Value;␊ |
150 | ␉uint8_t Reserved[3];␊ |
151 | ␊ |
152 | ␉uint64_t␉ X_FIRMWARE_CTRL;␊ |
153 | ␉uint64_t␉ X_DSDT;␊ |
154 | /* End Asere */␊ |
155 | ␉/*We absolutely don't care about theese fields*/␊ |
156 | ␉uint8_t␉␉notimp2[96];␊ |
157 | } __attribute__((packed));␊ |
158 | ␊ |
159 | #endif /* !__LIBSAIO_ACPI_H */␊ |
160 |