aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/utilities/utxface.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/utilities/utxface.c')
-rw-r--r--drivers/acpi/utilities/utxface.c69
1 files changed, 45 insertions, 24 deletions
diff --git a/drivers/acpi/utilities/utxface.c b/drivers/acpi/utilities/utxface.c
index f06bd5e5e9d1..308a960871be 100644
--- a/drivers/acpi/utilities/utxface.c
+++ b/drivers/acpi/utilities/utxface.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2005, R. Byron Moore 8 * Copyright (C) 2000 - 2006, R. Byron Moore
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -75,8 +75,7 @@ acpi_status acpi_initialize_subsystem(void)
75 75
76 status = acpi_os_initialize(); 76 status = acpi_os_initialize();
77 if (ACPI_FAILURE(status)) { 77 if (ACPI_FAILURE(status)) {
78 ACPI_REPORT_ERROR(("OSD failed to initialize, %s\n", 78 ACPI_EXCEPTION((AE_INFO, status, "During OSL initialization"));
79 acpi_format_exception(status)));
80 return_ACPI_STATUS(status); 79 return_ACPI_STATUS(status);
81 } 80 }
82 81
@@ -88,8 +87,8 @@ acpi_status acpi_initialize_subsystem(void)
88 87
89 status = acpi_ut_mutex_initialize(); 88 status = acpi_ut_mutex_initialize();
90 if (ACPI_FAILURE(status)) { 89 if (ACPI_FAILURE(status)) {
91 ACPI_REPORT_ERROR(("Global mutex creation failure, %s\n", 90 ACPI_EXCEPTION((AE_INFO, status,
92 acpi_format_exception(status))); 91 "During Global Mutex creation"));
93 return_ACPI_STATUS(status); 92 return_ACPI_STATUS(status);
94 } 93 }
95 94
@@ -99,15 +98,14 @@ acpi_status acpi_initialize_subsystem(void)
99 */ 98 */
100 status = acpi_ns_root_initialize(); 99 status = acpi_ns_root_initialize();
101 if (ACPI_FAILURE(status)) { 100 if (ACPI_FAILURE(status)) {
102 ACPI_REPORT_ERROR(("Namespace initialization failure, %s\n", 101 ACPI_EXCEPTION((AE_INFO, status,
103 acpi_format_exception(status))); 102 "During Namespace initialization"));
104 return_ACPI_STATUS(status); 103 return_ACPI_STATUS(status);
105 } 104 }
106 105
107 /* If configured, initialize the AML debugger */ 106 /* If configured, initialize the AML debugger */
108 107
109 ACPI_DEBUGGER_EXEC(status = acpi_db_initialize()); 108 ACPI_DEBUGGER_EXEC(status = acpi_db_initialize());
110
111 return_ACPI_STATUS(status); 109 return_ACPI_STATUS(status);
112} 110}
113 111
@@ -154,8 +152,7 @@ acpi_status acpi_enable_subsystem(u32 flags)
154 152
155 status = acpi_enable(); 153 status = acpi_enable();
156 if (ACPI_FAILURE(status)) { 154 if (ACPI_FAILURE(status)) {
157 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 155 ACPI_WARNING((AE_INFO, "acpi_enable failed"));
158 "acpi_enable failed.\n"));
159 return_ACPI_STATUS(status); 156 return_ACPI_STATUS(status);
160 } 157 }
161 } 158 }
@@ -178,10 +175,14 @@ acpi_status acpi_enable_subsystem(u32 flags)
178 /* 175 /*
179 * Initialize ACPI Event handling (Fixed and General Purpose) 176 * Initialize ACPI Event handling (Fixed and General Purpose)
180 * 177 *
181 * NOTE: We must have the hardware AND events initialized before we can 178 * Note1: We must have the hardware and events initialized before we can
182 * execute ANY control methods SAFELY. Any control method can require 179 * execute any control methods safely. Any control method can require
183 * ACPI hardware support, so the hardware MUST be initialized before 180 * ACPI hardware support, so the hardware must be fully initialized before
184 * execution! 181 * any method execution!
182 *
183 * Note2: Fixed events are initialized and enabled here. GPEs are
184 * initialized, but cannot be enabled until after the hardware is
185 * completely initialized (SCI and global_lock activated)
185 */ 186 */
186 if (!(flags & ACPI_NO_EVENT_INIT)) { 187 if (!(flags & ACPI_NO_EVENT_INIT)) {
187 ACPI_DEBUG_PRINT((ACPI_DB_EXEC, 188 ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
@@ -193,8 +194,10 @@ acpi_status acpi_enable_subsystem(u32 flags)
193 } 194 }
194 } 195 }
195 196
196 /* Install the SCI handler and Global Lock handler */ 197 /*
197 198 * Install the SCI handler and Global Lock handler. This completes the
199 * hardware initialization.
200 */
198 if (!(flags & ACPI_NO_HANDLER_INIT)) { 201 if (!(flags & ACPI_NO_HANDLER_INIT)) {
199 ACPI_DEBUG_PRINT((ACPI_DB_EXEC, 202 ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
200 "[Init] Installing SCI/GL handlers\n")); 203 "[Init] Installing SCI/GL handlers\n"));
@@ -205,6 +208,24 @@ acpi_status acpi_enable_subsystem(u32 flags)
205 } 208 }
206 } 209 }
207 210
211 /*
212 * Complete the GPE initialization for the GPE blocks defined in the FADT
213 * (GPE block 0 and 1).
214 *
215 * Note1: This is where the _PRW methods are executed for the GPEs. These
216 * methods can only be executed after the SCI and Global Lock handlers are
217 * installed and initialized.
218 *
219 * Note2: Currently, there seems to be no need to run the _REG methods
220 * before execution of the _PRW methods and enabling of the GPEs.
221 */
222 if (!(flags & ACPI_NO_EVENT_INIT)) {
223 status = acpi_ev_install_fadt_gpes();
224 if (ACPI_FAILURE(status)) {
225 return (status);
226 }
227 }
228
208 return_ACPI_STATUS(status); 229 return_ACPI_STATUS(status);
209} 230}
210 231
@@ -230,9 +251,9 @@ acpi_status acpi_initialize_objects(u32 flags)
230 /* 251 /*
231 * Run all _REG methods 252 * Run all _REG methods
232 * 253 *
233 * NOTE: Any objects accessed 254 * Note: Any objects accessed by the _REG methods will be automatically
234 * by the _REG methods will be automatically initialized, even if they 255 * initialized, even if they contain executable AML (see the call to
235 * contain executable AML (see call to acpi_ns_initialize_objects below). 256 * acpi_ns_initialize_objects below).
236 */ 257 */
237 if (!(flags & ACPI_NO_ADDRESS_SPACE_INIT)) { 258 if (!(flags & ACPI_NO_ADDRESS_SPACE_INIT)) {
238 ACPI_DEBUG_PRINT((ACPI_DB_EXEC, 259 ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
@@ -245,9 +266,9 @@ acpi_status acpi_initialize_objects(u32 flags)
245 } 266 }
246 267
247 /* 268 /*
248 * Initialize the objects that remain uninitialized. This 269 * Initialize the objects that remain uninitialized. This runs the
249 * runs the executable AML that may be part of the declaration of these 270 * executable AML that may be part of the declaration of these objects:
250 * objects: operation_regions, buffer_fields, Buffers, and Packages. 271 * operation_regions, buffer_fields, Buffers, and Packages.
251 */ 272 */
252 if (!(flags & ACPI_NO_OBJECT_INIT)) { 273 if (!(flags & ACPI_NO_OBJECT_INIT)) {
253 ACPI_DEBUG_PRINT((ACPI_DB_EXEC, 274 ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
@@ -260,8 +281,8 @@ acpi_status acpi_initialize_objects(u32 flags)
260 } 281 }
261 282
262 /* 283 /*
263 * Initialize all device objects in the namespace 284 * Initialize all device objects in the namespace. This runs the device
264 * This runs the _STA and _INI methods. 285 * _STA and _INI methods.
265 */ 286 */
266 if (!(flags & ACPI_NO_DEVICE_INIT)) { 287 if (!(flags & ACPI_NO_DEVICE_INIT)) {
267 ACPI_DEBUG_PRINT((ACPI_DB_EXEC, 288 ACPI_DEBUG_PRINT((ACPI_DB_EXEC,