tbxfroot.c 19 KB

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