From 31597533ae6cabbb208f81a0efbd46c72d558a70 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Mon, 26 Mar 2012 19:34:53 +0000 Subject: [PATCH] [ACPI] - Add translation code for ACPI_RESOURCE_TYPE_FIXED_IO svn path=/trunk/; revision=56239 --- reactos/drivers/bus/acpi/buspdo.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/reactos/drivers/bus/acpi/buspdo.c b/reactos/drivers/bus/acpi/buspdo.c index 17d467303f1..45f9579d850 100644 --- a/reactos/drivers/bus/acpi/buspdo.c +++ b/reactos/drivers/bus/acpi/buspdo.c @@ -775,6 +775,7 @@ Bus_PDO_QueryResources( case ACPI_RESOURCE_TYPE_MEMORY24: case ACPI_RESOURCE_TYPE_MEMORY32: case ACPI_RESOURCE_TYPE_FIXED_MEMORY32: + case ACPI_RESOURCE_TYPE_FIXED_IO: case ACPI_RESOURCE_TYPE_IO: { NumberOfResources++; @@ -895,6 +896,18 @@ Bus_PDO_QueryResources( ResourceDescriptor++; break; } + case ACPI_RESOURCE_TYPE_FIXED_IO: + { + ACPI_RESOURCE_FIXED_IO *io_data = (ACPI_RESOURCE_FIXED_IO*) &resource->Data; + ResourceDescriptor->Type = CmResourceTypePort; + ResourceDescriptor->ShareDisposition = CmResourceShareDriverExclusive; + ResourceDescriptor->Flags = CM_RESOURCE_PORT_IO; + ResourceDescriptor->u.Port.Start.QuadPart = io_data->Address; + ResourceDescriptor->u.Port.Length = io_data->AddressLength; + + ResourceDescriptor++; + break; + } case ACPI_RESOURCE_TYPE_ADDRESS16: { ACPI_RESOURCE_ADDRESS16 *addr16_data = (ACPI_RESOURCE_ADDRESS16*) &resource->Data; @@ -1236,6 +1249,7 @@ Bus_PDO_QueryResourceRequirements( case ACPI_RESOURCE_TYPE_MEMORY24: case ACPI_RESOURCE_TYPE_MEMORY32: case ACPI_RESOURCE_TYPE_FIXED_MEMORY32: + case ACPI_RESOURCE_TYPE_FIXED_IO: case ACPI_RESOURCE_TYPE_IO: { NumberOfResources++; @@ -1356,6 +1370,21 @@ Bus_PDO_QueryResourceRequirements( RequirementDescriptor++; break; } + case ACPI_RESOURCE_TYPE_FIXED_IO: + { + ACPI_RESOURCE_FIXED_IO *io_data = (ACPI_RESOURCE_FIXED_IO*) &resource->Data; + RequirementDescriptor->Flags = CM_RESOURCE_PORT_IO; + RequirementDescriptor->u.Port.Length = io_data->AddressLength; + RequirementDescriptor->Option = CurrentRes ? 0 : IO_RESOURCE_PREFERRED; + RequirementDescriptor->Type = CmResourceTypePort; + RequirementDescriptor->ShareDisposition = CmResourceShareDriverExclusive; + RequirementDescriptor->u.Port.Alignment = 1; + RequirementDescriptor->u.Port.MinimumAddress.QuadPart = io_data->Address; + RequirementDescriptor->u.Port.MaximumAddress.QuadPart = io_data->Address + io_data->AddressLength - 1; + + RequirementDescriptor++; + break; + } case ACPI_RESOURCE_TYPE_ADDRESS16: { ACPI_RESOURCE_ADDRESS16 *addr16_data = (ACPI_RESOURCE_ADDRESS16*) &resource->Data;