tbxfroot.c 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643
  1. /******************************************************************************
  2. *
  3. * Module Name: tbxfroot - Find the root ACPI table (RSDT)
  4. *
  5. *****************************************************************************/
  6. /*
  7. * Copyright (C) 2000 - 2005, R. Byron Moore
  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 <linux/module.h>
  43. #include <acpi/acpi.h>
  44. #include <acpi/actables.h>
  45. #define _COMPONENT ACPI_TABLES
  46. ACPI_MODULE_NAME ("tbxfroot")
  47. /* Local prototypes */
  48. static acpi_status
  49. acpi_tb_find_rsdp (
  50. struct acpi_table_desc *table_info,
  51. u32 flags);
  52. static u8 *
  53. acpi_tb_scan_memory_for_rsdp (
  54. u8 *start_address,
  55. u32 length);
  56. /*******************************************************************************
  57. *
  58. * FUNCTION: acpi_tb_find_table
  59. *
  60. * PARAMETERS: Signature - String with ACPI table signature
  61. * oem_id - String with the table OEM ID
  62. * oem_table_id - String with the OEM Table ID
  63. * table_ptr - Where the table pointer is returned
  64. *
  65. * RETURN: Status
  66. *
  67. * DESCRIPTION: Find an ACPI table (in the RSDT/XSDT) that matches the
  68. * Signature, OEM ID and OEM Table ID.
  69. *
  70. ******************************************************************************/
  71. acpi_status
  72. acpi_tb_find_table (
  73. char *signature,
  74. char *oem_id,
  75. char *oem_table_id,
  76. struct acpi_table_header **table_ptr)
  77. {
  78. acpi_status status;
  79. struct acpi_table_header *table;
  80. ACPI_FUNCTION_TRACE ("tb_find_table");
  81. /* Validate string lengths */
  82. if ((ACPI_STRLEN (signature) > ACPI_NAME_SIZE) ||
  83. (ACPI_STRLEN (oem_id) > sizeof (table->oem_id)) ||
  84. (ACPI_STRLEN (oem_table_id) > sizeof (table->oem_table_id))) {
  85. return_ACPI_STATUS (AE_AML_STRING_LIMIT);
  86. }
  87. if (!ACPI_STRNCMP (signature, DSDT_SIG, ACPI_NAME_SIZE)) {
  88. /*
  89. * The DSDT pointer is contained in the FADT, not the RSDT.
  90. * This code should suffice, because the only code that would perform
  91. * a "find" on the DSDT is the data_table_region() AML opcode -- in
  92. * which case, the DSDT is guaranteed to be already loaded.
  93. * If this becomes insufficient, the FADT will have to be found first.
  94. */
  95. if (!acpi_gbl_DSDT) {
  96. return_ACPI_STATUS (AE_NO_ACPI_TABLES);
  97. }
  98. table = acpi_gbl_DSDT;
  99. }
  100. else {
  101. /* Find the table */
  102. status = acpi_get_firmware_table (signature, 1,
  103. ACPI_LOGICAL_ADDRESSING, &table);
  104. if (ACPI_FAILURE (status)) {
  105. return_ACPI_STATUS (status);
  106. }
  107. }
  108. /* Check oem_id and oem_table_id */
  109. if ((oem_id[0] && ACPI_STRNCMP (
  110. oem_id, table->oem_id,
  111. sizeof (table->oem_id))) ||
  112. (oem_table_id[0] && ACPI_STRNCMP (
  113. oem_table_id, table->oem_table_id,
  114. sizeof (table->oem_table_id)))) {
  115. return_ACPI_STATUS (AE_AML_NAME_NOT_FOUND);
  116. }
  117. ACPI_DEBUG_PRINT ((ACPI_DB_TABLES, "Found table [%4.4s]\n",
  118. table->signature));
  119. *table_ptr = table;
  120. return_ACPI_STATUS (AE_OK);
  121. }
  122. /*******************************************************************************
  123. *
  124. * FUNCTION: acpi_get_firmware_table
  125. *
  126. * PARAMETERS: Signature - Any ACPI table signature
  127. * Instance - the non zero instance of the table, allows
  128. * support for multiple tables of the same type
  129. * Flags - Physical/Virtual support
  130. * table_pointer - Where a buffer containing the table is
  131. * returned
  132. *
  133. * RETURN: Status
  134. *
  135. * DESCRIPTION: This function is called to get an ACPI table. A buffer is
  136. * allocated for the table and returned in table_pointer.
  137. * This table will be a complete table including the header.
  138. *
  139. ******************************************************************************/
  140. acpi_status
  141. acpi_get_firmware_table (
  142. acpi_string signature,
  143. u32 instance,
  144. u32 flags,
  145. struct acpi_table_header **table_pointer)
  146. {
  147. acpi_status status;
  148. struct acpi_pointer address;
  149. struct acpi_table_header *header = NULL;
  150. struct acpi_table_desc *table_info = NULL;
  151. struct acpi_table_desc *rsdt_info;
  152. u32 table_count;
  153. u32 i;
  154. u32 j;
  155. ACPI_FUNCTION_TRACE ("acpi_get_firmware_table");
  156. /*
  157. * Ensure that at least the table manager is initialized. We don't
  158. * require that the entire ACPI subsystem is up for this interface.
  159. * If we have a buffer, we must have a length too
  160. */
  161. if ((instance == 0) ||
  162. (!signature) ||
  163. (!table_pointer)) {
  164. return_ACPI_STATUS (AE_BAD_PARAMETER);
  165. }
  166. /* Ensure that we have a RSDP */
  167. if (!acpi_gbl_RSDP) {
  168. /* Get the RSDP */
  169. status = acpi_os_get_root_pointer (flags, &address);
  170. if (ACPI_FAILURE (status)) {
  171. ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "RSDP not found\n"));
  172. return_ACPI_STATUS (AE_NO_ACPI_TABLES);
  173. }
  174. /* Map and validate the RSDP */
  175. if ((flags & ACPI_MEMORY_MODE) == ACPI_LOGICAL_ADDRESSING) {
  176. status = acpi_os_map_memory (address.pointer.physical,
  177. sizeof (struct rsdp_descriptor), (void *) &acpi_gbl_RSDP);
  178. if (ACPI_FAILURE (status)) {
  179. return_ACPI_STATUS (status);
  180. }
  181. }
  182. else {
  183. acpi_gbl_RSDP = address.pointer.logical;
  184. }
  185. /* The signature and checksum must both be correct */
  186. if (ACPI_STRNCMP ((char *) acpi_gbl_RSDP, RSDP_SIG,
  187. sizeof (RSDP_SIG)-1) != 0) {
  188. /* Nope, BAD Signature */
  189. return_ACPI_STATUS (AE_BAD_SIGNATURE);
  190. }
  191. if (acpi_tb_checksum (acpi_gbl_RSDP, ACPI_RSDP_CHECKSUM_LENGTH) != 0) {
  192. /* Nope, BAD Checksum */
  193. return_ACPI_STATUS (AE_BAD_CHECKSUM);
  194. }
  195. }
  196. /* Get the RSDT address via the RSDP */
  197. acpi_tb_get_rsdt_address (&address);
  198. ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
  199. "RSDP located at %p, RSDT physical=%8.8X%8.8X \n",
  200. acpi_gbl_RSDP,
  201. ACPI_FORMAT_UINT64 (address.pointer.value)));
  202. /* Insert processor_mode flags */
  203. address.pointer_type |= flags;
  204. /* Get and validate the RSDT */
  205. rsdt_info = ACPI_MEM_CALLOCATE (sizeof (struct acpi_table_desc));
  206. if (!rsdt_info) {
  207. return_ACPI_STATUS (AE_NO_MEMORY);
  208. }
  209. status = acpi_tb_get_table (&address, rsdt_info);
  210. if (ACPI_FAILURE (status)) {
  211. goto cleanup;
  212. }
  213. status = acpi_tb_validate_rsdt (rsdt_info->pointer);
  214. if (ACPI_FAILURE (status)) {
  215. goto cleanup;
  216. }
  217. /* Allocate a scratch table header and table descriptor */
  218. header = ACPI_MEM_ALLOCATE (sizeof (struct acpi_table_header));
  219. if (!header) {
  220. status = AE_NO_MEMORY;
  221. goto cleanup;
  222. }
  223. table_info = ACPI_MEM_ALLOCATE (sizeof (struct acpi_table_desc));
  224. if (!table_info) {
  225. status = AE_NO_MEMORY;
  226. goto cleanup;
  227. }
  228. /* Get the number of table pointers within the RSDT */
  229. table_count = acpi_tb_get_table_count (acpi_gbl_RSDP, rsdt_info->pointer);
  230. address.pointer_type = acpi_gbl_table_flags | flags;
  231. /*
  232. * Search the RSDT/XSDT for the correct instance of the
  233. * requested table
  234. */
  235. for (i = 0, j = 0; i < table_count; i++) {
  236. /*
  237. * Get the next table pointer, handle RSDT vs. XSDT
  238. * RSDT pointers are 32 bits, XSDT pointers are 64 bits
  239. */
  240. if (acpi_gbl_root_table_type == ACPI_TABLE_TYPE_RSDT) {
  241. address.pointer.value = (ACPI_CAST_PTR (
  242. RSDT_DESCRIPTOR, rsdt_info->pointer))->table_offset_entry[i];
  243. }
  244. else {
  245. address.pointer.value = (ACPI_CAST_PTR (
  246. XSDT_DESCRIPTOR, rsdt_info->pointer))->table_offset_entry[i];
  247. }
  248. /* Get the table header */
  249. status = acpi_tb_get_table_header (&address, header);
  250. if (ACPI_FAILURE (status)) {
  251. goto cleanup;
  252. }
  253. /* Compare table signatures and table instance */
  254. if (!ACPI_STRNCMP (header->signature, signature, ACPI_NAME_SIZE)) {
  255. /* An instance of the table was found */
  256. j++;
  257. if (j >= instance) {
  258. /* Found the correct instance, get the entire table */
  259. status = acpi_tb_get_table_body (&address, header, table_info);
  260. if (ACPI_FAILURE (status)) {
  261. goto cleanup;
  262. }
  263. *table_pointer = table_info->pointer;
  264. goto cleanup;
  265. }
  266. }
  267. }
  268. /* Did not find the table */
  269. status = AE_NOT_EXIST;
  270. cleanup:
  271. if (rsdt_info->pointer) {
  272. acpi_os_unmap_memory (rsdt_info->pointer,
  273. (acpi_size) rsdt_info->pointer->length);
  274. }
  275. ACPI_MEM_FREE (rsdt_info);
  276. if (header) {
  277. ACPI_MEM_FREE (header);
  278. }
  279. if (table_info) {
  280. ACPI_MEM_FREE (table_info);
  281. }
  282. return_ACPI_STATUS (status);
  283. }
  284. EXPORT_SYMBOL(acpi_get_firmware_table);
  285. /* TBD: Move to a new file */
  286. #if ACPI_MACHINE_WIDTH != 16
  287. /*******************************************************************************
  288. *
  289. * FUNCTION: acpi_find_root_pointer
  290. *
  291. * PARAMETERS: Flags - Logical/Physical addressing
  292. * rsdp_address - Where to place the RSDP address
  293. *
  294. * RETURN: Status, Physical address of the RSDP
  295. *
  296. * DESCRIPTION: Find the RSDP
  297. *
  298. ******************************************************************************/
  299. acpi_status
  300. acpi_find_root_pointer (
  301. u32 flags,
  302. struct acpi_pointer *rsdp_address)
  303. {
  304. struct acpi_table_desc table_info;
  305. acpi_status status;
  306. ACPI_FUNCTION_TRACE ("acpi_find_root_pointer");
  307. /* Get the RSDP */
  308. status = acpi_tb_find_rsdp (&table_info, flags);
  309. if (ACPI_FAILURE (status)) {
  310. ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
  311. "RSDP structure not found, %s Flags=%X\n",
  312. acpi_format_exception (status), flags));
  313. return_ACPI_STATUS (AE_NO_ACPI_TABLES);
  314. }
  315. rsdp_address->pointer_type = ACPI_PHYSICAL_POINTER;
  316. rsdp_address->pointer.physical = table_info.physical_address;
  317. return_ACPI_STATUS (AE_OK);
  318. }
  319. /*******************************************************************************
  320. *
  321. * FUNCTION: acpi_tb_scan_memory_for_rsdp
  322. *
  323. * PARAMETERS: start_address - Starting pointer for search
  324. * Length - Maximum length to search
  325. *
  326. * RETURN: Pointer to the RSDP if found, otherwise NULL.
  327. *
  328. * DESCRIPTION: Search a block of memory for the RSDP signature
  329. *
  330. ******************************************************************************/
  331. static u8 *
  332. acpi_tb_scan_memory_for_rsdp (
  333. u8 *start_address,
  334. u32 length)
  335. {
  336. u8 *mem_rover;
  337. u8 *end_address;
  338. u8 checksum;
  339. ACPI_FUNCTION_TRACE ("tb_scan_memory_for_rsdp");
  340. end_address = start_address + length;
  341. /* Search from given start address for the requested length */
  342. for (mem_rover = start_address; mem_rover < end_address;
  343. mem_rover += ACPI_RSDP_SCAN_STEP) {
  344. /* The signature and checksum must both be correct */
  345. if (ACPI_STRNCMP ((char *) mem_rover,
  346. RSDP_SIG, sizeof (RSDP_SIG) - 1) != 0) {
  347. /* No signature match, keep looking */
  348. continue;
  349. }
  350. /* Signature matches, check the appropriate checksum */
  351. if ((ACPI_CAST_PTR (struct rsdp_descriptor, mem_rover))->revision < 2) {
  352. /* ACPI version 1.0 */
  353. checksum = acpi_tb_checksum (mem_rover, ACPI_RSDP_CHECKSUM_LENGTH);
  354. }
  355. else {
  356. /* Post ACPI 1.0, use extended_checksum */
  357. checksum = acpi_tb_checksum (mem_rover, ACPI_RSDP_XCHECKSUM_LENGTH);
  358. }
  359. if (checksum == 0) {
  360. /* Checksum valid, we have found a valid RSDP */
  361. ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
  362. "RSDP located at physical address %p\n", mem_rover));
  363. return_PTR (mem_rover);
  364. }
  365. ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
  366. "Found an RSDP at physical address %p, but it has a bad checksum\n",
  367. mem_rover));
  368. }
  369. /* Searched entire block, no RSDP was found */
  370. ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
  371. "Searched entire block, no valid RSDP was found.\n"));
  372. return_PTR (NULL);
  373. }
  374. /*******************************************************************************
  375. *
  376. * FUNCTION: acpi_tb_find_rsdp
  377. *
  378. * PARAMETERS: table_info - Where the table info is returned
  379. * Flags - Current memory mode (logical vs.
  380. * physical addressing)
  381. *
  382. * RETURN: Status, RSDP physical address
  383. *
  384. * DESCRIPTION: search lower 1_mbyte of memory for the root system descriptor
  385. * pointer structure. If it is found, set *RSDP to point to it.
  386. *
  387. * NOTE1: The RSDp must be either in the first 1_k of the Extended
  388. * BIOS Data Area or between E0000 and FFFFF (From ACPI Spec.)
  389. * Only a 32-bit physical address is necessary.
  390. *
  391. * NOTE2: This function is always available, regardless of the
  392. * initialization state of the rest of ACPI.
  393. *
  394. ******************************************************************************/
  395. static acpi_status
  396. acpi_tb_find_rsdp (
  397. struct acpi_table_desc *table_info,
  398. u32 flags)
  399. {
  400. u8 *table_ptr;
  401. u8 *mem_rover;
  402. u32 physical_address;
  403. acpi_status status;
  404. ACPI_FUNCTION_TRACE ("tb_find_rsdp");
  405. /*
  406. * Scan supports either logical addressing or physical addressing
  407. */
  408. if ((flags & ACPI_MEMORY_MODE) == ACPI_LOGICAL_ADDRESSING) {
  409. /* 1a) Get the location of the Extended BIOS Data Area (EBDA) */
  410. status = acpi_os_map_memory (
  411. (acpi_physical_address) ACPI_EBDA_PTR_LOCATION,
  412. ACPI_EBDA_PTR_LENGTH, (void *) &table_ptr);
  413. if (ACPI_FAILURE (status)) {
  414. ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
  415. "Could not map memory at %8.8X for length %X\n",
  416. ACPI_EBDA_PTR_LOCATION, ACPI_EBDA_PTR_LENGTH));
  417. return_ACPI_STATUS (status);
  418. }
  419. ACPI_MOVE_16_TO_32 (&physical_address, table_ptr);
  420. /* Convert segment part to physical address */
  421. physical_address <<= 4;
  422. acpi_os_unmap_memory (table_ptr, ACPI_EBDA_PTR_LENGTH);
  423. /* EBDA present? */
  424. if (physical_address > 0x400) {
  425. /*
  426. * 1b) Search EBDA paragraphs (EBDa is required to be a
  427. * minimum of 1_k length)
  428. */
  429. status = acpi_os_map_memory (
  430. (acpi_physical_address) physical_address,
  431. ACPI_EBDA_WINDOW_SIZE, (void *) &table_ptr);
  432. if (ACPI_FAILURE (status)) {
  433. ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
  434. "Could not map memory at %8.8X for length %X\n",
  435. physical_address, ACPI_EBDA_WINDOW_SIZE));
  436. return_ACPI_STATUS (status);
  437. }
  438. mem_rover = acpi_tb_scan_memory_for_rsdp (table_ptr,
  439. ACPI_EBDA_WINDOW_SIZE);
  440. acpi_os_unmap_memory (table_ptr, ACPI_EBDA_WINDOW_SIZE);
  441. if (mem_rover) {
  442. /* Found it, return the physical address */
  443. physical_address += ACPI_PTR_DIFF (mem_rover, table_ptr);
  444. table_info->physical_address =
  445. (acpi_physical_address) physical_address;
  446. return_ACPI_STATUS (AE_OK);
  447. }
  448. }
  449. /*
  450. * 2) Search upper memory: 16-byte boundaries in E0000h-FFFFFh
  451. */
  452. status = acpi_os_map_memory (
  453. (acpi_physical_address) ACPI_HI_RSDP_WINDOW_BASE,
  454. ACPI_HI_RSDP_WINDOW_SIZE, (void *) &table_ptr);
  455. if (ACPI_FAILURE (status)) {
  456. ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
  457. "Could not map memory at %8.8X for length %X\n",
  458. ACPI_HI_RSDP_WINDOW_BASE, ACPI_HI_RSDP_WINDOW_SIZE));
  459. return_ACPI_STATUS (status);
  460. }
  461. mem_rover = acpi_tb_scan_memory_for_rsdp (table_ptr, ACPI_HI_RSDP_WINDOW_SIZE);
  462. acpi_os_unmap_memory (table_ptr, ACPI_HI_RSDP_WINDOW_SIZE);
  463. if (mem_rover) {
  464. /* Found it, return the physical address */
  465. physical_address =
  466. ACPI_HI_RSDP_WINDOW_BASE + ACPI_PTR_DIFF (mem_rover, table_ptr);
  467. table_info->physical_address =
  468. (acpi_physical_address) physical_address;
  469. return_ACPI_STATUS (AE_OK);
  470. }
  471. }
  472. /*
  473. * Physical addressing
  474. */
  475. else {
  476. /* 1a) Get the location of the EBDA */
  477. ACPI_MOVE_16_TO_32 (&physical_address, ACPI_EBDA_PTR_LOCATION);
  478. physical_address <<= 4; /* Convert segment to physical address */
  479. /* EBDA present? */
  480. if (physical_address > 0x400) {
  481. /*
  482. * 1b) Search EBDA paragraphs (EBDa is required to be a minimum of
  483. * 1_k length)
  484. */
  485. mem_rover = acpi_tb_scan_memory_for_rsdp (
  486. ACPI_PHYSADDR_TO_PTR (physical_address),
  487. ACPI_EBDA_WINDOW_SIZE);
  488. if (mem_rover) {
  489. /* Found it, return the physical address */
  490. table_info->physical_address = ACPI_TO_INTEGER (mem_rover);
  491. return_ACPI_STATUS (AE_OK);
  492. }
  493. }
  494. /* 2) Search upper memory: 16-byte boundaries in E0000h-FFFFFh */
  495. mem_rover = acpi_tb_scan_memory_for_rsdp (
  496. ACPI_PHYSADDR_TO_PTR (ACPI_HI_RSDP_WINDOW_BASE),
  497. ACPI_HI_RSDP_WINDOW_SIZE);
  498. if (mem_rover) {
  499. /* Found it, return the physical address */
  500. table_info->physical_address = ACPI_TO_INTEGER (mem_rover);
  501. return_ACPI_STATUS (AE_OK);
  502. }
  503. }
  504. /* RSDP signature was not found */
  505. return_ACPI_STATUS (AE_NOT_FOUND);
  506. }
  507. #endif