aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi/actbl.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/actbl.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/actbl.h')
-rw-r--r--include/acpi/actbl.h58
1 files changed, 32 insertions, 26 deletions
diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h
index b5cdcca444c8..c1e9110c3661 100644
--- a/include/acpi/actbl.h
+++ b/include/acpi/actbl.h
@@ -86,15 +86,15 @@
86 */ 86 */
87struct rsdp_descriptor /* Root System Descriptor Pointer */ 87struct rsdp_descriptor /* Root System Descriptor Pointer */
88{ 88{
89 char signature [8]; /* ACPI signature, contains "RSD PTR " */ 89 char signature[8]; /* ACPI signature, contains "RSD PTR " */
90 u8 checksum; /* To make sum of struct == 0 */ 90 u8 checksum; /* ACPI 1.0 checksum */
91 char oem_id [6]; /* OEM identification */ 91 char oem_id[6]; /* OEM identification */
92 u8 revision; /* Must be 0 for 1.0, 2 for 2.0 */ 92 u8 revision; /* Must be (0) for ACPI 1.0 or (2) for ACPI 2.0+ */
93 u32 rsdt_physical_address; /* 32-bit physical address of RSDT */ 93 u32 rsdt_physical_address; /* 32-bit physical address of the RSDT */
94 u32 length; /* XSDT Length in bytes including hdr */ 94 u32 length; /* XSDT Length in bytes, including header */
95 u64 xsdt_physical_address; /* 64-bit physical address of XSDT */ 95 u64 xsdt_physical_address; /* 64-bit physical address of the XSDT */
96 u8 extended_checksum; /* Checksum of entire table */ 96 u8 extended_checksum; /* Checksum of entire table (ACPI 2.0) */
97 char reserved [3]; /* Reserved field must be 0 */ 97 char reserved[3]; /* Reserved, must be zero */
98}; 98};
99 99
100 100
@@ -107,15 +107,15 @@ struct acpi_common_facs /* Common FACS for internal use */
107 107
108 108
109#define ACPI_TABLE_HEADER_DEF /* ACPI common table header */ \ 109#define ACPI_TABLE_HEADER_DEF /* ACPI common table header */ \
110 char signature [4]; /* ACPI signature (4 ASCII characters) */\ 110 char signature[4]; /* ASCII table signature */\
111 u32 length; /* Length of table, in bytes, including header */\ 111 u32 length; /* Length of table in bytes, including this header */\
112 u8 revision; /* ACPI Specification minor version # */\ 112 u8 revision; /* ACPI Specification minor version # */\
113 u8 checksum; /* To make sum of entire table == 0 */\ 113 u8 checksum; /* To make sum of entire table == 0 */\
114 char oem_id [6]; /* OEM identification */\ 114 char oem_id[6]; /* ASCII OEM identification */\
115 char oem_table_id [8]; /* OEM table identification */\ 115 char oem_table_id[8]; /* ASCII OEM table identification */\
116 u32 oem_revision; /* OEM revision number */\ 116 u32 oem_revision; /* OEM revision number */\
117 char asl_compiler_id [4]; /* ASL compiler vendor ID */\ 117 char asl_compiler_id [4]; /* ASCII ASL compiler vendor ID */\
118 u32 asl_compiler_revision; /* ASL compiler revision number */ 118 u32 asl_compiler_revision; /* ASL compiler version */
119 119
120 120
121struct acpi_table_header /* ACPI common table header */ 121struct acpi_table_header /* ACPI common table header */
@@ -139,8 +139,12 @@ struct multiple_apic_table
139{ 139{
140 ACPI_TABLE_HEADER_DEF /* ACPI common table header */ 140 ACPI_TABLE_HEADER_DEF /* ACPI common table header */
141 u32 local_apic_address; /* Physical address of local APIC */ 141 u32 local_apic_address; /* Physical address of local APIC */
142 u32 PCATcompat : 1; /* A one indicates system also has dual 8259s */ 142
143 u32 reserved1 : 31; 143 /* Flags (32 bits) */
144
145 u8 PCATcompat : 1; /* 00: System also has dual 8259s */
146 u8 : 7; /* 01-07: Reserved, must be zero */
147 u8 reserved1[3]; /* 08-31: Reserved, must be zero */
144}; 148};
145 149
146/* Values for Type in APIC_HEADER_DEF */ 150/* Values for Type in APIC_HEADER_DEF */
@@ -180,16 +184,18 @@ struct apic_header
180#define TRIGGER_RESERVED 2 184#define TRIGGER_RESERVED 2
181#define TRIGGER_LEVEL 3 185#define TRIGGER_LEVEL 3
182 186
183/* Common flag definitions */ 187/* Common flag definitions (16 bits each) */
184 188
185#define MPS_INTI_FLAGS \ 189#define MPS_INTI_FLAGS \
186 u16 polarity : 2; /* Polarity of APIC I/O input signals */\ 190 u8 polarity : 2; /* 00-01: Polarity of APIC I/O input signals */\
187 u16 trigger_mode : 2; /* Trigger mode of APIC input signals */\ 191 u8 trigger_mode : 2; /* 02-03: Trigger mode of APIC input signals */\
188 u16 reserved1 : 12; /* Reserved, must be zero */ 192 u8 : 4; /* 04-07: Reserved, must be zero */\
193 u8 reserved1; /* 08-15: Reserved, must be zero */
189 194
190#define LOCAL_APIC_FLAGS \ 195#define LOCAL_APIC_FLAGS \
191 u32 processor_enabled: 1; /* Processor is usable if set */\ 196 u8 processor_enabled: 1; /* 00: Processor is usable if set */\
192 u32 reserved2 : 31; /* Reserved, must be zero */ 197 u8 : 7; /* 01-07: Reserved, must be zero */\
198 u8 reserved2; /* 08-15: Reserved, must be zero */
193 199
194/* Sub-structures for MADT */ 200/* Sub-structures for MADT */
195 201
@@ -238,7 +244,7 @@ struct madt_local_apic_nmi
238struct madt_address_override 244struct madt_address_override
239{ 245{
240 APIC_HEADER_DEF 246 APIC_HEADER_DEF
241 u16 reserved; /* Reserved - must be zero */ 247 u16 reserved; /* Reserved, must be zero */
242 u64 address; /* APIC physical address */ 248 u64 address; /* APIC physical address */
243}; 249};
244 250
@@ -246,7 +252,7 @@ struct madt_io_sapic
246{ 252{
247 APIC_HEADER_DEF 253 APIC_HEADER_DEF
248 u8 io_sapic_id; /* I/O SAPIC ID */ 254 u8 io_sapic_id; /* I/O SAPIC ID */
249 u8 reserved; /* Reserved - must be zero */ 255 u8 reserved; /* Reserved, must be zero */
250 u32 interrupt_base; /* Glocal interrupt for SAPIC start */ 256 u32 interrupt_base; /* Glocal interrupt for SAPIC start */
251 u64 address; /* SAPIC physical address */ 257 u64 address; /* SAPIC physical address */
252}; 258};
@@ -257,7 +263,7 @@ struct madt_local_sapic
257 u8 processor_id; /* ACPI processor id */ 263 u8 processor_id; /* ACPI processor id */
258 u8 local_sapic_id; /* SAPIC ID */ 264 u8 local_sapic_id; /* SAPIC ID */
259 u8 local_sapic_eid; /* SAPIC EID */ 265 u8 local_sapic_eid; /* SAPIC EID */
260 u8 reserved [3]; /* Reserved - must be zero */ 266 u8 reserved[3]; /* Reserved, must be zero */
261 LOCAL_APIC_FLAGS 267 LOCAL_APIC_FLAGS
262 u32 processor_uID; /* Numeric UID - ACPI 3.0 */ 268 u32 processor_uID; /* Numeric UID - ACPI 3.0 */
263 char processor_uIDstring[1]; /* String UID - ACPI 3.0 */ 269 char processor_uIDstring[1]; /* String UID - ACPI 3.0 */