Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 200397
b: refs/heads/master
c: b681f7d
h: refs/heads/master
i:
  200395: 8b62394
v: v3
  • Loading branch information
Matthew Garrett authored and Len Brown committed Jun 12, 2010
1 parent 7d6f202 commit 4b8872c
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9cbfa18e8a7b34a32eddbd914a07f085962f50a8
refs/heads/master: b681f7d9ab4d697a214fa4428795790c3a937a89
8 changes: 8 additions & 0 deletions trunk/drivers/acpi/acpica/acglobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,14 @@ u8 ACPI_INIT_GLOBAL(acpi_gbl_enable_aml_debug_object, FALSE);
*/
u8 ACPI_INIT_GLOBAL(acpi_gbl_copy_dsdt_locally, FALSE);

/*
* Optionally truncate I/O addresses to 16 bits. Provides compatibility
* with other ACPI implementations. NOTE: During ACPICA initialization,
* this value is set to TRUE if any Windows OSI strings have been
* requested by the BIOS.
*/
u8 ACPI_INIT_GLOBAL(acpi_gbl_truncate_io_addresses, FALSE);

/* acpi_gbl_FADT is a local copy of the FADT, converted to a common format. */

struct acpi_table_fadt acpi_gbl_FADT;
Expand Down
12 changes: 12 additions & 0 deletions trunk/drivers/acpi/acpica/hwvalid.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,12 @@ acpi_status acpi_hw_read_port(acpi_io_address address, u32 *value, u32 width)
u32 one_byte;
u32 i;

/* Truncate address to 16 bits if requested */

if (acpi_gbl_truncate_io_addresses) {
address &= ACPI_UINT16_MAX;
}

/* Validate the entire request and perform the I/O */

status = acpi_hw_validate_io_request(address, width);
Expand Down Expand Up @@ -279,6 +285,12 @@ acpi_status acpi_hw_write_port(acpi_io_address address, u32 value, u32 width)
acpi_status status;
u32 i;

/* Truncate address to 16 bits if requested */

if (acpi_gbl_truncate_io_addresses) {
address &= ACPI_UINT16_MAX;
}

/* Validate the entire request and perform the I/O */

status = acpi_hw_validate_io_request(address, width);
Expand Down
9 changes: 9 additions & 0 deletions trunk/drivers/acpi/acpica/nsinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,15 @@ acpi_status acpi_ns_initialize_devices(void)
acpi_ns_init_one_device, NULL, &info,
NULL);

/*
* Any _OSI requests should be completed by now. If the BIOS has
* requested any Windows OSI strings, we will always truncate
* I/O addresses to 16 bits -- for Windows compatibility.
*/
if (acpi_gbl_osi_data >= ACPI_OSI_WIN_2000) {
acpi_gbl_truncate_io_addresses = TRUE;
}

ACPI_FREE(info.evaluate_info);
if (ACPI_FAILURE(status)) {
goto error_exit;
Expand Down
1 change: 1 addition & 0 deletions trunk/include/acpi/acpixf.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ extern acpi_name acpi_gbl_trace_method_name;
extern u32 acpi_gbl_trace_flags;
extern u8 acpi_gbl_enable_aml_debug_object;
extern u8 acpi_gbl_copy_dsdt_locally;
extern u8 acpi_gbl_truncate_io_addresses;

extern u32 acpi_current_gpe_count;
extern struct acpi_table_fadt acpi_gbl_FADT;
Expand Down

0 comments on commit 4b8872c

Please sign in to comment.