tbutils.c 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627
  1. /******************************************************************************
  2. *
  3. * Module Name: tbutils - ACPI Table utilities
  4. *
  5. *****************************************************************************/
  6. /*
  7. * Copyright (C) 2000 - 2013, Intel Corp.
  8. * All rights reserved.
  9. *
  10. * Redistribution and use in source and binary forms, with or without
  11. * modification, are permitted provided that the following conditions
  12. * are met:
  13. * 1. Redistributions of source code must retain the above copyright
  14. * notice, this list of conditions, and the following disclaimer,
  15. * without modification.
  16. * 2. Redistributions in binary form must reproduce at minimum a disclaimer
  17. * substantially similar to the "NO WARRANTY" disclaimer below
  18. * ("Disclaimer") and any redistribution must be conditioned upon
  19. * including a substantially similar Disclaimer requirement for further
  20. * binary redistribution.
  21. * 3. Neither the names of the above-listed copyright holders nor the names
  22. * of any contributors may be used to endorse or promote products derived
  23. * from this software without specific prior written permission.
  24. *
  25. * Alternatively, this software may be distributed under the terms of the
  26. * GNU General Public License ("GPL") version 2 as published by the Free
  27. * Software Foundation.
  28. *
  29. * NO WARRANTY
  30. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  31. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  32. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
  33. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  34. * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  35. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  36. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  37. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  38. * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
  39. * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  40. * POSSIBILITY OF SUCH DAMAGES.
  41. */
  42. #include <acpi/acpi.h>
  43. #include "accommon.h"
  44. #include "actables.h"
  45. #define _COMPONENT ACPI_TABLES
  46. ACPI_MODULE_NAME("tbutils")
  47. /* Local prototypes */
  48. static acpi_status acpi_tb_validate_xsdt(acpi_physical_address address);
  49. static acpi_physical_address
  50. acpi_tb_get_root_table_entry(u8 *table_entry, u32 table_entry_size);
  51. #if (!ACPI_REDUCED_HARDWARE)
  52. /*******************************************************************************
  53. *
  54. * FUNCTION: acpi_tb_initialize_facs
  55. *
  56. * PARAMETERS: None
  57. *
  58. * RETURN: Status
  59. *
  60. * DESCRIPTION: Create a permanent mapping for the FADT and save it in a global
  61. * for accessing the Global Lock and Firmware Waking Vector
  62. *
  63. ******************************************************************************/
  64. acpi_status acpi_tb_initialize_facs(void)
  65. {
  66. acpi_status status;
  67. /* If Hardware Reduced flag is set, there is no FACS */
  68. if (acpi_gbl_reduced_hardware) {
  69. acpi_gbl_FACS = NULL;
  70. return (AE_OK);
  71. }
  72. status = acpi_get_table_by_index(ACPI_TABLE_INDEX_FACS,
  73. ACPI_CAST_INDIRECT_PTR(struct
  74. acpi_table_header,
  75. &acpi_gbl_FACS));
  76. return (status);
  77. }
  78. #endif /* !ACPI_REDUCED_HARDWARE */
  79. /*******************************************************************************
  80. *
  81. * FUNCTION: acpi_tb_tables_loaded
  82. *
  83. * PARAMETERS: None
  84. *
  85. * RETURN: TRUE if required ACPI tables are loaded
  86. *
  87. * DESCRIPTION: Determine if the minimum required ACPI tables are present
  88. * (FADT, FACS, DSDT)
  89. *
  90. ******************************************************************************/
  91. u8 acpi_tb_tables_loaded(void)
  92. {
  93. if (acpi_gbl_root_table_list.current_table_count >= 3) {
  94. return (TRUE);
  95. }
  96. return (FALSE);
  97. }
  98. /*******************************************************************************
  99. *
  100. * FUNCTION: acpi_tb_check_dsdt_header
  101. *
  102. * PARAMETERS: None
  103. *
  104. * RETURN: None
  105. *
  106. * DESCRIPTION: Quick compare to check validity of the DSDT. This will detect
  107. * if the DSDT has been replaced from outside the OS and/or if
  108. * the DSDT header has been corrupted.
  109. *
  110. ******************************************************************************/
  111. void acpi_tb_check_dsdt_header(void)
  112. {
  113. /* Compare original length and checksum to current values */
  114. if (acpi_gbl_original_dsdt_header.length != acpi_gbl_DSDT->length ||
  115. acpi_gbl_original_dsdt_header.checksum != acpi_gbl_DSDT->checksum) {
  116. ACPI_BIOS_ERROR((AE_INFO,
  117. "The DSDT has been corrupted or replaced - "
  118. "old, new headers below"));
  119. acpi_tb_print_table_header(0, &acpi_gbl_original_dsdt_header);
  120. acpi_tb_print_table_header(0, acpi_gbl_DSDT);
  121. ACPI_ERROR((AE_INFO,
  122. "Please send DMI info to linux-acpi@vger.kernel.org\n"
  123. "If system does not work as expected, please boot with acpi=copy_dsdt"));
  124. /* Disable further error messages */
  125. acpi_gbl_original_dsdt_header.length = acpi_gbl_DSDT->length;
  126. acpi_gbl_original_dsdt_header.checksum =
  127. acpi_gbl_DSDT->checksum;
  128. }
  129. }
  130. /*******************************************************************************
  131. *
  132. * FUNCTION: acpi_tb_copy_dsdt
  133. *
  134. * PARAMETERS: table_desc - Installed table to copy
  135. *
  136. * RETURN: None
  137. *
  138. * DESCRIPTION: Implements a subsystem option to copy the DSDT to local memory.
  139. * Some very bad BIOSs are known to either corrupt the DSDT or
  140. * install a new, bad DSDT. This copy works around the problem.
  141. *
  142. ******************************************************************************/
  143. struct acpi_table_header *acpi_tb_copy_dsdt(u32 table_index)
  144. {
  145. struct acpi_table_header *new_table;
  146. struct acpi_table_desc *table_desc;
  147. table_desc = &acpi_gbl_root_table_list.tables[table_index];
  148. new_table = ACPI_ALLOCATE(table_desc->length);
  149. if (!new_table) {
  150. ACPI_ERROR((AE_INFO, "Could not copy DSDT of length 0x%X",
  151. table_desc->length));
  152. return (NULL);
  153. }
  154. ACPI_MEMCPY(new_table, table_desc->pointer, table_desc->length);
  155. acpi_tb_delete_table(table_desc);
  156. table_desc->pointer = new_table;
  157. table_desc->flags = ACPI_TABLE_ORIGIN_ALLOCATED;
  158. ACPI_INFO((AE_INFO,
  159. "Forced DSDT copy: length 0x%05X copied locally, original unmapped",
  160. new_table->length));
  161. return (new_table);
  162. }
  163. /*******************************************************************************
  164. *
  165. * FUNCTION: acpi_tb_install_table
  166. *
  167. * PARAMETERS: address - Physical address of DSDT or FACS
  168. * signature - Table signature, NULL if no need to
  169. * match
  170. * table_index - Index into root table array
  171. *
  172. * RETURN: None
  173. *
  174. * DESCRIPTION: Install an ACPI table into the global data structure. The
  175. * table override mechanism is called to allow the host
  176. * OS to replace any table before it is installed in the root
  177. * table array.
  178. *
  179. ******************************************************************************/
  180. void
  181. acpi_tb_install_table(acpi_physical_address address,
  182. char *signature, u32 table_index)
  183. {
  184. struct acpi_table_header *table;
  185. struct acpi_table_header *final_table;
  186. struct acpi_table_desc *table_desc;
  187. if (!address) {
  188. ACPI_ERROR((AE_INFO,
  189. "Null physical address for ACPI table [%s]",
  190. signature));
  191. return;
  192. }
  193. /* Map just the table header */
  194. table = acpi_os_map_memory(address, sizeof(struct acpi_table_header));
  195. if (!table) {
  196. ACPI_ERROR((AE_INFO,
  197. "Could not map memory for table [%s] at %p",
  198. signature, ACPI_CAST_PTR(void, address)));
  199. return;
  200. }
  201. /* If a particular signature is expected (DSDT/FACS), it must match */
  202. if (signature && !ACPI_COMPARE_NAME(table->signature, signature)) {
  203. ACPI_BIOS_ERROR((AE_INFO,
  204. "Invalid signature 0x%X for ACPI table, expected [%s]",
  205. *ACPI_CAST_PTR(u32, table->signature),
  206. signature));
  207. goto unmap_and_exit;
  208. }
  209. /*
  210. * Initialize the table entry. Set the pointer to NULL, since the
  211. * table is not fully mapped at this time.
  212. */
  213. table_desc = &acpi_gbl_root_table_list.tables[table_index];
  214. table_desc->address = address;
  215. table_desc->pointer = NULL;
  216. table_desc->length = table->length;
  217. table_desc->flags = ACPI_TABLE_ORIGIN_MAPPED;
  218. ACPI_MOVE_32_TO_32(table_desc->signature.ascii, table->signature);
  219. /*
  220. * ACPI Table Override:
  221. *
  222. * Before we install the table, let the host OS override it with a new
  223. * one if desired. Any table within the RSDT/XSDT can be replaced,
  224. * including the DSDT which is pointed to by the FADT.
  225. *
  226. * NOTE: If the table is overridden, then final_table will contain a
  227. * mapped pointer to the full new table. If the table is not overridden,
  228. * or if there has been a physical override, then the table will be
  229. * fully mapped later (in verify table). In any case, we must
  230. * unmap the header that was mapped above.
  231. */
  232. final_table = acpi_tb_table_override(table, table_desc);
  233. if (!final_table) {
  234. final_table = table; /* There was no override */
  235. }
  236. acpi_tb_print_table_header(table_desc->address, final_table);
  237. /* Set the global integer width (based upon revision of the DSDT) */
  238. if (table_index == ACPI_TABLE_INDEX_DSDT) {
  239. acpi_ut_set_integer_width(final_table->revision);
  240. }
  241. /*
  242. * If we have a physical override during this early loading of the ACPI
  243. * tables, unmap the table for now. It will be mapped again later when
  244. * it is actually used. This supports very early loading of ACPI tables,
  245. * before virtual memory is fully initialized and running within the
  246. * host OS. Note: A logical override has the ACPI_TABLE_ORIGIN_OVERRIDE
  247. * flag set and will not be deleted below.
  248. */
  249. if (final_table != table) {
  250. acpi_tb_delete_table(table_desc);
  251. }
  252. unmap_and_exit:
  253. /* Always unmap the table header that we mapped above */
  254. acpi_os_unmap_memory(table, sizeof(struct acpi_table_header));
  255. }
  256. /*******************************************************************************
  257. *
  258. * FUNCTION: acpi_tb_get_root_table_entry
  259. *
  260. * PARAMETERS: table_entry - Pointer to the RSDT/XSDT table entry
  261. * table_entry_size - sizeof 32 or 64 (RSDT or XSDT)
  262. *
  263. * RETURN: Physical address extracted from the root table
  264. *
  265. * DESCRIPTION: Get one root table entry. Handles 32-bit and 64-bit cases on
  266. * both 32-bit and 64-bit platforms
  267. *
  268. * NOTE: acpi_physical_address is 32-bit on 32-bit platforms, 64-bit on
  269. * 64-bit platforms.
  270. *
  271. ******************************************************************************/
  272. static acpi_physical_address
  273. acpi_tb_get_root_table_entry(u8 *table_entry, u32 table_entry_size)
  274. {
  275. u64 address64;
  276. /*
  277. * Get the table physical address (32-bit for RSDT, 64-bit for XSDT):
  278. * Note: Addresses are 32-bit aligned (not 64) in both RSDT and XSDT
  279. */
  280. if (table_entry_size == ACPI_RSDT_ENTRY_SIZE) {
  281. /*
  282. * 32-bit platform, RSDT: Return 32-bit table entry
  283. * 64-bit platform, RSDT: Expand 32-bit to 64-bit and return
  284. */
  285. return ((acpi_physical_address)
  286. (*ACPI_CAST_PTR(u32, table_entry)));
  287. } else {
  288. /*
  289. * 32-bit platform, XSDT: Truncate 64-bit to 32-bit and return
  290. * 64-bit platform, XSDT: Move (unaligned) 64-bit to local,
  291. * return 64-bit
  292. */
  293. ACPI_MOVE_64_TO_64(&address64, table_entry);
  294. #if ACPI_MACHINE_WIDTH == 32
  295. if (address64 > ACPI_UINT32_MAX) {
  296. /* Will truncate 64-bit address to 32 bits, issue warning */
  297. ACPI_BIOS_WARNING((AE_INFO,
  298. "64-bit Physical Address in XSDT is too large (0x%8.8X%8.8X),"
  299. " truncating",
  300. ACPI_FORMAT_UINT64(address64)));
  301. }
  302. #endif
  303. return ((acpi_physical_address) (address64));
  304. }
  305. }
  306. /*******************************************************************************
  307. *
  308. * FUNCTION: acpi_tb_validate_xsdt
  309. *
  310. * PARAMETERS: address - Physical address of the XSDT (from RSDP)
  311. *
  312. * RETURN: Status. AE_OK if the table appears to be valid.
  313. *
  314. * DESCRIPTION: Validate an XSDT to ensure that it is of minimum size and does
  315. * not contain any NULL entries. A problem that is seen in the
  316. * field is that the XSDT exists, but is actually useless because
  317. * of one or more (or all) NULL entries.
  318. *
  319. ******************************************************************************/
  320. static acpi_status acpi_tb_validate_xsdt(acpi_physical_address xsdt_address)
  321. {
  322. struct acpi_table_header *table;
  323. u8 *next_entry;
  324. acpi_physical_address address;
  325. u32 length;
  326. u32 entry_count;
  327. acpi_status status;
  328. u32 i;
  329. /* Get the XSDT length */
  330. table =
  331. acpi_os_map_memory(xsdt_address, sizeof(struct acpi_table_header));
  332. if (!table) {
  333. return (AE_NO_MEMORY);
  334. }
  335. length = table->length;
  336. acpi_os_unmap_memory(table, sizeof(struct acpi_table_header));
  337. /*
  338. * Minimum XSDT length is the size of the standard ACPI header
  339. * plus one physical address entry
  340. */
  341. if (length < (sizeof(struct acpi_table_header) + ACPI_XSDT_ENTRY_SIZE)) {
  342. return (AE_INVALID_TABLE_LENGTH);
  343. }
  344. /* Map the entire XSDT */
  345. table = acpi_os_map_memory(xsdt_address, length);
  346. if (!table) {
  347. return (AE_NO_MEMORY);
  348. }
  349. /* Get the number of entries and pointer to first entry */
  350. status = AE_OK;
  351. next_entry = ACPI_ADD_PTR(u8, table, sizeof(struct acpi_table_header));
  352. entry_count = (u32)((table->length - sizeof(struct acpi_table_header)) /
  353. ACPI_XSDT_ENTRY_SIZE);
  354. /* Validate each entry (physical address) within the XSDT */
  355. for (i = 0; i < entry_count; i++) {
  356. address =
  357. acpi_tb_get_root_table_entry(next_entry,
  358. ACPI_XSDT_ENTRY_SIZE);
  359. if (!address) {
  360. /* Detected a NULL entry, XSDT is invalid */
  361. status = AE_NULL_ENTRY;
  362. break;
  363. }
  364. next_entry += ACPI_XSDT_ENTRY_SIZE;
  365. }
  366. /* Unmap table */
  367. acpi_os_unmap_memory(table, length);
  368. return (status);
  369. }
  370. /*******************************************************************************
  371. *
  372. * FUNCTION: acpi_tb_parse_root_table
  373. *
  374. * PARAMETERS: rsdp - Pointer to the RSDP
  375. *
  376. * RETURN: Status
  377. *
  378. * DESCRIPTION: This function is called to parse the Root System Description
  379. * Table (RSDT or XSDT)
  380. *
  381. * NOTE: Tables are mapped (not copied) for efficiency. The FACS must
  382. * be mapped and cannot be copied because it contains the actual
  383. * memory location of the ACPI Global Lock.
  384. *
  385. ******************************************************************************/
  386. acpi_status __init acpi_tb_parse_root_table(acpi_physical_address rsdp_address)
  387. {
  388. struct acpi_table_rsdp *rsdp;
  389. u32 table_entry_size;
  390. u32 i;
  391. u32 table_count;
  392. struct acpi_table_header *table;
  393. acpi_physical_address address;
  394. u32 length;
  395. u8 *table_entry;
  396. acpi_status status;
  397. ACPI_FUNCTION_TRACE(tb_parse_root_table);
  398. /* Map the entire RSDP and extract the address of the RSDT or XSDT */
  399. rsdp = acpi_os_map_memory(rsdp_address, sizeof(struct acpi_table_rsdp));
  400. if (!rsdp) {
  401. return_ACPI_STATUS(AE_NO_MEMORY);
  402. }
  403. acpi_tb_print_table_header(rsdp_address,
  404. ACPI_CAST_PTR(struct acpi_table_header,
  405. rsdp));
  406. /* Use XSDT if present and not overridden. Otherwise, use RSDT */
  407. if ((rsdp->revision > 1) &&
  408. rsdp->xsdt_physical_address && !acpi_gbl_do_not_use_xsdt) {
  409. /*
  410. * RSDP contains an XSDT (64-bit physical addresses). We must use
  411. * the XSDT if the revision is > 1 and the XSDT pointer is present,
  412. * as per the ACPI specification.
  413. */
  414. address = (acpi_physical_address) rsdp->xsdt_physical_address;
  415. table_entry_size = ACPI_XSDT_ENTRY_SIZE;
  416. } else {
  417. /* Root table is an RSDT (32-bit physical addresses) */
  418. address = (acpi_physical_address) rsdp->rsdt_physical_address;
  419. table_entry_size = ACPI_RSDT_ENTRY_SIZE;
  420. }
  421. /*
  422. * It is not possible to map more than one entry in some environments,
  423. * so unmap the RSDP here before mapping other tables
  424. */
  425. acpi_os_unmap_memory(rsdp, sizeof(struct acpi_table_rsdp));
  426. /*
  427. * If it is present and used, validate the XSDT for access/size
  428. * and ensure that all table entries are at least non-NULL
  429. */
  430. if (table_entry_size == ACPI_XSDT_ENTRY_SIZE) {
  431. status = acpi_tb_validate_xsdt(address);
  432. if (ACPI_FAILURE(status)) {
  433. ACPI_BIOS_WARNING((AE_INFO,
  434. "XSDT is invalid (%s), using RSDT",
  435. acpi_format_exception(status)));
  436. /* Fall back to the RSDT */
  437. address =
  438. (acpi_physical_address) rsdp->rsdt_physical_address;
  439. table_entry_size = ACPI_RSDT_ENTRY_SIZE;
  440. }
  441. }
  442. /* Map the RSDT/XSDT table header to get the full table length */
  443. table = acpi_os_map_memory(address, sizeof(struct acpi_table_header));
  444. if (!table) {
  445. return_ACPI_STATUS(AE_NO_MEMORY);
  446. }
  447. acpi_tb_print_table_header(address, table);
  448. /*
  449. * Validate length of the table, and map entire table.
  450. * Minimum length table must contain at least one entry.
  451. */
  452. length = table->length;
  453. acpi_os_unmap_memory(table, sizeof(struct acpi_table_header));
  454. if (length < (sizeof(struct acpi_table_header) + table_entry_size)) {
  455. ACPI_BIOS_ERROR((AE_INFO,
  456. "Invalid table length 0x%X in RSDT/XSDT",
  457. length));
  458. return_ACPI_STATUS(AE_INVALID_TABLE_LENGTH);
  459. }
  460. table = acpi_os_map_memory(address, length);
  461. if (!table) {
  462. return_ACPI_STATUS(AE_NO_MEMORY);
  463. }
  464. /* Validate the root table checksum */
  465. status = acpi_tb_verify_checksum(table, length);
  466. if (ACPI_FAILURE(status)) {
  467. acpi_os_unmap_memory(table, length);
  468. return_ACPI_STATUS(status);
  469. }
  470. /* Get the number of entries and pointer to first entry */
  471. table_count = (u32)((table->length - sizeof(struct acpi_table_header)) /
  472. table_entry_size);
  473. table_entry = ACPI_ADD_PTR(u8, table, sizeof(struct acpi_table_header));
  474. /*
  475. * First two entries in the table array are reserved for the DSDT
  476. * and FACS, which are not actually present in the RSDT/XSDT - they
  477. * come from the FADT
  478. */
  479. acpi_gbl_root_table_list.current_table_count = 2;
  480. /* Initialize the root table array from the RSDT/XSDT */
  481. for (i = 0; i < table_count; i++) {
  482. if (acpi_gbl_root_table_list.current_table_count >=
  483. acpi_gbl_root_table_list.max_table_count) {
  484. /* There is no more room in the root table array, attempt resize */
  485. status = acpi_tb_resize_root_table_list();
  486. if (ACPI_FAILURE(status)) {
  487. ACPI_WARNING((AE_INFO,
  488. "Truncating %u table entries!",
  489. (unsigned) (table_count -
  490. (acpi_gbl_root_table_list.
  491. current_table_count -
  492. 2))));
  493. break;
  494. }
  495. }
  496. /* Get the table physical address (32-bit for RSDT, 64-bit for XSDT) */
  497. acpi_gbl_root_table_list.tables[acpi_gbl_root_table_list.
  498. current_table_count].address =
  499. acpi_tb_get_root_table_entry(table_entry, table_entry_size);
  500. table_entry += table_entry_size;
  501. acpi_gbl_root_table_list.current_table_count++;
  502. }
  503. /*
  504. * It is not possible to map more than one entry in some environments,
  505. * so unmap the root table here before mapping other tables
  506. */
  507. acpi_os_unmap_memory(table, length);
  508. /*
  509. * Complete the initialization of the root table array by examining
  510. * the header of each table
  511. */
  512. for (i = 2; i < acpi_gbl_root_table_list.current_table_count; i++) {
  513. acpi_tb_install_table(acpi_gbl_root_table_list.tables[i].
  514. address, NULL, i);
  515. /* Special case for FADT - validate it then get the DSDT and FACS */
  516. if (ACPI_COMPARE_NAME
  517. (&acpi_gbl_root_table_list.tables[i].signature,
  518. ACPI_SIG_FADT)) {
  519. acpi_tb_parse_fadt(i);
  520. }
  521. }
  522. return_ACPI_STATUS(AE_OK);
  523. }