diff options
author | Bob Moore <robert.moore@intel.com> | 2013-10-28 21:29:45 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-10-30 07:24:22 -0400 |
commit | e07fcfd89f9bbbc5f655b85b70e6f9b0bb626bac (patch) | |
tree | f51df8ea58847f0fb01a9803530fddc6eb766269 | |
parent | ab3b24807adabdc32f8a9d5d7d3902e1e744d139 (diff) |
ACPICA: Hardcode access width for the reset register.
The ACPI spec requires the reset register width to be 8, so we
now hardcode it and ignore the FADT value. This provides/maintains
compatibility with other ACPI implementations that have allowed
BIOS code with bad register width values to go unnoticed.
Matthew Garett, Bob Moore, Lv Zheng.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/acpi/acpica/hwxface.c | 10 | ||||
-rw-r--r-- | include/acpi/actypes.h | 1 |
2 files changed, 9 insertions, 2 deletions
diff --git a/drivers/acpi/acpica/hwxface.c b/drivers/acpi/acpica/hwxface.c index f81fb068d20e..d3682c2ae0d1 100644 --- a/drivers/acpi/acpica/hwxface.c +++ b/drivers/acpi/acpica/hwxface.c | |||
@@ -83,11 +83,17 @@ acpi_status acpi_reset(void) | |||
83 | * For I/O space, write directly to the OSL. This bypasses the port | 83 | * For I/O space, write directly to the OSL. This bypasses the port |
84 | * validation mechanism, which may block a valid write to the reset | 84 | * validation mechanism, which may block a valid write to the reset |
85 | * register. | 85 | * register. |
86 | * Spec section 4.7.3.6 requires register width to be 8. | 86 | * |
87 | * NOTE: | ||
88 | * The ACPI spec requires the reset register width to be 8, so we | ||
89 | * hardcode it here and ignore the FADT value. This maintains | ||
90 | * compatibility with other ACPI implementations that have allowed | ||
91 | * BIOS code with bad register width values to go unnoticed. | ||
87 | */ | 92 | */ |
88 | status = | 93 | status = |
89 | acpi_os_write_port((acpi_io_address) reset_reg->address, | 94 | acpi_os_write_port((acpi_io_address) reset_reg->address, |
90 | acpi_gbl_FADT.reset_value, 8); | 95 | acpi_gbl_FADT.reset_value, |
96 | ACPI_RESET_REGISTER_WIDTH); | ||
91 | } else { | 97 | } else { |
92 | /* Write the reset value to the reset register */ | 98 | /* Write the reset value to the reset register */ |
93 | 99 | ||
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index fed5af2bcb93..63909d9c2f7a 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
@@ -349,6 +349,7 @@ typedef u32 acpi_physical_address; | |||
349 | #define ACPI_PM1_REGISTER_WIDTH 16 | 349 | #define ACPI_PM1_REGISTER_WIDTH 16 |
350 | #define ACPI_PM2_REGISTER_WIDTH 8 | 350 | #define ACPI_PM2_REGISTER_WIDTH 8 |
351 | #define ACPI_PM_TIMER_WIDTH 32 | 351 | #define ACPI_PM_TIMER_WIDTH 32 |
352 | #define ACPI_RESET_REGISTER_WIDTH 8 | ||
352 | 353 | ||
353 | /* Names within the namespace are 4 bytes long */ | 354 | /* Names within the namespace are 4 bytes long */ |
354 | 355 | ||