aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/tables/tbrsdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/tables/tbrsdt.c')
-rw-r--r--drivers/acpi/tables/tbrsdt.c34
1 files changed, 18 insertions, 16 deletions
diff --git a/drivers/acpi/tables/tbrsdt.c b/drivers/acpi/tables/tbrsdt.c
index b7ffe39c3626..13c6ddb2f546 100644
--- a/drivers/acpi/tables/tbrsdt.c
+++ b/drivers/acpi/tables/tbrsdt.c
@@ -159,8 +159,8 @@ cleanup:
159 * 159 *
160 * RETURN: None, Address 160 * RETURN: None, Address
161 * 161 *
162 * DESCRIPTION: Extract the address of the RSDT or XSDT, depending on the 162 * DESCRIPTION: Extract the address of either the RSDT or XSDT, depending on the
163 * version of the RSDP 163 * version of the RSDP and whether the XSDT pointer is valid
164 * 164 *
165 ******************************************************************************/ 165 ******************************************************************************/
166 166
@@ -174,16 +174,19 @@ acpi_tb_get_rsdt_address (
174 174
175 out_address->pointer_type = acpi_gbl_table_flags | ACPI_LOGICAL_ADDRESSING; 175 out_address->pointer_type = acpi_gbl_table_flags | ACPI_LOGICAL_ADDRESSING;
176 176
177 /* 177 /* Use XSDT if it is present */
178 * For RSDP revision 0 or 1, we use the RSDT. 178
179 * For RSDP revision 2 (and above), we use the XSDT 179 if ((acpi_gbl_RSDP->revision >= 2) &&
180 */ 180 acpi_gbl_RSDP->xsdt_physical_address) {
181 if (acpi_gbl_RSDP->revision < 2) {
182 out_address->pointer.value = acpi_gbl_RSDP->rsdt_physical_address;
183 }
184 else {
185 out_address->pointer.value = 181 out_address->pointer.value =
186 acpi_gbl_RSDP->xsdt_physical_address; 182 acpi_gbl_RSDP->xsdt_physical_address;
183 acpi_gbl_root_table_type = ACPI_TABLE_TYPE_XSDT;
184 }
185 else {
186 /* No XSDT, use the RSDT */
187
188 out_address->pointer.value = acpi_gbl_RSDP->rsdt_physical_address;
189 acpi_gbl_root_table_type = ACPI_TABLE_TYPE_RSDT;
187 } 190 }
188} 191}
189 192
@@ -211,10 +214,9 @@ acpi_tb_validate_rsdt (
211 214
212 215
213 /* 216 /*
214 * For RSDP revision 0 or 1, we use the RSDT. 217 * Search for appropriate signature, RSDT or XSDT
215 * For RSDP revision 2 and above, we use the XSDT
216 */ 218 */
217 if (acpi_gbl_RSDP->revision < 2) { 219 if (acpi_gbl_root_table_type == ACPI_TABLE_TYPE_RSDT) {
218 no_match = ACPI_STRNCMP ((char *) table_ptr, RSDT_SIG, 220 no_match = ACPI_STRNCMP ((char *) table_ptr, RSDT_SIG,
219 sizeof (RSDT_SIG) -1); 221 sizeof (RSDT_SIG) -1);
220 } 222 }
@@ -236,11 +238,11 @@ acpi_tb_validate_rsdt (
236 acpi_gbl_RSDP->rsdt_physical_address, 238 acpi_gbl_RSDP->rsdt_physical_address,
237 (void *) (acpi_native_uint) acpi_gbl_RSDP->rsdt_physical_address)); 239 (void *) (acpi_native_uint) acpi_gbl_RSDP->rsdt_physical_address));
238 240
239 if (acpi_gbl_RSDP->revision < 2) { 241 if (acpi_gbl_root_table_type == ACPI_TABLE_TYPE_RSDT) {
240 ACPI_REPORT_ERROR (("Looking for RSDT (RSDP->Rev < 2)\n")) 242 ACPI_REPORT_ERROR (("Looking for RSDT\n"))
241 } 243 }
242 else { 244 else {
243 ACPI_REPORT_ERROR (("Looking for XSDT (RSDP->Rev >= 2)\n")) 245 ACPI_REPORT_ERROR (("Looking for XSDT\n"))
244 } 246 }
245 247
246 ACPI_DUMP_BUFFER ((char *) table_ptr, 48); 248 ACPI_DUMP_BUFFER ((char *) table_ptr, 48);