diff options
-rw-r--r-- | drivers/acpi/acpica/acglobal.h | 8 | ||||
-rw-r--r-- | drivers/acpi/acpica/hwvalid.c | 12 | ||||
-rw-r--r-- | drivers/acpi/acpica/nsinit.c | 9 | ||||
-rw-r--r-- | include/acpi/acpixf.h | 1 |
4 files changed, 30 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h index 9070f1fe8f17..899d68afc3c5 100644 --- a/drivers/acpi/acpica/acglobal.h +++ b/drivers/acpi/acpica/acglobal.h | |||
@@ -125,6 +125,14 @@ u8 ACPI_INIT_GLOBAL(acpi_gbl_enable_aml_debug_object, FALSE); | |||
125 | */ | 125 | */ |
126 | u8 ACPI_INIT_GLOBAL(acpi_gbl_copy_dsdt_locally, FALSE); | 126 | u8 ACPI_INIT_GLOBAL(acpi_gbl_copy_dsdt_locally, FALSE); |
127 | 127 | ||
128 | /* | ||
129 | * Optionally truncate I/O addresses to 16 bits. Provides compatibility | ||
130 | * with other ACPI implementations. NOTE: During ACPICA initialization, | ||
131 | * this value is set to TRUE if any Windows OSI strings have been | ||
132 | * requested by the BIOS. | ||
133 | */ | ||
134 | u8 ACPI_INIT_GLOBAL(acpi_gbl_truncate_io_addresses, FALSE); | ||
135 | |||
128 | /* acpi_gbl_FADT is a local copy of the FADT, converted to a common format. */ | 136 | /* acpi_gbl_FADT is a local copy of the FADT, converted to a common format. */ |
129 | 137 | ||
130 | struct acpi_table_fadt acpi_gbl_FADT; | 138 | struct acpi_table_fadt acpi_gbl_FADT; |
diff --git a/drivers/acpi/acpica/hwvalid.c b/drivers/acpi/acpica/hwvalid.c index c10d587c1641..e1d9c777b213 100644 --- a/drivers/acpi/acpica/hwvalid.c +++ b/drivers/acpi/acpica/hwvalid.c | |||
@@ -222,6 +222,12 @@ acpi_status acpi_hw_read_port(acpi_io_address address, u32 *value, u32 width) | |||
222 | u32 one_byte; | 222 | u32 one_byte; |
223 | u32 i; | 223 | u32 i; |
224 | 224 | ||
225 | /* Truncate address to 16 bits if requested */ | ||
226 | |||
227 | if (acpi_gbl_truncate_io_addresses) { | ||
228 | address &= ACPI_UINT16_MAX; | ||
229 | } | ||
230 | |||
225 | /* Validate the entire request and perform the I/O */ | 231 | /* Validate the entire request and perform the I/O */ |
226 | 232 | ||
227 | status = acpi_hw_validate_io_request(address, width); | 233 | status = acpi_hw_validate_io_request(address, width); |
@@ -279,6 +285,12 @@ acpi_status acpi_hw_write_port(acpi_io_address address, u32 value, u32 width) | |||
279 | acpi_status status; | 285 | acpi_status status; |
280 | u32 i; | 286 | u32 i; |
281 | 287 | ||
288 | /* Truncate address to 16 bits if requested */ | ||
289 | |||
290 | if (acpi_gbl_truncate_io_addresses) { | ||
291 | address &= ACPI_UINT16_MAX; | ||
292 | } | ||
293 | |||
282 | /* Validate the entire request and perform the I/O */ | 294 | /* Validate the entire request and perform the I/O */ |
283 | 295 | ||
284 | status = acpi_hw_validate_io_request(address, width); | 296 | status = acpi_hw_validate_io_request(address, width); |
diff --git a/drivers/acpi/acpica/nsinit.c b/drivers/acpi/acpica/nsinit.c index 9bd6f050f299..4e5272c313e0 100644 --- a/drivers/acpi/acpica/nsinit.c +++ b/drivers/acpi/acpica/nsinit.c | |||
@@ -193,6 +193,15 @@ acpi_status acpi_ns_initialize_devices(void) | |||
193 | acpi_ns_init_one_device, NULL, &info, | 193 | acpi_ns_init_one_device, NULL, &info, |
194 | NULL); | 194 | NULL); |
195 | 195 | ||
196 | /* | ||
197 | * Any _OSI requests should be completed by now. If the BIOS has | ||
198 | * requested any Windows OSI strings, we will always truncate | ||
199 | * I/O addresses to 16 bits -- for Windows compatibility. | ||
200 | */ | ||
201 | if (acpi_gbl_osi_data >= ACPI_OSI_WIN_2000) { | ||
202 | acpi_gbl_truncate_io_addresses = TRUE; | ||
203 | } | ||
204 | |||
196 | ACPI_FREE(info.evaluate_info); | 205 | ACPI_FREE(info.evaluate_info); |
197 | if (ACPI_FAILURE(status)) { | 206 | if (ACPI_FAILURE(status)) { |
198 | goto error_exit; | 207 | goto error_exit; |
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 0e4ab1fe5966..1371cc997393 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
@@ -69,6 +69,7 @@ extern acpi_name acpi_gbl_trace_method_name; | |||
69 | extern u32 acpi_gbl_trace_flags; | 69 | extern u32 acpi_gbl_trace_flags; |
70 | extern u8 acpi_gbl_enable_aml_debug_object; | 70 | extern u8 acpi_gbl_enable_aml_debug_object; |
71 | extern u8 acpi_gbl_copy_dsdt_locally; | 71 | extern u8 acpi_gbl_copy_dsdt_locally; |
72 | extern u8 acpi_gbl_truncate_io_addresses; | ||
72 | 73 | ||
73 | extern u32 acpi_current_gpe_count; | 74 | extern u32 acpi_current_gpe_count; |
74 | extern struct acpi_table_fadt acpi_gbl_FADT; | 75 | extern struct acpi_table_fadt acpi_gbl_FADT; |