tbxfroot.c 18 KB

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