tbxfroot.c 18 KB

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