Commit 53a56431 authored by Andy Grover's avatar Andy Grover

ACPI: Support translation attribute (Bjorn Helgaas)

parent f3c365e4
......@@ -130,6 +130,8 @@ acpi_rs_address16_resource (
if (ACPI_IO_RANGE == output_struct->data.address16.resource_type) {
output_struct->data.address16.attribute.io.range_attribute =
(u16) (temp8 & 0x03);
output_struct->data.address16.attribute.io.translation_attribute =
(u16) ((temp8 >> 4) & 0x03);
}
else {
/* BUS_NUMBER_RANGE == Address16.Data->resource_type */
......@@ -328,6 +330,9 @@ acpi_rs_address16_stream (
temp8 = (u8)
(linked_list->data.address16.attribute.io.range_attribute &
0x03);
temp8 |=
(linked_list->data.address16.attribute.io.translation_attribute &
0x03) << 4;
}
*buffer = temp8;
......@@ -516,6 +521,8 @@ acpi_rs_address32_resource (
if (ACPI_IO_RANGE == output_struct->data.address32.resource_type) {
output_struct->data.address32.attribute.io.range_attribute =
(u16) (temp8 & 0x03);
output_struct->data.address32.attribute.io.translation_attribute =
(u16) ((temp8 >> 4) & 0x03);
}
else {
/* BUS_NUMBER_RANGE == output_struct->Data.Address32.resource_type */
......@@ -712,6 +719,9 @@ acpi_rs_address32_stream (
temp8 = (u8)
(linked_list->data.address32.attribute.io.range_attribute &
0x03);
temp8 |=
(linked_list->data.address32.attribute.io.translation_attribute &
0x03) << 4;
}
*buffer = temp8;
......@@ -899,6 +909,8 @@ acpi_rs_address64_resource (
if (ACPI_IO_RANGE == output_struct->data.address64.resource_type) {
output_struct->data.address64.attribute.io.range_attribute =
(u16) (temp8 & 0x03);
output_struct->data.address64.attribute.io.translation_attribute =
(u16) ((temp8 >> 4) & 0x03);
}
else {
/* BUS_NUMBER_RANGE == output_struct->Data.Address64.resource_type */
......@@ -1099,6 +1111,9 @@ acpi_rs_address64_stream (
temp8 = (u8)
(linked_list->data.address64.attribute.io.range_attribute &
0x03);
temp8 |=
(linked_list->data.address64.attribute.io.range_attribute &
0x03) << 4;
}
*buffer = temp8;
......
......@@ -551,6 +551,11 @@ acpi_rs_dump_address16 (
"Invalid range attribute\n");
break;
}
acpi_os_printf (" Type Specific: %s Translation\n",
ACPI_SPARSE_TRANSLATION ==
address16_data->attribute.io.translation_attribute ?
"Sparse" : "Dense");
break;
case ACPI_BUS_NUMBER_RANGE:
......@@ -673,26 +678,31 @@ acpi_rs_dump_address32 (
acpi_os_printf (" Resource Type: Io Range\n");
switch (address32_data->attribute.io.range_attribute) {
case ACPI_NON_ISA_ONLY_RANGES:
acpi_os_printf (" Type Specific: "
"Non-ISA Io Addresses\n");
break;
case ACPI_NON_ISA_ONLY_RANGES:
acpi_os_printf (" Type Specific: "
"Non-ISA Io Addresses\n");
break;
case ACPI_ISA_ONLY_RANGES:
acpi_os_printf (" Type Specific: "
"ISA Io Addresses\n");
break;
case ACPI_ISA_ONLY_RANGES:
acpi_os_printf (" Type Specific: "
"ISA Io Addresses\n");
break;
case ACPI_ENTIRE_RANGE:
acpi_os_printf (" Type Specific: "
"ISA and non-ISA Io Addresses\n");
break;
case ACPI_ENTIRE_RANGE:
acpi_os_printf (" Type Specific: "
"ISA and non-ISA Io Addresses\n");
break;
default:
acpi_os_printf (" Type Specific: "
"Invalid Range attribute");
break;
}
default:
acpi_os_printf (" Type Specific: "
"Invalid Range attribute");
break;
}
acpi_os_printf (" Type Specific: %s Translation\n",
ACPI_SPARSE_TRANSLATION ==
address32_data->attribute.io.translation_attribute ?
"Sparse" : "Dense");
break;
case ACPI_BUS_NUMBER_RANGE:
......@@ -815,26 +825,31 @@ acpi_rs_dump_address64 (
acpi_os_printf (" Resource Type: Io Range\n");
switch (address64_data->attribute.io.range_attribute) {
case ACPI_NON_ISA_ONLY_RANGES:
acpi_os_printf (" Type Specific: "
"Non-ISA Io Addresses\n");
break;
case ACPI_NON_ISA_ONLY_RANGES:
acpi_os_printf (" Type Specific: "
"Non-ISA Io Addresses\n");
break;
case ACPI_ISA_ONLY_RANGES:
acpi_os_printf (" Type Specific: "
"ISA Io Addresses\n");
break;
case ACPI_ISA_ONLY_RANGES:
acpi_os_printf (" Type Specific: "
"ISA Io Addresses\n");
break;
case ACPI_ENTIRE_RANGE:
acpi_os_printf (" Type Specific: "
"ISA and non-ISA Io Addresses\n");
break;
case ACPI_ENTIRE_RANGE:
acpi_os_printf (" Type Specific: "
"ISA and non-ISA Io Addresses\n");
break;
default:
acpi_os_printf (" Type Specific: "
"Invalid Range attribute");
break;
}
default:
acpi_os_printf (" Type Specific: "
"Invalid Range attribute");
break;
}
acpi_os_printf (" Type Specific: %s Translation\n",
ACPI_SPARSE_TRANSLATION ==
address64_data->attribute.io.translation_attribute ?
"Sparse" : "Dense");
break;
case ACPI_BUS_NUMBER_RANGE:
......
......@@ -877,6 +877,8 @@ struct acpi_mem_space_context
#define ACPI_ISA_ONLY_RANGES (u8) 0x02
#define ACPI_ENTIRE_RANGE (ACPI_NON_ISA_ONLY_RANGES | ACPI_ISA_ONLY_RANGES)
#define ACPI_SPARSE_TRANSLATION (u8) 0x03
/*
* IO Port Descriptor Decode
*/
......@@ -1026,7 +1028,7 @@ struct acpi_memory_attribute
struct acpi_io_attribute
{
u16 range_attribute;
u16 reserved;
u16 translation_attribute;
};
struct acpi_bus_attribute
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment