utxfinit.c revision 1.1.1.1.4.2 1 1.1.1.1.4.2 rmind /******************************************************************************
2 1.1.1.1.4.2 rmind *
3 1.1.1.1.4.2 rmind * Module Name: utxfinit - External interfaces for ACPICA initialization
4 1.1.1.1.4.2 rmind *
5 1.1.1.1.4.2 rmind *****************************************************************************/
6 1.1.1.1.4.2 rmind
7 1.1.1.1.4.2 rmind /*
8 1.1.1.1.4.2 rmind * Copyright (C) 2000 - 2013, Intel Corp.
9 1.1.1.1.4.2 rmind * All rights reserved.
10 1.1.1.1.4.2 rmind *
11 1.1.1.1.4.2 rmind * Redistribution and use in source and binary forms, with or without
12 1.1.1.1.4.2 rmind * modification, are permitted provided that the following conditions
13 1.1.1.1.4.2 rmind * are met:
14 1.1.1.1.4.2 rmind * 1. Redistributions of source code must retain the above copyright
15 1.1.1.1.4.2 rmind * notice, this list of conditions, and the following disclaimer,
16 1.1.1.1.4.2 rmind * without modification.
17 1.1.1.1.4.2 rmind * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 1.1.1.1.4.2 rmind * substantially similar to the "NO WARRANTY" disclaimer below
19 1.1.1.1.4.2 rmind * ("Disclaimer") and any redistribution must be conditioned upon
20 1.1.1.1.4.2 rmind * including a substantially similar Disclaimer requirement for further
21 1.1.1.1.4.2 rmind * binary redistribution.
22 1.1.1.1.4.2 rmind * 3. Neither the names of the above-listed copyright holders nor the names
23 1.1.1.1.4.2 rmind * of any contributors may be used to endorse or promote products derived
24 1.1.1.1.4.2 rmind * from this software without specific prior written permission.
25 1.1.1.1.4.2 rmind *
26 1.1.1.1.4.2 rmind * Alternatively, this software may be distributed under the terms of the
27 1.1.1.1.4.2 rmind * GNU General Public License ("GPL") version 2 as published by the Free
28 1.1.1.1.4.2 rmind * Software Foundation.
29 1.1.1.1.4.2 rmind *
30 1.1.1.1.4.2 rmind * NO WARRANTY
31 1.1.1.1.4.2 rmind * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 1.1.1.1.4.2 rmind * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 1.1.1.1.4.2 rmind * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 1.1.1.1.4.2 rmind * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 1.1.1.1.4.2 rmind * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 1.1.1.1.4.2 rmind * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 1.1.1.1.4.2 rmind * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 1.1.1.1.4.2 rmind * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 1.1.1.1.4.2 rmind * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 1.1.1.1.4.2 rmind * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 1.1.1.1.4.2 rmind * POSSIBILITY OF SUCH DAMAGES.
42 1.1.1.1.4.2 rmind */
43 1.1.1.1.4.2 rmind
44 1.1.1.1.4.2 rmind
45 1.1.1.1.4.2 rmind #define __UTXFINIT_C__
46 1.1.1.1.4.2 rmind #define EXPORT_ACPI_INTERFACES
47 1.1.1.1.4.2 rmind
48 1.1.1.1.4.2 rmind #include "acpi.h"
49 1.1.1.1.4.2 rmind #include "accommon.h"
50 1.1.1.1.4.2 rmind #include "acevents.h"
51 1.1.1.1.4.2 rmind #include "acnamesp.h"
52 1.1.1.1.4.2 rmind #include "acdebug.h"
53 1.1.1.1.4.2 rmind #include "actables.h"
54 1.1.1.1.4.2 rmind
55 1.1.1.1.4.2 rmind #define _COMPONENT ACPI_UTILITIES
56 1.1.1.1.4.2 rmind ACPI_MODULE_NAME ("utxfinit")
57 1.1.1.1.4.2 rmind
58 1.1.1.1.4.2 rmind
59 1.1.1.1.4.2 rmind /*******************************************************************************
60 1.1.1.1.4.2 rmind *
61 1.1.1.1.4.2 rmind * FUNCTION: AcpiInitializeSubsystem
62 1.1.1.1.4.2 rmind *
63 1.1.1.1.4.2 rmind * PARAMETERS: None
64 1.1.1.1.4.2 rmind *
65 1.1.1.1.4.2 rmind * RETURN: Status
66 1.1.1.1.4.2 rmind *
67 1.1.1.1.4.2 rmind * DESCRIPTION: Initializes all global variables. This is the first function
68 1.1.1.1.4.2 rmind * called, so any early initialization belongs here.
69 1.1.1.1.4.2 rmind *
70 1.1.1.1.4.2 rmind ******************************************************************************/
71 1.1.1.1.4.2 rmind
72 1.1.1.1.4.2 rmind ACPI_STATUS
73 1.1.1.1.4.2 rmind AcpiInitializeSubsystem (
74 1.1.1.1.4.2 rmind void)
75 1.1.1.1.4.2 rmind {
76 1.1.1.1.4.2 rmind ACPI_STATUS Status;
77 1.1.1.1.4.2 rmind
78 1.1.1.1.4.2 rmind
79 1.1.1.1.4.2 rmind ACPI_FUNCTION_TRACE (AcpiInitializeSubsystem);
80 1.1.1.1.4.2 rmind
81 1.1.1.1.4.2 rmind
82 1.1.1.1.4.2 rmind AcpiGbl_StartupFlags = ACPI_SUBSYSTEM_INITIALIZE;
83 1.1.1.1.4.2 rmind ACPI_DEBUG_EXEC (AcpiUtInitStackPtrTrace ());
84 1.1.1.1.4.2 rmind
85 1.1.1.1.4.2 rmind /* Initialize the OS-Dependent layer */
86 1.1.1.1.4.2 rmind
87 1.1.1.1.4.2 rmind Status = AcpiOsInitialize ();
88 1.1.1.1.4.2 rmind if (ACPI_FAILURE (Status))
89 1.1.1.1.4.2 rmind {
90 1.1.1.1.4.2 rmind ACPI_EXCEPTION ((AE_INFO, Status, "During OSL initialization"));
91 1.1.1.1.4.2 rmind return_ACPI_STATUS (Status);
92 1.1.1.1.4.2 rmind }
93 1.1.1.1.4.2 rmind
94 1.1.1.1.4.2 rmind /* Initialize all globals used by the subsystem */
95 1.1.1.1.4.2 rmind
96 1.1.1.1.4.2 rmind Status = AcpiUtInitGlobals ();
97 1.1.1.1.4.2 rmind if (ACPI_FAILURE (Status))
98 1.1.1.1.4.2 rmind {
99 1.1.1.1.4.2 rmind ACPI_EXCEPTION ((AE_INFO, Status, "During initialization of globals"));
100 1.1.1.1.4.2 rmind return_ACPI_STATUS (Status);
101 1.1.1.1.4.2 rmind }
102 1.1.1.1.4.2 rmind
103 1.1.1.1.4.2 rmind /* Create the default mutex objects */
104 1.1.1.1.4.2 rmind
105 1.1.1.1.4.2 rmind Status = AcpiUtMutexInitialize ();
106 1.1.1.1.4.2 rmind if (ACPI_FAILURE (Status))
107 1.1.1.1.4.2 rmind {
108 1.1.1.1.4.2 rmind ACPI_EXCEPTION ((AE_INFO, Status, "During Global Mutex creation"));
109 1.1.1.1.4.2 rmind return_ACPI_STATUS (Status);
110 1.1.1.1.4.2 rmind }
111 1.1.1.1.4.2 rmind
112 1.1.1.1.4.2 rmind /*
113 1.1.1.1.4.2 rmind * Initialize the namespace manager and
114 1.1.1.1.4.2 rmind * the root of the namespace tree
115 1.1.1.1.4.2 rmind */
116 1.1.1.1.4.2 rmind Status = AcpiNsRootInitialize ();
117 1.1.1.1.4.2 rmind if (ACPI_FAILURE (Status))
118 1.1.1.1.4.2 rmind {
119 1.1.1.1.4.2 rmind ACPI_EXCEPTION ((AE_INFO, Status, "During Namespace initialization"));
120 1.1.1.1.4.2 rmind return_ACPI_STATUS (Status);
121 1.1.1.1.4.2 rmind }
122 1.1.1.1.4.2 rmind
123 1.1.1.1.4.2 rmind /* Initialize the global OSI interfaces list with the static names */
124 1.1.1.1.4.2 rmind
125 1.1.1.1.4.2 rmind Status = AcpiUtInitializeInterfaces ();
126 1.1.1.1.4.2 rmind if (ACPI_FAILURE (Status))
127 1.1.1.1.4.2 rmind {
128 1.1.1.1.4.2 rmind ACPI_EXCEPTION ((AE_INFO, Status, "During OSI interfaces initialization"));
129 1.1.1.1.4.2 rmind return_ACPI_STATUS (Status);
130 1.1.1.1.4.2 rmind }
131 1.1.1.1.4.2 rmind
132 1.1.1.1.4.2 rmind /* If configured, initialize the AML debugger */
133 1.1.1.1.4.2 rmind
134 1.1.1.1.4.2 rmind #ifdef ACPI_DEBUGGER
135 1.1.1.1.4.2 rmind Status = AcpiDbInitialize ();
136 1.1.1.1.4.2 rmind if (ACPI_FAILURE (Status))
137 1.1.1.1.4.2 rmind {
138 1.1.1.1.4.2 rmind ACPI_EXCEPTION ((AE_INFO, Status, "During Debugger initialization"));
139 1.1.1.1.4.2 rmind return_ACPI_STATUS (Status);
140 1.1.1.1.4.2 rmind }
141 1.1.1.1.4.2 rmind #endif
142 1.1.1.1.4.2 rmind
143 1.1.1.1.4.2 rmind return_ACPI_STATUS (AE_OK);
144 1.1.1.1.4.2 rmind }
145 1.1.1.1.4.2 rmind
146 1.1.1.1.4.2 rmind ACPI_EXPORT_SYMBOL_INIT (AcpiInitializeSubsystem)
147 1.1.1.1.4.2 rmind
148 1.1.1.1.4.2 rmind
149 1.1.1.1.4.2 rmind /*******************************************************************************
150 1.1.1.1.4.2 rmind *
151 1.1.1.1.4.2 rmind * FUNCTION: AcpiEnableSubsystem
152 1.1.1.1.4.2 rmind *
153 1.1.1.1.4.2 rmind * PARAMETERS: Flags - Init/enable Options
154 1.1.1.1.4.2 rmind *
155 1.1.1.1.4.2 rmind * RETURN: Status
156 1.1.1.1.4.2 rmind *
157 1.1.1.1.4.2 rmind * DESCRIPTION: Completes the subsystem initialization including hardware.
158 1.1.1.1.4.2 rmind * Puts system into ACPI mode if it isn't already.
159 1.1.1.1.4.2 rmind *
160 1.1.1.1.4.2 rmind ******************************************************************************/
161 1.1.1.1.4.2 rmind
162 1.1.1.1.4.2 rmind ACPI_STATUS
163 1.1.1.1.4.2 rmind AcpiEnableSubsystem (
164 1.1.1.1.4.2 rmind UINT32 Flags)
165 1.1.1.1.4.2 rmind {
166 1.1.1.1.4.2 rmind ACPI_STATUS Status = AE_OK;
167 1.1.1.1.4.2 rmind
168 1.1.1.1.4.2 rmind
169 1.1.1.1.4.2 rmind ACPI_FUNCTION_TRACE (AcpiEnableSubsystem);
170 1.1.1.1.4.2 rmind
171 1.1.1.1.4.2 rmind
172 1.1.1.1.4.2 rmind #if (!ACPI_REDUCED_HARDWARE)
173 1.1.1.1.4.2 rmind
174 1.1.1.1.4.2 rmind /* Enable ACPI mode */
175 1.1.1.1.4.2 rmind
176 1.1.1.1.4.2 rmind if (!(Flags & ACPI_NO_ACPI_ENABLE))
177 1.1.1.1.4.2 rmind {
178 1.1.1.1.4.2 rmind ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[Init] Going into ACPI mode\n"));
179 1.1.1.1.4.2 rmind
180 1.1.1.1.4.2 rmind AcpiGbl_OriginalMode = AcpiHwGetMode();
181 1.1.1.1.4.2 rmind
182 1.1.1.1.4.2 rmind Status = AcpiEnable ();
183 1.1.1.1.4.2 rmind if (ACPI_FAILURE (Status))
184 1.1.1.1.4.2 rmind {
185 1.1.1.1.4.2 rmind ACPI_WARNING ((AE_INFO, "AcpiEnable failed"));
186 1.1.1.1.4.2 rmind return_ACPI_STATUS (Status);
187 1.1.1.1.4.2 rmind }
188 1.1.1.1.4.2 rmind }
189 1.1.1.1.4.2 rmind
190 1.1.1.1.4.2 rmind /*
191 1.1.1.1.4.2 rmind * Obtain a permanent mapping for the FACS. This is required for the
192 1.1.1.1.4.2 rmind * Global Lock and the Firmware Waking Vector
193 1.1.1.1.4.2 rmind */
194 1.1.1.1.4.2 rmind Status = AcpiTbInitializeFacs ();
195 1.1.1.1.4.2 rmind if (ACPI_FAILURE (Status))
196 1.1.1.1.4.2 rmind {
197 1.1.1.1.4.2 rmind ACPI_WARNING ((AE_INFO, "Could not map the FACS table"));
198 1.1.1.1.4.2 rmind return_ACPI_STATUS (Status);
199 1.1.1.1.4.2 rmind }
200 1.1.1.1.4.2 rmind
201 1.1.1.1.4.2 rmind #endif /* !ACPI_REDUCED_HARDWARE */
202 1.1.1.1.4.2 rmind
203 1.1.1.1.4.2 rmind /*
204 1.1.1.1.4.2 rmind * Install the default OpRegion handlers. These are installed unless
205 1.1.1.1.4.2 rmind * other handlers have already been installed via the
206 1.1.1.1.4.2 rmind * InstallAddressSpaceHandler interface.
207 1.1.1.1.4.2 rmind */
208 1.1.1.1.4.2 rmind if (!(Flags & ACPI_NO_ADDRESS_SPACE_INIT))
209 1.1.1.1.4.2 rmind {
210 1.1.1.1.4.2 rmind ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
211 1.1.1.1.4.2 rmind "[Init] Installing default address space handlers\n"));
212 1.1.1.1.4.2 rmind
213 1.1.1.1.4.2 rmind Status = AcpiEvInstallRegionHandlers ();
214 1.1.1.1.4.2 rmind if (ACPI_FAILURE (Status))
215 1.1.1.1.4.2 rmind {
216 1.1.1.1.4.2 rmind return_ACPI_STATUS (Status);
217 1.1.1.1.4.2 rmind }
218 1.1.1.1.4.2 rmind }
219 1.1.1.1.4.2 rmind
220 1.1.1.1.4.2 rmind #if (!ACPI_REDUCED_HARDWARE)
221 1.1.1.1.4.2 rmind /*
222 1.1.1.1.4.2 rmind * Initialize ACPI Event handling (Fixed and General Purpose)
223 1.1.1.1.4.2 rmind *
224 1.1.1.1.4.2 rmind * Note1: We must have the hardware and events initialized before we can
225 1.1.1.1.4.2 rmind * execute any control methods safely. Any control method can require
226 1.1.1.1.4.2 rmind * ACPI hardware support, so the hardware must be fully initialized before
227 1.1.1.1.4.2 rmind * any method execution!
228 1.1.1.1.4.2 rmind *
229 1.1.1.1.4.2 rmind * Note2: Fixed events are initialized and enabled here. GPEs are
230 1.1.1.1.4.2 rmind * initialized, but cannot be enabled until after the hardware is
231 1.1.1.1.4.2 rmind * completely initialized (SCI and GlobalLock activated) and the various
232 1.1.1.1.4.2 rmind * initialization control methods are run (_REG, _STA, _INI) on the
233 1.1.1.1.4.2 rmind * entire namespace.
234 1.1.1.1.4.2 rmind */
235 1.1.1.1.4.2 rmind if (!(Flags & ACPI_NO_EVENT_INIT))
236 1.1.1.1.4.2 rmind {
237 1.1.1.1.4.2 rmind ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
238 1.1.1.1.4.2 rmind "[Init] Initializing ACPI events\n"));
239 1.1.1.1.4.2 rmind
240 1.1.1.1.4.2 rmind Status = AcpiEvInitializeEvents ();
241 1.1.1.1.4.2 rmind if (ACPI_FAILURE (Status))
242 1.1.1.1.4.2 rmind {
243 1.1.1.1.4.2 rmind return_ACPI_STATUS (Status);
244 1.1.1.1.4.2 rmind }
245 1.1.1.1.4.2 rmind }
246 1.1.1.1.4.2 rmind
247 1.1.1.1.4.2 rmind /*
248 1.1.1.1.4.2 rmind * Install the SCI handler and Global Lock handler. This completes the
249 1.1.1.1.4.2 rmind * hardware initialization.
250 1.1.1.1.4.2 rmind */
251 1.1.1.1.4.2 rmind if (!(Flags & ACPI_NO_HANDLER_INIT))
252 1.1.1.1.4.2 rmind {
253 1.1.1.1.4.2 rmind ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
254 1.1.1.1.4.2 rmind "[Init] Installing SCI/GL handlers\n"));
255 1.1.1.1.4.2 rmind
256 1.1.1.1.4.2 rmind Status = AcpiEvInstallXruptHandlers ();
257 1.1.1.1.4.2 rmind if (ACPI_FAILURE (Status))
258 1.1.1.1.4.2 rmind {
259 1.1.1.1.4.2 rmind return_ACPI_STATUS (Status);
260 1.1.1.1.4.2 rmind }
261 1.1.1.1.4.2 rmind }
262 1.1.1.1.4.2 rmind
263 1.1.1.1.4.2 rmind #endif /* !ACPI_REDUCED_HARDWARE */
264 1.1.1.1.4.2 rmind
265 1.1.1.1.4.2 rmind return_ACPI_STATUS (Status);
266 1.1.1.1.4.2 rmind }
267 1.1.1.1.4.2 rmind
268 1.1.1.1.4.2 rmind ACPI_EXPORT_SYMBOL_INIT (AcpiEnableSubsystem)
269 1.1.1.1.4.2 rmind
270 1.1.1.1.4.2 rmind
271 1.1.1.1.4.2 rmind /*******************************************************************************
272 1.1.1.1.4.2 rmind *
273 1.1.1.1.4.2 rmind * FUNCTION: AcpiInitializeObjects
274 1.1.1.1.4.2 rmind *
275 1.1.1.1.4.2 rmind * PARAMETERS: Flags - Init/enable Options
276 1.1.1.1.4.2 rmind *
277 1.1.1.1.4.2 rmind * RETURN: Status
278 1.1.1.1.4.2 rmind *
279 1.1.1.1.4.2 rmind * DESCRIPTION: Completes namespace initialization by initializing device
280 1.1.1.1.4.2 rmind * objects and executing AML code for Regions, buffers, etc.
281 1.1.1.1.4.2 rmind *
282 1.1.1.1.4.2 rmind ******************************************************************************/
283 1.1.1.1.4.2 rmind
284 1.1.1.1.4.2 rmind ACPI_STATUS
285 1.1.1.1.4.2 rmind AcpiInitializeObjects (
286 1.1.1.1.4.2 rmind UINT32 Flags)
287 1.1.1.1.4.2 rmind {
288 1.1.1.1.4.2 rmind ACPI_STATUS Status = AE_OK;
289 1.1.1.1.4.2 rmind
290 1.1.1.1.4.2 rmind
291 1.1.1.1.4.2 rmind ACPI_FUNCTION_TRACE (AcpiInitializeObjects);
292 1.1.1.1.4.2 rmind
293 1.1.1.1.4.2 rmind
294 1.1.1.1.4.2 rmind /*
295 1.1.1.1.4.2 rmind * Run all _REG methods
296 1.1.1.1.4.2 rmind *
297 1.1.1.1.4.2 rmind * Note: Any objects accessed by the _REG methods will be automatically
298 1.1.1.1.4.2 rmind * initialized, even if they contain executable AML (see the call to
299 1.1.1.1.4.2 rmind * AcpiNsInitializeObjects below).
300 1.1.1.1.4.2 rmind */
301 1.1.1.1.4.2 rmind if (!(Flags & ACPI_NO_ADDRESS_SPACE_INIT))
302 1.1.1.1.4.2 rmind {
303 1.1.1.1.4.2 rmind ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
304 1.1.1.1.4.2 rmind "[Init] Executing _REG OpRegion methods\n"));
305 1.1.1.1.4.2 rmind
306 1.1.1.1.4.2 rmind Status = AcpiEvInitializeOpRegions ();
307 1.1.1.1.4.2 rmind if (ACPI_FAILURE (Status))
308 1.1.1.1.4.2 rmind {
309 1.1.1.1.4.2 rmind return_ACPI_STATUS (Status);
310 1.1.1.1.4.2 rmind }
311 1.1.1.1.4.2 rmind }
312 1.1.1.1.4.2 rmind
313 1.1.1.1.4.2 rmind /*
314 1.1.1.1.4.2 rmind * Execute any module-level code that was detected during the table load
315 1.1.1.1.4.2 rmind * phase. Although illegal since ACPI 2.0, there are many machines that
316 1.1.1.1.4.2 rmind * contain this type of code. Each block of detected executable AML code
317 1.1.1.1.4.2 rmind * outside of any control method is wrapped with a temporary control
318 1.1.1.1.4.2 rmind * method object and placed on a global list. The methods on this list
319 1.1.1.1.4.2 rmind * are executed below.
320 1.1.1.1.4.2 rmind */
321 1.1.1.1.4.2 rmind AcpiNsExecModuleCodeList ();
322 1.1.1.1.4.2 rmind
323 1.1.1.1.4.2 rmind /*
324 1.1.1.1.4.2 rmind * Initialize the objects that remain uninitialized. This runs the
325 1.1.1.1.4.2 rmind * executable AML that may be part of the declaration of these objects:
326 1.1.1.1.4.2 rmind * OperationRegions, BufferFields, Buffers, and Packages.
327 1.1.1.1.4.2 rmind */
328 1.1.1.1.4.2 rmind if (!(Flags & ACPI_NO_OBJECT_INIT))
329 1.1.1.1.4.2 rmind {
330 1.1.1.1.4.2 rmind ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
331 1.1.1.1.4.2 rmind "[Init] Completing Initialization of ACPI Objects\n"));
332 1.1.1.1.4.2 rmind
333 1.1.1.1.4.2 rmind Status = AcpiNsInitializeObjects ();
334 1.1.1.1.4.2 rmind if (ACPI_FAILURE (Status))
335 1.1.1.1.4.2 rmind {
336 1.1.1.1.4.2 rmind return_ACPI_STATUS (Status);
337 1.1.1.1.4.2 rmind }
338 1.1.1.1.4.2 rmind }
339 1.1.1.1.4.2 rmind
340 1.1.1.1.4.2 rmind /*
341 1.1.1.1.4.2 rmind * Initialize all device objects in the namespace. This runs the device
342 1.1.1.1.4.2 rmind * _STA and _INI methods.
343 1.1.1.1.4.2 rmind */
344 1.1.1.1.4.2 rmind if (!(Flags & ACPI_NO_DEVICE_INIT))
345 1.1.1.1.4.2 rmind {
346 1.1.1.1.4.2 rmind ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
347 1.1.1.1.4.2 rmind "[Init] Initializing ACPI Devices\n"));
348 1.1.1.1.4.2 rmind
349 1.1.1.1.4.2 rmind Status = AcpiNsInitializeDevices ();
350 1.1.1.1.4.2 rmind if (ACPI_FAILURE (Status))
351 1.1.1.1.4.2 rmind {
352 1.1.1.1.4.2 rmind return_ACPI_STATUS (Status);
353 1.1.1.1.4.2 rmind }
354 1.1.1.1.4.2 rmind }
355 1.1.1.1.4.2 rmind
356 1.1.1.1.4.2 rmind /*
357 1.1.1.1.4.2 rmind * Empty the caches (delete the cached objects) on the assumption that
358 1.1.1.1.4.2 rmind * the table load filled them up more than they will be at runtime --
359 1.1.1.1.4.2 rmind * thus wasting non-paged memory.
360 1.1.1.1.4.2 rmind */
361 1.1.1.1.4.2 rmind Status = AcpiPurgeCachedObjects ();
362 1.1.1.1.4.2 rmind
363 1.1.1.1.4.2 rmind AcpiGbl_StartupFlags |= ACPI_INITIALIZED_OK;
364 1.1.1.1.4.2 rmind return_ACPI_STATUS (Status);
365 1.1.1.1.4.2 rmind }
366 1.1.1.1.4.2 rmind
367 1.1.1.1.4.2 rmind ACPI_EXPORT_SYMBOL_INIT (AcpiInitializeObjects)
368