Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /****************************************************************************** |
| 2 | * |
| 3 | * Module Name: utglobal - Global variables for the ACPI subsystem |
| 4 | * |
| 5 | *****************************************************************************/ |
| 6 | |
| 7 | /* |
Bob Moore | 4a90c7e | 2006-01-13 16:22:00 -0500 | [diff] [blame] | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 9 | * All rights reserved. |
| 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without |
| 12 | * modification, are permitted provided that the following conditions |
| 13 | * are met: |
| 14 | * 1. Redistributions of source code must retain the above copyright |
| 15 | * notice, this list of conditions, and the following disclaimer, |
| 16 | * without modification. |
| 17 | * 2. Redistributions in binary form must reproduce at minimum a disclaimer |
| 18 | * substantially similar to the "NO WARRANTY" disclaimer below |
| 19 | * ("Disclaimer") and any redistribution must be conditioned upon |
| 20 | * including a substantially similar Disclaimer requirement for further |
| 21 | * binary redistribution. |
| 22 | * 3. Neither the names of the above-listed copyright holders nor the names |
| 23 | * of any contributors may be used to endorse or promote products derived |
| 24 | * from this software without specific prior written permission. |
| 25 | * |
| 26 | * Alternatively, this software may be distributed under the terms of the |
| 27 | * GNU General Public License ("GPL") version 2 as published by the Free |
| 28 | * Software Foundation. |
| 29 | * |
| 30 | * NO WARRANTY |
| 31 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 32 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 33 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR |
| 34 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 35 | * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 36 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 37 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 38 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
| 39 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING |
| 40 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 41 | * POSSIBILITY OF SUCH DAMAGES. |
| 42 | */ |
| 43 | |
| 44 | #define DEFINE_ACPI_GLOBALS |
| 45 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 46 | #include <acpi/acpi.h> |
| 47 | #include <acpi/acnamesp.h> |
| 48 | |
| 49 | #define _COMPONENT ACPI_UTILITIES |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 50 | ACPI_MODULE_NAME("utglobal") |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 51 | |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 52 | /******************************************************************************* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 53 | * |
| 54 | * FUNCTION: acpi_format_exception |
| 55 | * |
| 56 | * PARAMETERS: Status - The acpi_status code to be formatted |
| 57 | * |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 58 | * RETURN: A string containing the exception text. A valid pointer is |
| 59 | * always returned. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 60 | * |
| 61 | * DESCRIPTION: This function translates an ACPI exception into an ASCII string. |
| 62 | * |
| 63 | ******************************************************************************/ |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 64 | const char *acpi_format_exception(acpi_status status) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 65 | { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 66 | acpi_status sub_status; |
| 67 | const char *exception = NULL; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 68 | |
Bob Moore | 4a90c7e | 2006-01-13 16:22:00 -0500 | [diff] [blame] | 69 | ACPI_FUNCTION_ENTRY(); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 70 | |
Bob Moore | 4a90c7e | 2006-01-13 16:22:00 -0500 | [diff] [blame] | 71 | /* |
| 72 | * Status is composed of two parts, a "type" and an actual code |
| 73 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 74 | sub_status = (status & ~AE_CODE_MASK); |
| 75 | |
| 76 | switch (status & AE_CODE_MASK) { |
| 77 | case AE_CODE_ENVIRONMENTAL: |
| 78 | |
| 79 | if (sub_status <= AE_CODE_ENV_MAX) { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 80 | exception = acpi_gbl_exception_names_env[sub_status]; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 81 | } |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 82 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 83 | |
| 84 | case AE_CODE_PROGRAMMER: |
| 85 | |
| 86 | if (sub_status <= AE_CODE_PGM_MAX) { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 87 | exception = |
| 88 | acpi_gbl_exception_names_pgm[sub_status - 1]; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 89 | } |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 90 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 91 | |
| 92 | case AE_CODE_ACPI_TABLES: |
| 93 | |
| 94 | if (sub_status <= AE_CODE_TBL_MAX) { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 95 | exception = |
| 96 | acpi_gbl_exception_names_tbl[sub_status - 1]; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 97 | } |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 98 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 99 | |
| 100 | case AE_CODE_AML: |
| 101 | |
| 102 | if (sub_status <= AE_CODE_AML_MAX) { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 103 | exception = |
| 104 | acpi_gbl_exception_names_aml[sub_status - 1]; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 105 | } |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 106 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 107 | |
| 108 | case AE_CODE_CONTROL: |
| 109 | |
| 110 | if (sub_status <= AE_CODE_CTRL_MAX) { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 111 | exception = |
| 112 | acpi_gbl_exception_names_ctrl[sub_status - 1]; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 113 | } |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 114 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 115 | |
| 116 | default: |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 117 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 118 | } |
| 119 | |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 120 | if (!exception) { |
Bob Moore | 52fc0b0 | 2006-10-02 00:00:00 -0400 | [diff] [blame] | 121 | |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 122 | /* Exception code was not recognized */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 123 | |
Bob Moore | b8e4d89 | 2006-01-27 16:43:00 -0500 | [diff] [blame] | 124 | ACPI_ERROR((AE_INFO, |
| 125 | "Unknown exception code: 0x%8.8X", status)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 126 | |
Bob Moore | 4a90c7e | 2006-01-13 16:22:00 -0500 | [diff] [blame] | 127 | exception = "UNKNOWN_STATUS_CODE"; |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 128 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 129 | |
Bob Moore | 4a90c7e | 2006-01-13 16:22:00 -0500 | [diff] [blame] | 130 | return (ACPI_CAST_PTR(const char, exception)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 131 | } |
| 132 | |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 133 | /******************************************************************************* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 134 | * |
| 135 | * Static global variable initialization. |
| 136 | * |
| 137 | ******************************************************************************/ |
| 138 | |
| 139 | /* |
| 140 | * We want the debug switches statically initialized so they |
| 141 | * are already set when the debugger is entered. |
| 142 | */ |
| 143 | |
| 144 | /* Debug switch - level and trace mask */ |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 145 | u32 acpi_dbg_level = ACPI_DEBUG_DEFAULT; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 146 | |
| 147 | /* Debug switch - layer (component) mask */ |
| 148 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 149 | u32 acpi_dbg_layer = ACPI_COMPONENT_DEFAULT | ACPI_ALL_DRIVERS; |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 150 | u32 acpi_gbl_nesting_level = 0; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 151 | |
| 152 | /* Debugger globals */ |
| 153 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 154 | u8 acpi_gbl_db_terminate_threads = FALSE; |
| 155 | u8 acpi_gbl_abort_method = FALSE; |
| 156 | u8 acpi_gbl_method_executing = FALSE; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 157 | |
| 158 | /* System flags */ |
| 159 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 160 | u32 acpi_gbl_startup_flags = 0; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 161 | |
| 162 | /* System starts uninitialized */ |
| 163 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 164 | u8 acpi_gbl_shutdown = TRUE; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 165 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 166 | const u8 acpi_gbl_decode_to8bit[8] = { 1, 2, 4, 8, 16, 32, 64, 128 }; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 167 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 168 | const char *acpi_gbl_sleep_state_names[ACPI_S_STATE_COUNT] = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 169 | "\\_S0_", |
| 170 | "\\_S1_", |
| 171 | "\\_S2_", |
| 172 | "\\_S3_", |
| 173 | "\\_S4_", |
| 174 | "\\_S5_" |
| 175 | }; |
| 176 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 177 | const char *acpi_gbl_highest_dstate_names[4] = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 178 | "_S1D", |
| 179 | "_S2D", |
| 180 | "_S3D", |
| 181 | "_S4D" |
| 182 | }; |
| 183 | |
| 184 | /* |
| 185 | * Strings supported by the _OSI predefined (internal) method. |
| 186 | * When adding strings, be sure to update ACPI_NUM_OSI_STRINGS. |
| 187 | */ |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 188 | const char *acpi_gbl_valid_osi_strings[ACPI_NUM_OSI_STRINGS] = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 189 | /* Operating System Vendor Strings */ |
| 190 | |
| 191 | "Linux", |
| 192 | "Windows 2000", |
| 193 | "Windows 2001", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 194 | "Windows 2001 SP0", |
| 195 | "Windows 2001 SP1", |
| 196 | "Windows 2001 SP2", |
| 197 | "Windows 2001 SP3", |
| 198 | "Windows 2001 SP4", |
Bob Moore | 61686124 | 2006-03-17 16:44:00 -0500 | [diff] [blame^] | 199 | "Windows 2001.1", |
| 200 | "Windows 2001.1 SP1", /* Added 03/2006 */ |
| 201 | "Windows 2006", /* Added 03/2006 */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 202 | |
| 203 | /* Feature Group Strings */ |
| 204 | |
| 205 | "Extended Address Space Descriptor" |
| 206 | }; |
| 207 | |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 208 | /******************************************************************************* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 209 | * |
| 210 | * Namespace globals |
| 211 | * |
| 212 | ******************************************************************************/ |
| 213 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 214 | /* |
| 215 | * Predefined ACPI Names (Built-in to the Interpreter) |
| 216 | * |
| 217 | * NOTES: |
| 218 | * 1) _SB_ is defined to be a device to allow \_SB_._INI to be run |
| 219 | * during the initialization sequence. |
| 220 | * 2) _TZ_ is defined to be a thermal zone in order to allow ASL code to |
| 221 | * perform a Notify() operation on it. |
| 222 | */ |
Bob Moore | 0897831 | 2005-10-21 00:00:00 -0400 | [diff] [blame] | 223 | const struct acpi_predefined_names acpi_gbl_pre_defined_names[] = { |
| 224 | {"_GPE", ACPI_TYPE_LOCAL_SCOPE, NULL}, |
| 225 | {"_PR_", ACPI_TYPE_LOCAL_SCOPE, NULL}, |
| 226 | {"_SB_", ACPI_TYPE_DEVICE, NULL}, |
| 227 | {"_SI_", ACPI_TYPE_LOCAL_SCOPE, NULL}, |
| 228 | {"_TZ_", ACPI_TYPE_THERMAL, NULL}, |
| 229 | {"_REV", ACPI_TYPE_INTEGER, (char *)ACPI_CA_SUPPORT_LEVEL}, |
| 230 | {"_OS_", ACPI_TYPE_STRING, ACPI_OS_NAME}, |
| 231 | {"_GL_", ACPI_TYPE_MUTEX, (char *)1}, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 232 | |
| 233 | #if !defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY) |
Bob Moore | 0897831 | 2005-10-21 00:00:00 -0400 | [diff] [blame] | 234 | {"_OSI", ACPI_TYPE_METHOD, (char *)1}, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 235 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 236 | |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 237 | /* Table terminator */ |
| 238 | |
Bob Moore | 0897831 | 2005-10-21 00:00:00 -0400 | [diff] [blame] | 239 | {NULL, ACPI_TYPE_ANY, NULL} |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 240 | }; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 241 | |
| 242 | /* |
| 243 | * Properties of the ACPI Object Types, both internal and external. |
| 244 | * The table is indexed by values of acpi_object_type |
| 245 | */ |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 246 | const u8 acpi_gbl_ns_properties[] = { |
| 247 | ACPI_NS_NORMAL, /* 00 Any */ |
| 248 | ACPI_NS_NORMAL, /* 01 Number */ |
| 249 | ACPI_NS_NORMAL, /* 02 String */ |
| 250 | ACPI_NS_NORMAL, /* 03 Buffer */ |
| 251 | ACPI_NS_NORMAL, /* 04 Package */ |
| 252 | ACPI_NS_NORMAL, /* 05 field_unit */ |
| 253 | ACPI_NS_NEWSCOPE, /* 06 Device */ |
| 254 | ACPI_NS_NORMAL, /* 07 Event */ |
| 255 | ACPI_NS_NEWSCOPE, /* 08 Method */ |
| 256 | ACPI_NS_NORMAL, /* 09 Mutex */ |
| 257 | ACPI_NS_NORMAL, /* 10 Region */ |
| 258 | ACPI_NS_NEWSCOPE, /* 11 Power */ |
| 259 | ACPI_NS_NEWSCOPE, /* 12 Processor */ |
| 260 | ACPI_NS_NEWSCOPE, /* 13 Thermal */ |
| 261 | ACPI_NS_NORMAL, /* 14 buffer_field */ |
| 262 | ACPI_NS_NORMAL, /* 15 ddb_handle */ |
| 263 | ACPI_NS_NORMAL, /* 16 Debug Object */ |
| 264 | ACPI_NS_NORMAL, /* 17 def_field */ |
| 265 | ACPI_NS_NORMAL, /* 18 bank_field */ |
| 266 | ACPI_NS_NORMAL, /* 19 index_field */ |
| 267 | ACPI_NS_NORMAL, /* 20 Reference */ |
| 268 | ACPI_NS_NORMAL, /* 21 Alias */ |
| 269 | ACPI_NS_NORMAL, /* 22 method_alias */ |
| 270 | ACPI_NS_NORMAL, /* 23 Notify */ |
| 271 | ACPI_NS_NORMAL, /* 24 Address Handler */ |
| 272 | ACPI_NS_NEWSCOPE | ACPI_NS_LOCAL, /* 25 Resource Desc */ |
| 273 | ACPI_NS_NEWSCOPE | ACPI_NS_LOCAL, /* 26 Resource Field */ |
| 274 | ACPI_NS_NEWSCOPE, /* 27 Scope */ |
| 275 | ACPI_NS_NORMAL, /* 28 Extra */ |
| 276 | ACPI_NS_NORMAL, /* 29 Data */ |
| 277 | ACPI_NS_NORMAL /* 30 Invalid */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 278 | }; |
| 279 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 280 | /* Hex to ASCII conversion table */ |
| 281 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 282 | static const char acpi_gbl_hex_to_ascii[] = { |
| 283 | '0', '1', '2', '3', '4', '5', '6', '7', |
| 284 | '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 285 | }; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 286 | |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 287 | /******************************************************************************* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 288 | * |
| 289 | * FUNCTION: acpi_ut_hex_to_ascii_char |
| 290 | * |
| 291 | * PARAMETERS: Integer - Contains the hex digit |
| 292 | * Position - bit position of the digit within the |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 293 | * integer (multiple of 4) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 294 | * |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 295 | * RETURN: The converted Ascii character |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 296 | * |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 297 | * DESCRIPTION: Convert a hex digit to an Ascii character |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 298 | * |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 299 | ******************************************************************************/ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 300 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 301 | char acpi_ut_hex_to_ascii_char(acpi_integer integer, u32 position) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 302 | { |
| 303 | |
| 304 | return (acpi_gbl_hex_to_ascii[(integer >> position) & 0xF]); |
| 305 | } |
| 306 | |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 307 | /******************************************************************************* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 308 | * |
| 309 | * Table name globals |
| 310 | * |
| 311 | * NOTE: This table includes ONLY the ACPI tables that the subsystem consumes. |
| 312 | * it is NOT an exhaustive list of all possible ACPI tables. All ACPI tables |
| 313 | * that are not used by the subsystem are simply ignored. |
| 314 | * |
| 315 | * Do NOT add any table to this list that is not consumed directly by this |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 316 | * subsystem (No MADT, ECDT, SBST, etc.) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 317 | * |
| 318 | ******************************************************************************/ |
| 319 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 320 | struct acpi_table_list acpi_gbl_table_lists[NUM_ACPI_TABLE_TYPES]; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 321 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 322 | struct acpi_table_support acpi_gbl_table_data[NUM_ACPI_TABLE_TYPES] = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 323 | /*********** Name, Signature, Global typed pointer Signature size, Type How many allowed?, Contains valid AML? */ |
| 324 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 325 | /* RSDP 0 */ {RSDP_NAME, RSDP_SIG, NULL, sizeof(RSDP_SIG) - 1, |
| 326 | ACPI_TABLE_ROOT | ACPI_TABLE_SINGLE} |
| 327 | , |
| 328 | /* DSDT 1 */ {DSDT_SIG, DSDT_SIG, (void *)&acpi_gbl_DSDT, |
| 329 | sizeof(DSDT_SIG) - 1, |
| 330 | ACPI_TABLE_SECONDARY | ACPI_TABLE_SINGLE | |
| 331 | ACPI_TABLE_EXECUTABLE} |
| 332 | , |
| 333 | /* FADT 2 */ {FADT_SIG, FADT_SIG, (void *)&acpi_gbl_FADT, |
| 334 | sizeof(FADT_SIG) - 1, |
| 335 | ACPI_TABLE_PRIMARY | ACPI_TABLE_SINGLE} |
| 336 | , |
| 337 | /* FACS 3 */ {FACS_SIG, FACS_SIG, (void *)&acpi_gbl_FACS, |
| 338 | sizeof(FACS_SIG) - 1, |
| 339 | ACPI_TABLE_SECONDARY | ACPI_TABLE_SINGLE} |
| 340 | , |
| 341 | /* PSDT 4 */ {PSDT_SIG, PSDT_SIG, NULL, sizeof(PSDT_SIG) - 1, |
| 342 | ACPI_TABLE_PRIMARY | ACPI_TABLE_MULTIPLE | |
| 343 | ACPI_TABLE_EXECUTABLE} |
| 344 | , |
| 345 | /* SSDT 5 */ {SSDT_SIG, SSDT_SIG, NULL, sizeof(SSDT_SIG) - 1, |
| 346 | ACPI_TABLE_PRIMARY | ACPI_TABLE_MULTIPLE | |
| 347 | ACPI_TABLE_EXECUTABLE} |
| 348 | , |
| 349 | /* XSDT 6 */ {XSDT_SIG, XSDT_SIG, NULL, sizeof(RSDT_SIG) - 1, |
| 350 | ACPI_TABLE_ROOT | ACPI_TABLE_SINGLE} |
| 351 | , |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 352 | }; |
| 353 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 354 | /****************************************************************************** |
| 355 | * |
| 356 | * Event and Hardware globals |
| 357 | * |
| 358 | ******************************************************************************/ |
| 359 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 360 | struct acpi_bit_register_info acpi_gbl_bit_register_info[ACPI_NUM_BITREG] = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 361 | /* Name Parent Register Register Bit Position Register Bit Mask */ |
| 362 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 363 | /* ACPI_BITREG_TIMER_STATUS */ {ACPI_REGISTER_PM1_STATUS, |
| 364 | ACPI_BITPOSITION_TIMER_STATUS, |
| 365 | ACPI_BITMASK_TIMER_STATUS}, |
| 366 | /* ACPI_BITREG_BUS_MASTER_STATUS */ {ACPI_REGISTER_PM1_STATUS, |
| 367 | ACPI_BITPOSITION_BUS_MASTER_STATUS, |
| 368 | ACPI_BITMASK_BUS_MASTER_STATUS}, |
| 369 | /* ACPI_BITREG_GLOBAL_LOCK_STATUS */ {ACPI_REGISTER_PM1_STATUS, |
| 370 | ACPI_BITPOSITION_GLOBAL_LOCK_STATUS, |
| 371 | ACPI_BITMASK_GLOBAL_LOCK_STATUS}, |
| 372 | /* ACPI_BITREG_POWER_BUTTON_STATUS */ {ACPI_REGISTER_PM1_STATUS, |
| 373 | ACPI_BITPOSITION_POWER_BUTTON_STATUS, |
| 374 | ACPI_BITMASK_POWER_BUTTON_STATUS}, |
| 375 | /* ACPI_BITREG_SLEEP_BUTTON_STATUS */ {ACPI_REGISTER_PM1_STATUS, |
| 376 | ACPI_BITPOSITION_SLEEP_BUTTON_STATUS, |
| 377 | ACPI_BITMASK_SLEEP_BUTTON_STATUS}, |
| 378 | /* ACPI_BITREG_RT_CLOCK_STATUS */ {ACPI_REGISTER_PM1_STATUS, |
| 379 | ACPI_BITPOSITION_RT_CLOCK_STATUS, |
| 380 | ACPI_BITMASK_RT_CLOCK_STATUS}, |
| 381 | /* ACPI_BITREG_WAKE_STATUS */ {ACPI_REGISTER_PM1_STATUS, |
| 382 | ACPI_BITPOSITION_WAKE_STATUS, |
| 383 | ACPI_BITMASK_WAKE_STATUS}, |
| 384 | /* ACPI_BITREG_PCIEXP_WAKE_STATUS */ {ACPI_REGISTER_PM1_STATUS, |
| 385 | ACPI_BITPOSITION_PCIEXP_WAKE_STATUS, |
| 386 | ACPI_BITMASK_PCIEXP_WAKE_STATUS}, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 387 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 388 | /* ACPI_BITREG_TIMER_ENABLE */ {ACPI_REGISTER_PM1_ENABLE, |
| 389 | ACPI_BITPOSITION_TIMER_ENABLE, |
| 390 | ACPI_BITMASK_TIMER_ENABLE}, |
| 391 | /* ACPI_BITREG_GLOBAL_LOCK_ENABLE */ {ACPI_REGISTER_PM1_ENABLE, |
| 392 | ACPI_BITPOSITION_GLOBAL_LOCK_ENABLE, |
| 393 | ACPI_BITMASK_GLOBAL_LOCK_ENABLE}, |
| 394 | /* ACPI_BITREG_POWER_BUTTON_ENABLE */ {ACPI_REGISTER_PM1_ENABLE, |
| 395 | ACPI_BITPOSITION_POWER_BUTTON_ENABLE, |
| 396 | ACPI_BITMASK_POWER_BUTTON_ENABLE}, |
| 397 | /* ACPI_BITREG_SLEEP_BUTTON_ENABLE */ {ACPI_REGISTER_PM1_ENABLE, |
| 398 | ACPI_BITPOSITION_SLEEP_BUTTON_ENABLE, |
| 399 | ACPI_BITMASK_SLEEP_BUTTON_ENABLE}, |
| 400 | /* ACPI_BITREG_RT_CLOCK_ENABLE */ {ACPI_REGISTER_PM1_ENABLE, |
| 401 | ACPI_BITPOSITION_RT_CLOCK_ENABLE, |
| 402 | ACPI_BITMASK_RT_CLOCK_ENABLE}, |
| 403 | /* ACPI_BITREG_WAKE_ENABLE */ {ACPI_REGISTER_PM1_ENABLE, 0, 0}, |
| 404 | /* ACPI_BITREG_PCIEXP_WAKE_DISABLE */ {ACPI_REGISTER_PM1_ENABLE, |
| 405 | ACPI_BITPOSITION_PCIEXP_WAKE_DISABLE, |
| 406 | ACPI_BITMASK_PCIEXP_WAKE_DISABLE}, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 407 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 408 | /* ACPI_BITREG_SCI_ENABLE */ {ACPI_REGISTER_PM1_CONTROL, |
| 409 | ACPI_BITPOSITION_SCI_ENABLE, |
| 410 | ACPI_BITMASK_SCI_ENABLE}, |
| 411 | /* ACPI_BITREG_BUS_MASTER_RLD */ {ACPI_REGISTER_PM1_CONTROL, |
| 412 | ACPI_BITPOSITION_BUS_MASTER_RLD, |
| 413 | ACPI_BITMASK_BUS_MASTER_RLD}, |
| 414 | /* ACPI_BITREG_GLOBAL_LOCK_RELEASE */ {ACPI_REGISTER_PM1_CONTROL, |
| 415 | ACPI_BITPOSITION_GLOBAL_LOCK_RELEASE, |
| 416 | ACPI_BITMASK_GLOBAL_LOCK_RELEASE}, |
| 417 | /* ACPI_BITREG_SLEEP_TYPE_A */ {ACPI_REGISTER_PM1_CONTROL, |
| 418 | ACPI_BITPOSITION_SLEEP_TYPE_X, |
| 419 | ACPI_BITMASK_SLEEP_TYPE_X}, |
| 420 | /* ACPI_BITREG_SLEEP_TYPE_B */ {ACPI_REGISTER_PM1_CONTROL, |
| 421 | ACPI_BITPOSITION_SLEEP_TYPE_X, |
| 422 | ACPI_BITMASK_SLEEP_TYPE_X}, |
| 423 | /* ACPI_BITREG_SLEEP_ENABLE */ {ACPI_REGISTER_PM1_CONTROL, |
| 424 | ACPI_BITPOSITION_SLEEP_ENABLE, |
| 425 | ACPI_BITMASK_SLEEP_ENABLE}, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 426 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 427 | /* ACPI_BITREG_ARB_DIS */ {ACPI_REGISTER_PM2_CONTROL, |
| 428 | ACPI_BITPOSITION_ARB_DISABLE, |
| 429 | ACPI_BITMASK_ARB_DISABLE} |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 430 | }; |
| 431 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 432 | struct acpi_fixed_event_info acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS] = { |
| 433 | /* ACPI_EVENT_PMTIMER */ {ACPI_BITREG_TIMER_STATUS, |
| 434 | ACPI_BITREG_TIMER_ENABLE, |
| 435 | ACPI_BITMASK_TIMER_STATUS, |
| 436 | ACPI_BITMASK_TIMER_ENABLE}, |
| 437 | /* ACPI_EVENT_GLOBAL */ {ACPI_BITREG_GLOBAL_LOCK_STATUS, |
| 438 | ACPI_BITREG_GLOBAL_LOCK_ENABLE, |
| 439 | ACPI_BITMASK_GLOBAL_LOCK_STATUS, |
| 440 | ACPI_BITMASK_GLOBAL_LOCK_ENABLE}, |
| 441 | /* ACPI_EVENT_POWER_BUTTON */ {ACPI_BITREG_POWER_BUTTON_STATUS, |
| 442 | ACPI_BITREG_POWER_BUTTON_ENABLE, |
| 443 | ACPI_BITMASK_POWER_BUTTON_STATUS, |
| 444 | ACPI_BITMASK_POWER_BUTTON_ENABLE}, |
| 445 | /* ACPI_EVENT_SLEEP_BUTTON */ {ACPI_BITREG_SLEEP_BUTTON_STATUS, |
| 446 | ACPI_BITREG_SLEEP_BUTTON_ENABLE, |
| 447 | ACPI_BITMASK_SLEEP_BUTTON_STATUS, |
| 448 | ACPI_BITMASK_SLEEP_BUTTON_ENABLE}, |
| 449 | /* ACPI_EVENT_RTC */ {ACPI_BITREG_RT_CLOCK_STATUS, |
| 450 | ACPI_BITREG_RT_CLOCK_ENABLE, |
| 451 | ACPI_BITMASK_RT_CLOCK_STATUS, |
| 452 | ACPI_BITMASK_RT_CLOCK_ENABLE}, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 453 | }; |
| 454 | |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 455 | /******************************************************************************* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 456 | * |
| 457 | * FUNCTION: acpi_ut_get_region_name |
| 458 | * |
| 459 | * PARAMETERS: None. |
| 460 | * |
| 461 | * RETURN: Status |
| 462 | * |
| 463 | * DESCRIPTION: Translate a Space ID into a name string (Debug only) |
| 464 | * |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 465 | ******************************************************************************/ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 466 | |
| 467 | /* Region type decoding */ |
| 468 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 469 | const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS] = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 470 | /*! [Begin] no source code translation (keep these ASL Keywords as-is) */ |
| 471 | "SystemMemory", |
| 472 | "SystemIO", |
| 473 | "PCI_Config", |
| 474 | "EmbeddedControl", |
| 475 | "SMBus", |
| 476 | "CMOS", |
| 477 | "PCIBARTarget", |
| 478 | "DataTable" |
| 479 | /*! [End] no source code translation !*/ |
| 480 | }; |
| 481 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 482 | char *acpi_ut_get_region_name(u8 space_id) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 483 | { |
| 484 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 485 | if (space_id >= ACPI_USER_REGION_BEGIN) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 486 | return ("user_defined_region"); |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 487 | } else if (space_id >= ACPI_NUM_PREDEFINED_REGIONS) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 488 | return ("invalid_space_id"); |
| 489 | } |
| 490 | |
Bob Moore | defba1d | 2005-12-16 17:05:00 -0500 | [diff] [blame] | 491 | return (ACPI_CAST_PTR(char, acpi_gbl_region_types[space_id])); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 492 | } |
| 493 | |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 494 | /******************************************************************************* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 495 | * |
| 496 | * FUNCTION: acpi_ut_get_event_name |
| 497 | * |
| 498 | * PARAMETERS: None. |
| 499 | * |
| 500 | * RETURN: Status |
| 501 | * |
| 502 | * DESCRIPTION: Translate a Event ID into a name string (Debug only) |
| 503 | * |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 504 | ******************************************************************************/ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 505 | |
| 506 | /* Event type decoding */ |
| 507 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 508 | static const char *acpi_gbl_event_types[ACPI_NUM_FIXED_EVENTS] = { |
Bob Moore | 0897831 | 2005-10-21 00:00:00 -0400 | [diff] [blame] | 509 | /*! [Begin] no source code translation (keep these strings as-is) */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 510 | "PM_Timer", |
Bob Moore | 0897831 | 2005-10-21 00:00:00 -0400 | [diff] [blame] | 511 | "GlobalLock", |
| 512 | "PowerButton", |
| 513 | "SleepButton", |
| 514 | "RealTimeClock", |
| 515 | /*! [End] no source code translation !*/ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 516 | }; |
| 517 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 518 | char *acpi_ut_get_event_name(u32 event_id) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 519 | { |
| 520 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 521 | if (event_id > ACPI_EVENT_MAX) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 522 | return ("invalid_event_iD"); |
| 523 | } |
| 524 | |
Bob Moore | 4a90c7e | 2006-01-13 16:22:00 -0500 | [diff] [blame] | 525 | return (ACPI_CAST_PTR(char, acpi_gbl_event_types[event_id])); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 526 | } |
| 527 | |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 528 | /******************************************************************************* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 529 | * |
| 530 | * FUNCTION: acpi_ut_get_type_name |
| 531 | * |
| 532 | * PARAMETERS: None. |
| 533 | * |
| 534 | * RETURN: Status |
| 535 | * |
| 536 | * DESCRIPTION: Translate a Type ID into a name string (Debug only) |
| 537 | * |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 538 | ******************************************************************************/ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 539 | |
| 540 | /* |
| 541 | * Elements of acpi_gbl_ns_type_names below must match |
| 542 | * one-to-one with values of acpi_object_type |
| 543 | * |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 544 | * The type ACPI_TYPE_ANY (Untyped) is used as a "don't care" when searching; |
| 545 | * when stored in a table it really means that we have thus far seen no |
| 546 | * evidence to indicate what type is actually going to be stored for this entry. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 547 | */ |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 548 | static const char acpi_gbl_bad_type[] = "UNDEFINED"; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 549 | |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 550 | /* Printable names of the ACPI object types */ |
| 551 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 552 | static const char *acpi_gbl_ns_type_names[] = { |
Bob Moore | 0897831 | 2005-10-21 00:00:00 -0400 | [diff] [blame] | 553 | /*! [Begin] no source code translation (keep these strings as-is) */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 554 | /* 00 */ "Untyped", |
| 555 | /* 01 */ "Integer", |
| 556 | /* 02 */ "String", |
| 557 | /* 03 */ "Buffer", |
| 558 | /* 04 */ "Package", |
Bob Moore | 0897831 | 2005-10-21 00:00:00 -0400 | [diff] [blame] | 559 | /* 05 */ "FieldUnit", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 560 | /* 06 */ "Device", |
| 561 | /* 07 */ "Event", |
| 562 | /* 08 */ "Method", |
| 563 | /* 09 */ "Mutex", |
| 564 | /* 10 */ "Region", |
| 565 | /* 11 */ "Power", |
| 566 | /* 12 */ "Processor", |
| 567 | /* 13 */ "Thermal", |
Bob Moore | 0897831 | 2005-10-21 00:00:00 -0400 | [diff] [blame] | 568 | /* 14 */ "BufferField", |
| 569 | /* 15 */ "DdbHandle", |
| 570 | /* 16 */ "DebugObject", |
| 571 | /* 17 */ "RegionField", |
| 572 | /* 18 */ "BankField", |
| 573 | /* 19 */ "IndexField", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 574 | /* 20 */ "Reference", |
| 575 | /* 21 */ "Alias", |
Bob Moore | 0897831 | 2005-10-21 00:00:00 -0400 | [diff] [blame] | 576 | /* 22 */ "MethodAlias", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 577 | /* 23 */ "Notify", |
Bob Moore | 0897831 | 2005-10-21 00:00:00 -0400 | [diff] [blame] | 578 | /* 24 */ "AddrHandler", |
| 579 | /* 25 */ "ResourceDesc", |
| 580 | /* 26 */ "ResourceFld", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 581 | /* 27 */ "Scope", |
| 582 | /* 28 */ "Extra", |
| 583 | /* 29 */ "Data", |
| 584 | /* 30 */ "Invalid" |
Bob Moore | 0897831 | 2005-10-21 00:00:00 -0400 | [diff] [blame] | 585 | /*! [End] no source code translation !*/ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 586 | }; |
| 587 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 588 | char *acpi_ut_get_type_name(acpi_object_type type) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 589 | { |
| 590 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 591 | if (type > ACPI_TYPE_INVALID) { |
Bob Moore | 4a90c7e | 2006-01-13 16:22:00 -0500 | [diff] [blame] | 592 | return (ACPI_CAST_PTR(char, acpi_gbl_bad_type)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 593 | } |
| 594 | |
Bob Moore | 4a90c7e | 2006-01-13 16:22:00 -0500 | [diff] [blame] | 595 | return (ACPI_CAST_PTR(char, acpi_gbl_ns_type_names[type])); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 596 | } |
| 597 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 598 | char *acpi_ut_get_object_type_name(union acpi_operand_object *obj_desc) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 599 | { |
| 600 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 601 | if (!obj_desc) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 602 | return ("[NULL Object Descriptor]"); |
| 603 | } |
| 604 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 605 | return (acpi_ut_get_type_name(ACPI_GET_OBJECT_TYPE(obj_desc))); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 606 | } |
| 607 | |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 608 | /******************************************************************************* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 609 | * |
| 610 | * FUNCTION: acpi_ut_get_node_name |
| 611 | * |
| 612 | * PARAMETERS: Object - A namespace node |
| 613 | * |
| 614 | * RETURN: Pointer to a string |
| 615 | * |
| 616 | * DESCRIPTION: Validate the node and return the node's ACPI name. |
| 617 | * |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 618 | ******************************************************************************/ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 619 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 620 | char *acpi_ut_get_node_name(void *object) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 621 | { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 622 | struct acpi_namespace_node *node = (struct acpi_namespace_node *)object; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 623 | |
| 624 | /* Must return a string of exactly 4 characters == ACPI_NAME_SIZE */ |
| 625 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 626 | if (!object) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 627 | return ("NULL"); |
| 628 | } |
| 629 | |
| 630 | /* Check for Root node */ |
| 631 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 632 | if ((object == ACPI_ROOT_OBJECT) || (object == acpi_gbl_root_node)) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 633 | return ("\"\\\" "); |
| 634 | } |
| 635 | |
| 636 | /* Descriptor must be a namespace node */ |
| 637 | |
Bob Moore | 61686124 | 2006-03-17 16:44:00 -0500 | [diff] [blame^] | 638 | if (ACPI_GET_DESCRIPTOR_TYPE(node) != ACPI_DESC_TYPE_NAMED) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 639 | return ("####"); |
| 640 | } |
| 641 | |
| 642 | /* Name must be a valid ACPI name */ |
| 643 | |
Bob Moore | c51a4de | 2005-11-17 13:07:00 -0500 | [diff] [blame] | 644 | if (!acpi_ut_valid_acpi_name(node->name.integer)) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 645 | return ("????"); |
| 646 | } |
| 647 | |
| 648 | /* Return the name */ |
| 649 | |
| 650 | return (node->name.ascii); |
| 651 | } |
| 652 | |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 653 | /******************************************************************************* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 654 | * |
| 655 | * FUNCTION: acpi_ut_get_descriptor_name |
| 656 | * |
| 657 | * PARAMETERS: Object - An ACPI object |
| 658 | * |
| 659 | * RETURN: Pointer to a string |
| 660 | * |
| 661 | * DESCRIPTION: Validate object and return the descriptor type |
| 662 | * |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 663 | ******************************************************************************/ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 664 | |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 665 | /* Printable names of object descriptor types */ |
| 666 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 667 | static const char *acpi_gbl_desc_type_names[] = { |
Bob Moore | 0897831 | 2005-10-21 00:00:00 -0400 | [diff] [blame] | 668 | /*! [Begin] no source code translation (keep these ASL Keywords as-is) */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 669 | /* 00 */ "Invalid", |
| 670 | /* 01 */ "Cached", |
| 671 | /* 02 */ "State-Generic", |
| 672 | /* 03 */ "State-Update", |
| 673 | /* 04 */ "State-Package", |
| 674 | /* 05 */ "State-Control", |
Bob Moore | 0897831 | 2005-10-21 00:00:00 -0400 | [diff] [blame] | 675 | /* 06 */ "State-RootParseScope", |
| 676 | /* 07 */ "State-ParseScope", |
| 677 | /* 08 */ "State-WalkScope", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 678 | /* 09 */ "State-Result", |
| 679 | /* 10 */ "State-Notify", |
| 680 | /* 11 */ "State-Thread", |
| 681 | /* 12 */ "Walk", |
| 682 | /* 13 */ "Parser", |
| 683 | /* 14 */ "Operand", |
| 684 | /* 15 */ "Node" |
Bob Moore | 0897831 | 2005-10-21 00:00:00 -0400 | [diff] [blame] | 685 | /*! [End] no source code translation !*/ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 686 | }; |
| 687 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 688 | char *acpi_ut_get_descriptor_name(void *object) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 689 | { |
| 690 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 691 | if (!object) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 692 | return ("NULL OBJECT"); |
| 693 | } |
| 694 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 695 | if (ACPI_GET_DESCRIPTOR_TYPE(object) > ACPI_DESC_TYPE_MAX) { |
Bob Moore | defba1d | 2005-12-16 17:05:00 -0500 | [diff] [blame] | 696 | return (ACPI_CAST_PTR(char, acpi_gbl_bad_type)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 697 | } |
| 698 | |
Bob Moore | defba1d | 2005-12-16 17:05:00 -0500 | [diff] [blame] | 699 | return (ACPI_CAST_PTR(char, |
| 700 | acpi_gbl_desc_type_names[ACPI_GET_DESCRIPTOR_TYPE |
| 701 | (object)])); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 702 | |
| 703 | } |
| 704 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 705 | #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) |
| 706 | /* |
| 707 | * Strings and procedures used for debug only |
| 708 | */ |
| 709 | |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 710 | /******************************************************************************* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 711 | * |
| 712 | * FUNCTION: acpi_ut_get_mutex_name |
| 713 | * |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 714 | * PARAMETERS: mutex_id - The predefined ID for this mutex. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 715 | * |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 716 | * RETURN: String containing the name of the mutex. Always returns a valid |
| 717 | * pointer. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 718 | * |
| 719 | * DESCRIPTION: Translate a mutex ID into a name string (Debug only) |
| 720 | * |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 721 | ******************************************************************************/ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 722 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 723 | char *acpi_ut_get_mutex_name(u32 mutex_id) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 724 | { |
| 725 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 726 | if (mutex_id > MAX_MUTEX) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 727 | return ("Invalid Mutex ID"); |
| 728 | } |
| 729 | |
| 730 | return (acpi_gbl_mutex_names[mutex_id]); |
| 731 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 732 | #endif |
| 733 | |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 734 | /******************************************************************************* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 735 | * |
| 736 | * FUNCTION: acpi_ut_valid_object_type |
| 737 | * |
| 738 | * PARAMETERS: Type - Object type to be validated |
| 739 | * |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 740 | * RETURN: TRUE if valid object type, FALSE otherwise |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 741 | * |
| 742 | * DESCRIPTION: Validate an object type |
| 743 | * |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 744 | ******************************************************************************/ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 745 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 746 | u8 acpi_ut_valid_object_type(acpi_object_type type) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 747 | { |
| 748 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 749 | if (type > ACPI_TYPE_LOCAL_MAX) { |
Bob Moore | 52fc0b0 | 2006-10-02 00:00:00 -0400 | [diff] [blame] | 750 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 751 | /* Note: Assumes all TYPEs are contiguous (external/local) */ |
| 752 | |
| 753 | return (FALSE); |
| 754 | } |
| 755 | |
| 756 | return (TRUE); |
| 757 | } |
| 758 | |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 759 | /******************************************************************************* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 760 | * |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 761 | * FUNCTION: acpi_ut_init_globals |
| 762 | * |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 763 | * PARAMETERS: None |
| 764 | * |
| 765 | * RETURN: None |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 766 | * |
| 767 | * DESCRIPTION: Init library globals. All globals that require specific |
| 768 | * initialization should be initialized here! |
| 769 | * |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 770 | ******************************************************************************/ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 771 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 772 | void acpi_ut_init_globals(void) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 773 | { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 774 | acpi_status status; |
| 775 | u32 i; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 776 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 777 | ACPI_FUNCTION_TRACE("ut_init_globals"); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 778 | |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 779 | /* Create all memory caches */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 780 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 781 | status = acpi_ut_create_caches(); |
| 782 | if (ACPI_FAILURE(status)) { |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 783 | return; |
| 784 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 785 | |
| 786 | /* ACPI table structure */ |
| 787 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 788 | for (i = 0; i < NUM_ACPI_TABLE_TYPES; i++) { |
| 789 | acpi_gbl_table_lists[i].next = NULL; |
| 790 | acpi_gbl_table_lists[i].count = 0; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 791 | } |
| 792 | |
| 793 | /* Mutex locked flags */ |
| 794 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 795 | for (i = 0; i < NUM_MUTEX; i++) { |
| 796 | acpi_gbl_mutex_info[i].mutex = NULL; |
| 797 | acpi_gbl_mutex_info[i].thread_id = ACPI_MUTEX_NOT_ACQUIRED; |
| 798 | acpi_gbl_mutex_info[i].use_count = 0; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 799 | } |
| 800 | |
Bob Moore | 28f55eb | 2005-12-02 18:27:00 -0500 | [diff] [blame] | 801 | for (i = 0; i < ACPI_NUM_OWNERID_MASKS; i++) { |
| 802 | acpi_gbl_owner_id_mask[i] = 0; |
| 803 | } |
| 804 | acpi_gbl_owner_id_mask[ACPI_NUM_OWNERID_MASKS - 1] = 0x80000000; /* Last ID is never valid */ |
| 805 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 806 | /* GPE support */ |
| 807 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 808 | acpi_gbl_gpe_xrupt_list_head = NULL; |
| 809 | acpi_gbl_gpe_fadt_blocks[0] = NULL; |
| 810 | acpi_gbl_gpe_fadt_blocks[1] = NULL; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 811 | |
| 812 | /* Global notify handlers */ |
| 813 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 814 | acpi_gbl_system_notify.handler = NULL; |
| 815 | acpi_gbl_device_notify.handler = NULL; |
| 816 | acpi_gbl_exception_handler = NULL; |
| 817 | acpi_gbl_init_handler = NULL; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 818 | |
| 819 | /* Global "typed" ACPI table pointers */ |
| 820 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 821 | acpi_gbl_RSDP = NULL; |
| 822 | acpi_gbl_XSDT = NULL; |
| 823 | acpi_gbl_FACS = NULL; |
| 824 | acpi_gbl_FADT = NULL; |
| 825 | acpi_gbl_DSDT = NULL; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 826 | |
| 827 | /* Global Lock support */ |
| 828 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 829 | acpi_gbl_global_lock_acquired = FALSE; |
| 830 | acpi_gbl_global_lock_thread_count = 0; |
| 831 | acpi_gbl_global_lock_handle = 0; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 832 | |
| 833 | /* Miscellaneous variables */ |
| 834 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 835 | acpi_gbl_table_flags = ACPI_PHYSICAL_POINTER; |
| 836 | acpi_gbl_rsdp_original_location = 0; |
| 837 | acpi_gbl_cm_single_step = FALSE; |
| 838 | acpi_gbl_db_terminate_threads = FALSE; |
| 839 | acpi_gbl_shutdown = FALSE; |
| 840 | acpi_gbl_ns_lookup_count = 0; |
| 841 | acpi_gbl_ps_find_count = 0; |
| 842 | acpi_gbl_acpi_hardware_present = TRUE; |
Bob Moore | 28f55eb | 2005-12-02 18:27:00 -0500 | [diff] [blame] | 843 | acpi_gbl_last_owner_id_index = 0; |
| 844 | acpi_gbl_next_owner_id_offset = 0; |
Bob Moore | 50eca3e | 2005-09-30 19:03:00 -0400 | [diff] [blame] | 845 | acpi_gbl_trace_method_name = 0; |
| 846 | acpi_gbl_trace_dbg_level = 0; |
| 847 | acpi_gbl_trace_dbg_layer = 0; |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 848 | acpi_gbl_debugger_configuration = DEBUGGER_THREADING; |
| 849 | acpi_gbl_db_output_flags = ACPI_DB_CONSOLE_OUTPUT; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 850 | |
| 851 | /* Hardware oriented */ |
| 852 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 853 | acpi_gbl_events_initialized = FALSE; |
| 854 | acpi_gbl_system_awake_and_running = TRUE; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 855 | |
| 856 | /* Namespace */ |
| 857 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 858 | acpi_gbl_root_node = NULL; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 859 | acpi_gbl_root_node_struct.name.integer = ACPI_ROOT_NAME; |
Bob Moore | 61686124 | 2006-03-17 16:44:00 -0500 | [diff] [blame^] | 860 | acpi_gbl_root_node_struct.descriptor_type = ACPI_DESC_TYPE_NAMED; |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 861 | acpi_gbl_root_node_struct.type = ACPI_TYPE_DEVICE; |
| 862 | acpi_gbl_root_node_struct.child = NULL; |
| 863 | acpi_gbl_root_node_struct.peer = NULL; |
| 864 | acpi_gbl_root_node_struct.object = NULL; |
| 865 | acpi_gbl_root_node_struct.flags = ANOBJ_END_OF_PEER_LIST; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 866 | |
| 867 | #ifdef ACPI_DEBUG_OUTPUT |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 868 | acpi_gbl_lowest_stack_pointer = ACPI_SIZE_MAX; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 869 | #endif |
| 870 | |
| 871 | return_VOID; |
| 872 | } |
Bob Moore | 8313524 | 2006-10-03 00:00:00 -0400 | [diff] [blame] | 873 | |
| 874 | ACPI_EXPORT_SYMBOL(acpi_dbg_level) |
| 875 | ACPI_EXPORT_SYMBOL(acpi_dbg_layer) |