aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/tables/tbgetall.c
diff options
context:
space:
mode:
authorRobert Moore <robert.moore@intel.com>2005-04-18 22:49:35 -0400
committerLen Brown <len.brown@intel.com>2005-07-12 00:08:52 -0400
commit44f6c01242da4e162f28d8e1216a8c7a91174605 (patch)
tree53f724764f1bd9036dfb049a643d198125cc9edc /drivers/acpi/tables/tbgetall.c
parentebb6e1a6122fd6b7c96470cfd4ce0f04150e5084 (diff)
ACPICA 20050408 from Bob Moore
Fixed three cases in the interpreter where an "index" argument to an ASL function was still (internally) 32 bits instead of the required 64 bits. This was the Index argument to the Index, Mid, and Match operators. The "strupr" function is now permanently local (acpi_ut_strupr), since this is not a POSIX-defined function and not present in most kernel-level C libraries. References to the C library strupr function have been removed from the headers. Completed the deployment of static functions/prototypes. All prototypes with the static attribute have been moved from the headers to the owning C file. ACPICA 20050329 from Bob Moore An error is now generated if an attempt is made to create a Buffer Field of length zero (A CreateField with a length operand of zero.) The interpreter now issues a warning whenever executable code at the module level is detected during ACPI table load. This will give some idea of the prevalence of this type of code. Implemented support for references to named objects (other than control methods) within package objects. Enhanced package object output for the debug object. Package objects are now completely dumped, showing all elements. Enhanced miscellaneous object output for the debug object. Any object can now be written to the debug object (for example, a device object can be written, and the type of the object will be displayed.) The "static" qualifier has been added to all local functions across the core subsystem. The number of "long" lines (> 80 chars) within the source has been significantly reduced, by about 1/3. Cleaned up all header files to ensure that all CA/iASL functions are prototyped (even static functions) and the formatting is consistent. Two new header files have been added, acopcode.h and acnames.h. Removed several obsolete functions that were no longer used. Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/tables/tbgetall.c')
-rw-r--r--drivers/acpi/tables/tbgetall.c45
1 files changed, 29 insertions, 16 deletions
diff --git a/drivers/acpi/tables/tbgetall.c b/drivers/acpi/tables/tbgetall.c
index adc4270988bc..eea5b8cb5ebb 100644
--- a/drivers/acpi/tables/tbgetall.c
+++ b/drivers/acpi/tables/tbgetall.c
@@ -49,6 +49,19 @@
49#define _COMPONENT ACPI_TABLES 49#define _COMPONENT ACPI_TABLES
50 ACPI_MODULE_NAME ("tbgetall") 50 ACPI_MODULE_NAME ("tbgetall")
51 51
52/* Local prototypes */
53
54static acpi_status
55acpi_tb_get_primary_table (
56 struct acpi_pointer *address,
57 struct acpi_table_desc *table_info);
58
59static acpi_status
60acpi_tb_get_secondary_table (
61 struct acpi_pointer *address,
62 acpi_string signature,
63 struct acpi_table_desc *table_info);
64
52 65
53/******************************************************************************* 66/*******************************************************************************
54 * 67 *
@@ -63,7 +76,7 @@
63 * 76 *
64 ******************************************************************************/ 77 ******************************************************************************/
65 78
66acpi_status 79static acpi_status
67acpi_tb_get_primary_table ( 80acpi_tb_get_primary_table (
68 struct acpi_pointer *address, 81 struct acpi_pointer *address,
69 struct acpi_table_desc *table_info) 82 struct acpi_table_desc *table_info)
@@ -81,9 +94,8 @@ acpi_tb_get_primary_table (
81 return_ACPI_STATUS (AE_OK); 94 return_ACPI_STATUS (AE_OK);
82 } 95 }
83 96
84 /* 97 /* Get the header in order to get signature and table size */
85 * Get the header in order to get signature and table size 98
86 */
87 status = acpi_tb_get_table_header (address, &header); 99 status = acpi_tb_get_table_header (address, &header);
88 if (ACPI_FAILURE (status)) { 100 if (ACPI_FAILURE (status)) {
89 return_ACPI_STATUS (status); 101 return_ACPI_STATUS (status);
@@ -130,7 +142,7 @@ acpi_tb_get_primary_table (
130 * 142 *
131 ******************************************************************************/ 143 ******************************************************************************/
132 144
133acpi_status 145static acpi_status
134acpi_tb_get_secondary_table ( 146acpi_tb_get_secondary_table (
135 struct acpi_pointer *address, 147 struct acpi_pointer *address,
136 acpi_string signature, 148 acpi_string signature,
@@ -153,7 +165,8 @@ acpi_tb_get_secondary_table (
153 /* Signature must match request */ 165 /* Signature must match request */
154 166
155 if (ACPI_STRNCMP (header.signature, signature, ACPI_NAME_SIZE)) { 167 if (ACPI_STRNCMP (header.signature, signature, ACPI_NAME_SIZE)) {
156 ACPI_REPORT_ERROR (("Incorrect table signature - wanted [%s] found [%4.4s]\n", 168 ACPI_REPORT_ERROR ((
169 "Incorrect table signature - wanted [%s] found [%4.4s]\n",
157 signature, header.signature)); 170 signature, header.signature));
158 return_ACPI_STATUS (AE_BAD_SIGNATURE); 171 return_ACPI_STATUS (AE_BAD_SIGNATURE);
159 } 172 }
@@ -230,7 +243,8 @@ acpi_tb_get_required_tables (
230 for (i = 0; i < acpi_gbl_rsdt_table_count; i++) { 243 for (i = 0; i < acpi_gbl_rsdt_table_count; i++) {
231 /* Get the table address from the common internal XSDT */ 244 /* Get the table address from the common internal XSDT */
232 245
233 address.pointer.value = acpi_gbl_XSDT->table_offset_entry[i]; 246 address.pointer.value =
247 acpi_gbl_XSDT->table_offset_entry[i];
234 248
235 /* 249 /*
236 * Get the tables needed by this subsystem (FADT and any SSDTs). 250 * Get the tables needed by this subsystem (FADT and any SSDTs).
@@ -252,18 +266,18 @@ acpi_tb_get_required_tables (
252 } 266 }
253 267
254 /* 268 /*
255 * Convert the FADT to a common format. This allows earlier revisions of the 269 * Convert the FADT to a common format. This allows earlier revisions of
256 * table to coexist with newer versions, using common access code. 270 * the table to coexist with newer versions, using common access code.
257 */ 271 */
258 status = acpi_tb_convert_table_fadt (); 272 status = acpi_tb_convert_table_fadt ();
259 if (ACPI_FAILURE (status)) { 273 if (ACPI_FAILURE (status)) {
260 ACPI_REPORT_ERROR (("Could not convert FADT to internal common format\n")); 274 ACPI_REPORT_ERROR ((
275 "Could not convert FADT to internal common format\n"));
261 return_ACPI_STATUS (status); 276 return_ACPI_STATUS (status);
262 } 277 }
263 278
264 /* 279 /* Get the FACS (Pointed to by the FADT) */
265 * Get the FACS (Pointed to by the FADT) 280
266 */
267 address.pointer.value = acpi_gbl_FADT->xfirmware_ctrl; 281 address.pointer.value = acpi_gbl_FADT->xfirmware_ctrl;
268 282
269 status = acpi_tb_get_secondary_table (&address, FACS_SIG, &table_info); 283 status = acpi_tb_get_secondary_table (&address, FACS_SIG, &table_info);
@@ -282,9 +296,8 @@ acpi_tb_get_required_tables (
282 return_ACPI_STATUS (status); 296 return_ACPI_STATUS (status);
283 } 297 }
284 298
285 /* 299 /* Get/install the DSDT (Pointed to by the FADT) */
286 * Get/install the DSDT (Pointed to by the FADT) 300
287 */
288 address.pointer.value = acpi_gbl_FADT->Xdsdt; 301 address.pointer.value = acpi_gbl_FADT->Xdsdt;
289 302
290 status = acpi_tb_get_secondary_table (&address, DSDT_SIG, &table_info); 303 status = acpi_tb_get_secondary_table (&address, DSDT_SIG, &table_info);