@@ -112,6 +112,12 @@ u8 ACPI_INIT_GLOBAL(acpi_gbl_leave_wake_gpes_disabled, TRUE);
*/
u8 ACPI_INIT_GLOBAL(acpi_gbl_use_default_register_widths, TRUE);
+/*
+ * Optionally provide compatibility with Windows by only using the lower
+ * 16 bits of system io addresses.
+ */
+u8 ACPI_INIT_GLOBAL(acpi_gbl_ignore_high_ioport_bits, FALSE);
+
/* acpi_gbl_FADT is a local copy of the FADT, converted to a common format. */
struct acpi_table_fadt acpi_gbl_FADT;
@@ -222,6 +222,11 @@ acpi_status acpi_hw_read_port(acpi_io_address address, u32 *value, u32 width)
u32 one_byte;
u32 i;
+ if (acpi_gbl_ignore_high_ioport_bits)
+ /* Windows only uses the lower 16 bits of an address.
+ Emulate that */
+ address &= 0xffff;
+
/* Validate the entire request and perform the I/O */
status = acpi_hw_validate_io_request(address, width);
@@ -279,6 +284,11 @@ acpi_status acpi_hw_write_port(acpi_io_address address, u32 value, u32 width)
acpi_status status;
u32 i;
+ if (acpi_gbl_ignore_high_ioport_bits)
+ /* Windows only uses the lower 16 bits of an address.
+ Emulate that */
+ address &= 0xffff;
+
/* Validate the entire request and perform the I/O */
status = acpi_hw_validate_io_request(address, width);
@@ -65,6 +65,7 @@ extern u8 acpi_gbl_all_methods_serialized;
extern u8 acpi_gbl_create_osi_method;
extern u8 acpi_gbl_leave_wake_gpes_disabled;
extern u8 acpi_gbl_use_default_register_widths;
+extern u8 acpi_gbl_ignore_high_ioport_bits;
extern acpi_name acpi_gbl_trace_method_name;
extern u32 acpi_gbl_trace_flags;