aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi/actbl2.h
diff options
context:
space:
mode:
authorRobert Moore <robert.moore@intel.com>2005-07-08 00:00:00 -0400
committerLen Brown <len.brown@intel.com>2005-07-14 00:42:23 -0400
commitf9f4601f331aa1226d7a798a01950efbb388f07f (patch)
tree62e079a9275749d16a4a0da56a427be201e15d27 /include/acpi/actbl2.h
parent4c3ffbd79529b680b3c3ef2b6f42f0c89c694ec5 (diff)
ACPICA 20050708 from Bob Moore <robert.moore@intel.com>
The use of the CPU stack in the debug version of the subsystem has been considerably reduced. Previously, a debug structure was declared in every function that used the debug macros. This structure has been removed in favor of declaring the individual elements as parameters to the debug functions. This reduces the cumulative stack use during nested execution of ACPI function calls at the cost of a small increase in the code size of the debug version of the subsystem. With assistance from Alexey Starikovskiy and Len Brown. Added the ACPI_GET_FUNCTION_NAME macro to enable the compiler-dependent headers to define a macro that will return the current function name at runtime (such as __FUNCTION__ or _func_, etc.) The function name is used by the debug trace output. If ACPI_GET_FUNCTION_NAME is not defined in the compiler-dependent header, the function name is saved on the CPU stack (one pointer per function.) This mechanism is used because apparently there exists no standard ANSI-C defined macro that that returns the function name. Alexey Starikovskiy redesigned and reimplemented the "Owner ID" mechanism used to track namespace objects created/deleted by ACPI tables and control method execution. A bitmap is now used to allocate and free the IDs, thus solving the wraparound problem present in the previous implementation. The size of the namespace node descriptor was reduced by 2 bytes as a result. Removed the UINT32_BIT and UINT16_BIT types that were used for the bitfield flag definitions within the headers for the predefined ACPI tables. These have been replaced by UINT8_BIT in order to increase the code portability of the subsystem. If the use of UINT8 remains a problem, we may be forced to eliminate bitfields entirely because of a lack of portability. Alexey Starikovksiy enhanced the performance of acpi_ut_update_object_reference. This is a frequently used function and this improvement increases the performance of the entire subsystem. Alexey Starikovskiy fixed several possible memory leaks and the inverse - premature object deletion. Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/acpi/actbl2.h')
-rw-r--r--include/acpi/actbl2.h109
1 files changed, 62 insertions, 47 deletions
diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h
index e1729c967e05..84ce5abbd6f6 100644
--- a/include/acpi/actbl2.h
+++ b/include/acpi/actbl2.h
@@ -73,8 +73,7 @@
73struct rsdt_descriptor_rev2 73struct rsdt_descriptor_rev2
74{ 74{
75 ACPI_TABLE_HEADER_DEF /* ACPI common table header */ 75 ACPI_TABLE_HEADER_DEF /* ACPI common table header */
76 u32 table_offset_entry [1]; /* Array of pointers to */ 76 u32 table_offset_entry[1]; /* Array of pointers to ACPI tables */
77 /* ACPI table headers */
78}; 77};
79 78
80 79
@@ -84,8 +83,7 @@ struct rsdt_descriptor_rev2
84struct xsdt_descriptor_rev2 83struct xsdt_descriptor_rev2
85{ 84{
86 ACPI_TABLE_HEADER_DEF /* ACPI common table header */ 85 ACPI_TABLE_HEADER_DEF /* ACPI common table header */
87 u64 table_offset_entry [1]; /* Array of pointers to */ 86 u64 table_offset_entry[1]; /* Array of pointers to ACPI tables */
88 /* ACPI table headers */
89}; 87};
90 88
91 89
@@ -94,16 +92,21 @@ struct xsdt_descriptor_rev2
94 */ 92 */
95struct facs_descriptor_rev2 93struct facs_descriptor_rev2
96{ 94{
97 char signature[4]; /* ACPI signature */ 95 char signature[4]; /* ASCII table signature */
98 u32 length; /* Length of structure, in bytes */ 96 u32 length; /* Length of structure, in bytes */
99 u32 hardware_signature; /* Hardware configuration signature */ 97 u32 hardware_signature; /* Hardware configuration signature */
100 u32 firmware_waking_vector; /* 32bit physical address of the Firmware Waking Vector. */ 98 u32 firmware_waking_vector; /* 32-bit physical address of the Firmware Waking Vector. */
101 u32 global_lock; /* Global Lock used to synchronize access to shared hardware resources */ 99 u32 global_lock; /* Global Lock used to synchronize access to shared hardware resources */
102 u32 S4bios_f : 1; /* S4Bios_f - Indicates if S4BIOS support is present */ 100
103 u32 reserved1 : 31; /* Must be 0 */ 101 /* Flags (32 bits) */
104 u64 xfirmware_waking_vector; /* 64bit physical address of the Firmware Waking Vector. */ 102
103 u8 S4bios_f : 1; /* 00: S4BIOS support is present */
104 u8 : 7; /* 01-07: Reserved, must be zero */
105 u8 reserved1[3]; /* 08-31: Reserved, must be zero */
106
107 u64 xfirmware_waking_vector; /* 64-bit physical address of the Firmware Waking Vector. */
105 u8 version; /* Version of this table */ 108 u8 version; /* Version of this table */
106 u8 reserved3 [31]; /* Reserved - must be zero */ 109 u8 reserved3[31]; /* Reserved, must be zero */
107}; 110};
108 111
109 112
@@ -165,35 +168,37 @@ struct fadt_descriptor_rev2
165{ 168{
166 ACPI_TABLE_HEADER_DEF /* ACPI common table header */ 169 ACPI_TABLE_HEADER_DEF /* ACPI common table header */
167 FADT_REV2_COMMON 170 FADT_REV2_COMMON
168 u8 reserved2; /* Reserved */ 171 u8 reserved2; /* Reserved, must be zero */
169 u32 wb_invd : 1; /* The wbinvd instruction works properly */ 172
170 u32 wb_invd_flush : 1; /* The wbinvd flushes but does not invalidate */ 173 /* Flags (32 bits) */
171 u32 proc_c1 : 1; /* All processors support C1 state */ 174
172 u32 plvl2_up : 1; /* C2 state works on MP system */ 175 u8 wb_invd : 1; /* 00: The wbinvd instruction works properly */
173 u32 pwr_button : 1; /* Power button is handled as a generic feature */ 176 u8 wb_invd_flush : 1; /* 01: The wbinvd flushes but does not invalidate */
174 u32 sleep_button : 1; /* Sleep button is handled as a generic feature, or not present */ 177 u8 proc_c1 : 1; /* 02: All processors support C1 state */
175 u32 fixed_rTC : 1; /* RTC wakeup stat not in fixed register space */ 178 u8 plvl2_up : 1; /* 03: C2 state works on MP system */
176 u32 rtcs4 : 1; /* RTC wakeup stat not possible from S4 */ 179 u8 pwr_button : 1; /* 04: Power button is handled as a generic feature */
177 u32 tmr_val_ext : 1; /* Indicates tmr_val is 32 bits 0=24-bits */ 180 u8 sleep_button : 1; /* 05: Sleep button is handled as a generic feature, or not present */
178 u32 dock_cap : 1; /* Supports Docking */ 181 u8 fixed_rTC : 1; /* 06: RTC wakeup stat not in fixed register space */
179 u32 reset_reg_sup : 1; /* Indicates system supports system reset via the FADT RESET_REG */ 182 u8 rtcs4 : 1; /* 07: RTC wakeup stat not possible from S4 */
180 u32 sealed_case : 1; /* Indicates system has no internal expansion capabilities and case is sealed */ 183 u8 tmr_val_ext : 1; /* 08: tmr_val is 32 bits 0=24-bits */
181 u32 headless : 1; /* Indicates system does not have local video capabilities or local input devices */ 184 u8 dock_cap : 1; /* 09: Docking supported */
182 u32 cpu_sw_sleep : 1; /* Indicates to OSPM that a processor native instruction */ 185 u8 reset_reg_sup : 1; /* 10: System reset via the FADT RESET_REG supported */
183 /* must be executed after writing the SLP_TYPx register */ 186 u8 sealed_case : 1; /* 11: No internal expansion capabilities and case is sealed */
184 /* ACPI 3.0 flag bits */ 187 u8 headless : 1; /* 12: No local video capabilities or local input devices */
185 188 u8 cpu_sw_sleep : 1; /* 13: Must execute native instruction after writing SLP_TYPx register */
186 u32 pci_exp_wak : 1; /* System supports PCIEXP_WAKE (STS/EN) bits */ 189
187 u32 use_platform_clock : 1; /* OSPM should use platform-provided timer */ 190 u8 pci_exp_wak : 1; /* 14: System supports PCIEXP_WAKE (STS/EN) bits (ACPI 3.0) */
188 u32 S4rtc_sts_valid : 1; /* Contents of RTC_STS valid after S4 wake */ 191 u8 use_platform_clock : 1; /* 15: OSPM should use platform-provided timer (ACPI 3.0) */
189 u32 remote_power_on_capable : 1; /* System is compatible with remote power on */ 192 u8 S4rtc_sts_valid : 1; /* 16: Contents of RTC_STS valid after S4 wake (ACPI 3.0) */
190 u32 force_apic_cluster_model : 1; /* All local APICs must use cluster model */ 193 u8 remote_power_on_capable : 1; /* 17: System is compatible with remote power on (ACPI 3.0) */
191 u32 force_apic_physical_destination_mode : 1; /* all local x_aPICs must use physical dest mode */ 194 u8 force_apic_cluster_model : 1; /* 18: All local APICs must use cluster model (ACPI 3.0) */
192 u32 reserved6 : 12;/* Reserved - must be zero */ 195 u8 force_apic_physical_destination_mode : 1; /* 19: all local x_aPICs must use physical dest mode (ACPI 3.0) */
196 u8 : 4; /* 20-23: Reserved, must be zero */
197 u8 reserved3; /* 24-31: Reserved, must be zero */
193 198
194 struct acpi_generic_address reset_register; /* Reset register address in GAS format */ 199 struct acpi_generic_address reset_register; /* Reset register address in GAS format */
195 u8 reset_value; /* Value to write to the reset_register port to reset the system */ 200 u8 reset_value; /* Value to write to the reset_register port to reset the system */
196 u8 reserved7[3]; /* These three bytes must be zero */ 201 u8 reserved4[3]; /* These three bytes must be zero */
197 u64 xfirmware_ctrl; /* 64-bit physical address of FACS */ 202 u64 xfirmware_ctrl; /* 64-bit physical address of FACS */
198 u64 Xdsdt; /* 64-bit physical address of DSDT */ 203 u64 Xdsdt; /* 64-bit physical address of DSDT */
199 struct acpi_generic_address xpm1a_evt_blk; /* Extended Power Mgt 1a acpi_event Reg Blk address */ 204 struct acpi_generic_address xpm1a_evt_blk; /* Extended Power Mgt 1a acpi_event Reg Blk address */
@@ -213,11 +218,11 @@ struct fadt_descriptor_rev2_minus
213{ 218{
214 ACPI_TABLE_HEADER_DEF /* ACPI common table header */ 219 ACPI_TABLE_HEADER_DEF /* ACPI common table header */
215 FADT_REV2_COMMON 220 FADT_REV2_COMMON
216 u8 reserved2; /* Reserved */ 221 u8 reserved2; /* Reserved, must be zero */
217 u32 flags; 222 u32 flags;
218 struct acpi_generic_address reset_register; /* Reset register address in GAS format */ 223 struct acpi_generic_address reset_register; /* Reset register address in GAS format */
219 u8 reset_value; /* Value to write to the reset_register port to reset the system. */ 224 u8 reset_value; /* Value to write to the reset_register port to reset the system. */
220 u8 reserved7[3]; /* These three bytes must be zero */ 225 u8 reserved7[3]; /* Reserved, must be zero */
221}; 226};
222 227
223 228
@@ -242,11 +247,16 @@ struct static_resource_alloc
242 u8 length; 247 u8 length;
243 u8 proximity_domain_lo; 248 u8 proximity_domain_lo;
244 u8 apic_id; 249 u8 apic_id;
245 u32 enabled :1; 250
246 u32 reserved3 :31; 251 /* Flags (32 bits) */
252
253 u8 enabled :1; /* 00: Use affinity structure */
254 u8 :7; /* 01-07: Reserved, must be zero */
255 u8 reserved3[3]; /* 08-31: Reserved, must be zero */
256
247 u8 local_sapic_eid; 257 u8 local_sapic_eid;
248 u8 proximity_domain_hi[3]; 258 u8 proximity_domain_hi[3];
249 u32 reserved4; 259 u32 reserved4; /* Reserved, must be zero */
250}; 260};
251 261
252struct memory_affinity 262struct memory_affinity
@@ -258,18 +268,23 @@ struct memory_affinity
258 u64 base_address; 268 u64 base_address;
259 u64 address_length; 269 u64 address_length;
260 u32 reserved4; 270 u32 reserved4;
261 u32 enabled :1; 271
262 u32 hot_pluggable :1; 272 /* Flags (32 bits) */
263 u32 non_volatile :1; 273
264 u32 reserved5 :29; 274 u8 enabled :1; /* 00: Use affinity structure */
265 u64 reserved6; 275 u8 hot_pluggable :1; /* 01: Memory region is hot pluggable */
276 u8 non_volatile :1; /* 02: Memory is non-volatile */
277 u8 :5; /* 03-07: Reserved, must be zero */
278 u8 reserved5[3]; /* 08-31: Reserved, must be zero */
279
280 u64 reserved6; /* Reserved, must be zero */
266}; 281};
267 282
268struct system_resource_affinity 283struct system_resource_affinity
269{ 284{
270 ACPI_TABLE_HEADER_DEF 285 ACPI_TABLE_HEADER_DEF
271 u32 reserved1; /* Must be value '1' */ 286 u32 reserved1; /* Must be value '1' */
272 u64 reserved2; 287 u64 reserved2; /* Reserved, must be zero */
273}; 288};
274 289
275 290