Author: cgutman
Date: Sat Mar 13 00:00:18 2010
New Revision: 46154
URL:
http://svn.reactos.org/svn/reactos?rev=46154&view=rev
Log:
- Handle ACPI_RESOURCE_TYPE_ADDRESS16, ACPI_RESOURCE_TYPE_ADDRESS32,
ACPI_RESOURCE_TYPE_ADDRESS64, ACPI_RESOURCE_TYPE_MEMORY24, and ACPI_RESOURCE_TYPE_MEMORY32
for IRP_MN_QUERY_RESOURCES and IRP_MN_QUERY_RESOURCE_REQUIREMENTS
Modified:
trunk/reactos/drivers/bus/acpi/buspdo.c
Modified: trunk/reactos/drivers/bus/acpi/buspdo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/buspdo.c?…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/buspdo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/buspdo.c [iso-8859-1] Sat Mar 13 00:00:18 2010
@@ -633,6 +633,11 @@
NumberOfResources += dma_data->ChannelCount;
break;
}
+ case ACPI_RESOURCE_TYPE_ADDRESS16:
+ case ACPI_RESOURCE_TYPE_ADDRESS32:
+ case ACPI_RESOURCE_TYPE_ADDRESS64:
+ case ACPI_RESOURCE_TYPE_MEMORY24:
+ case ACPI_RESOURCE_TYPE_MEMORY32:
case ACPI_RESOURCE_TYPE_IO:
{
NumberOfResources++;
@@ -725,9 +730,167 @@
ResourceDescriptor->Flags |= CM_RESOURCE_PORT_16_BIT_DECODE;
else
ResourceDescriptor->Flags |= CM_RESOURCE_PORT_10_BIT_DECODE;
- ResourceDescriptor->u.Port.Start.u.HighPart = 0;
- ResourceDescriptor->u.Port.Start.u.LowPart = io_data->Minimum;
+ ResourceDescriptor->u.Port.Start.QuadPart = io_data->Minimum;
ResourceDescriptor->u.Port.Length = io_data->AddressLength;
+
+ ResourceDescriptor++;
+ break;
+ }
+ case ACPI_RESOURCE_TYPE_ADDRESS16:
+ {
+ ACPI_RESOURCE_ADDRESS16 *addr16_data = (ACPI_RESOURCE_ADDRESS16*)
&resource->Data;
+ if (addr16_data->ResourceType == ACPI_BUS_NUMBER_RANGE)
+ {
+ ResourceDescriptor->Type = CmResourceTypeBusNumber;
+ ResourceDescriptor->ShareDisposition = CmResourceShareShared;
+ ResourceDescriptor->Flags = 0;
+ ResourceDescriptor->u.BusNumber.Start = addr16_data->Minimum;
+ ResourceDescriptor->u.BusNumber.Length = addr16_data->AddressLength;
+ }
+ else if (addr16_data->ResourceType == ACPI_IO_RANGE)
+ {
+ ResourceDescriptor->Type = CmResourceTypePort;
+ ResourceDescriptor->ShareDisposition = CmResourceShareDeviceExclusive;
+ ResourceDescriptor->Flags = CM_RESOURCE_PORT_IO;
+ if (addr16_data->Decode == ACPI_POS_DECODE)
+ ResourceDescriptor->Flags |= CM_RESOURCE_PORT_POSITIVE_DECODE;
+ ResourceDescriptor->u.Port.Start.QuadPart = addr16_data->Minimum;
+ ResourceDescriptor->u.Port.Length = addr16_data->AddressLength;
+ }
+ else
+ {
+ ResourceDescriptor->Type = CmResourceTypeMemory;
+ ResourceDescriptor->ShareDisposition = CmResourceShareDeviceExclusive;
+ ResourceDescriptor->Flags = 0;
+ if (addr16_data->Info.Mem.WriteProtect == ACPI_READ_ONLY_MEMORY)
+ ResourceDescriptor->Flags |= CM_RESOURCE_MEMORY_READ_ONLY;
+ else
+ ResourceDescriptor->Flags |= CM_RESOURCE_MEMORY_READ_WRITE;
+ switch (addr16_data->Info.Mem.Caching)
+ {
+ case ACPI_CACHABLE_MEMORY: ResourceDescriptor->Flags |=
CM_RESOURCE_MEMORY_CACHEABLE; break;
+ case ACPI_WRITE_COMBINING_MEMORY: ResourceDescriptor->Flags |=
CM_RESOURCE_MEMORY_COMBINEDWRITE; break;
+ case ACPI_PREFETCHABLE_MEMORY: ResourceDescriptor->Flags |=
CM_RESOURCE_MEMORY_PREFETCHABLE; break;
+ }
+ ResourceDescriptor->u.Memory.Start.QuadPart = addr16_data->Minimum;
+ ResourceDescriptor->u.Memory.Length = addr16_data->AddressLength;
+ }
+ ResourceDescriptor++;
+ break;
+ }
+ case ACPI_RESOURCE_TYPE_ADDRESS32:
+ {
+ ACPI_RESOURCE_ADDRESS32 *addr32_data = (ACPI_RESOURCE_ADDRESS32*)
&resource->Data;
+ if (addr32_data->ResourceType == ACPI_BUS_NUMBER_RANGE)
+ {
+ ResourceDescriptor->Type = CmResourceTypeBusNumber;
+ ResourceDescriptor->ShareDisposition = CmResourceShareShared;
+ ResourceDescriptor->Flags = 0;
+ ResourceDescriptor->u.BusNumber.Start = addr32_data->Minimum;
+ ResourceDescriptor->u.BusNumber.Length = addr32_data->AddressLength;
+ }
+ else if (addr32_data->ResourceType == ACPI_IO_RANGE)
+ {
+ ResourceDescriptor->Type = CmResourceTypePort;
+ ResourceDescriptor->ShareDisposition = CmResourceShareDeviceExclusive;
+ ResourceDescriptor->Flags = CM_RESOURCE_PORT_IO;
+ if (addr32_data->Decode == ACPI_POS_DECODE)
+ ResourceDescriptor->Flags |= CM_RESOURCE_PORT_POSITIVE_DECODE;
+ ResourceDescriptor->u.Port.Start.QuadPart = addr32_data->Minimum;
+ ResourceDescriptor->u.Port.Length = addr32_data->AddressLength;
+ }
+ else
+ {
+ ResourceDescriptor->Type = CmResourceTypeMemory;
+ ResourceDescriptor->ShareDisposition = CmResourceShareDeviceExclusive;
+ ResourceDescriptor->Flags = 0;
+ if (addr32_data->Info.Mem.WriteProtect == ACPI_READ_ONLY_MEMORY)
+ ResourceDescriptor->Flags |= CM_RESOURCE_MEMORY_READ_ONLY;
+ else
+ ResourceDescriptor->Flags |= CM_RESOURCE_MEMORY_READ_WRITE;
+ switch (addr32_data->Info.Mem.Caching)
+ {
+ case ACPI_CACHABLE_MEMORY: ResourceDescriptor->Flags |=
CM_RESOURCE_MEMORY_CACHEABLE; break;
+ case ACPI_WRITE_COMBINING_MEMORY: ResourceDescriptor->Flags |=
CM_RESOURCE_MEMORY_COMBINEDWRITE; break;
+ case ACPI_PREFETCHABLE_MEMORY: ResourceDescriptor->Flags |=
CM_RESOURCE_MEMORY_PREFETCHABLE; break;
+ }
+ ResourceDescriptor->u.Memory.Start.QuadPart = addr32_data->Minimum;
+ ResourceDescriptor->u.Memory.Length = addr32_data->AddressLength;
+ }
+ ResourceDescriptor++;
+ break;
+ }
+ case ACPI_RESOURCE_TYPE_ADDRESS64:
+ {
+ ACPI_RESOURCE_ADDRESS64 *addr64_data = (ACPI_RESOURCE_ADDRESS64*)
&resource->Data;
+ if (addr64_data->ResourceType == ACPI_BUS_NUMBER_RANGE)
+ {
+ DPRINT1("64-bit bus address is not supported!\n");
+ ResourceDescriptor->Type = CmResourceTypeBusNumber;
+ ResourceDescriptor->ShareDisposition = CmResourceShareShared;
+ ResourceDescriptor->Flags = 0;
+ ResourceDescriptor->u.BusNumber.Start = (ULONG)addr64_data->Minimum;
+ ResourceDescriptor->u.BusNumber.Length = addr64_data->AddressLength;
+ }
+ else if (addr64_data->ResourceType == ACPI_IO_RANGE)
+ {
+ ResourceDescriptor->Type = CmResourceTypePort;
+ ResourceDescriptor->ShareDisposition = CmResourceShareDeviceExclusive;
+ ResourceDescriptor->Flags = CM_RESOURCE_PORT_IO;
+ if (addr64_data->Decode == ACPI_POS_DECODE)
+ ResourceDescriptor->Flags |= CM_RESOURCE_PORT_POSITIVE_DECODE;
+ ResourceDescriptor->u.Port.Start.QuadPart = addr64_data->Minimum;
+ ResourceDescriptor->u.Port.Length = addr64_data->AddressLength;
+ }
+ else
+ {
+ ResourceDescriptor->Type = CmResourceTypeMemory;
+ ResourceDescriptor->ShareDisposition = CmResourceShareDeviceExclusive;
+ ResourceDescriptor->Flags = 0;
+ if (addr64_data->Info.Mem.WriteProtect == ACPI_READ_ONLY_MEMORY)
+ ResourceDescriptor->Flags |= CM_RESOURCE_MEMORY_READ_ONLY;
+ else
+ ResourceDescriptor->Flags |= CM_RESOURCE_MEMORY_READ_WRITE;
+ switch (addr64_data->Info.Mem.Caching)
+ {
+ case ACPI_CACHABLE_MEMORY: ResourceDescriptor->Flags |=
CM_RESOURCE_MEMORY_CACHEABLE; break;
+ case ACPI_WRITE_COMBINING_MEMORY: ResourceDescriptor->Flags |=
CM_RESOURCE_MEMORY_COMBINEDWRITE; break;
+ case ACPI_PREFETCHABLE_MEMORY: ResourceDescriptor->Flags |=
CM_RESOURCE_MEMORY_PREFETCHABLE; break;
+ }
+ ResourceDescriptor->u.Memory.Start.QuadPart = addr64_data->Minimum;
+ ResourceDescriptor->u.Memory.Length = addr64_data->AddressLength;
+ }
+ ResourceDescriptor++;
+ break;
+ }
+ case ACPI_RESOURCE_TYPE_MEMORY24:
+ {
+ ACPI_RESOURCE_MEMORY24 *mem24_data = (ACPI_RESOURCE_MEMORY24*)
&resource->Data;
+ ResourceDescriptor->Type = CmResourceTypeMemory;
+ ResourceDescriptor->ShareDisposition = CmResourceShareDeviceExclusive;
+ ResourceDescriptor->Flags = CM_RESOURCE_MEMORY_24;
+ if (mem24_data->WriteProtect == ACPI_READ_ONLY_MEMORY)
+ ResourceDescriptor->Flags |= CM_RESOURCE_MEMORY_READ_ONLY;
+ else
+ ResourceDescriptor->Flags |= CM_RESOURCE_MEMORY_READ_WRITE;
+ ResourceDescriptor->u.Memory.Start.QuadPart = mem24_data->Minimum;
+ ResourceDescriptor->u.Memory.Length = mem24_data->AddressLength;
+
+ ResourceDescriptor++;
+ break;
+ }
+ case ACPI_RESOURCE_TYPE_MEMORY32:
+ {
+ ACPI_RESOURCE_MEMORY32 *mem32_data = (ACPI_RESOURCE_MEMORY32*)
&resource->Data;
+ ResourceDescriptor->Type = CmResourceTypeMemory;
+ ResourceDescriptor->ShareDisposition = CmResourceShareDeviceExclusive;
+ ResourceDescriptor->Flags = 0;
+ if (mem32_data->WriteProtect == ACPI_READ_ONLY_MEMORY)
+ ResourceDescriptor->Flags |= CM_RESOURCE_MEMORY_READ_ONLY;
+ else
+ ResourceDescriptor->Flags |= CM_RESOURCE_MEMORY_READ_WRITE;
+ ResourceDescriptor->u.Memory.Start.QuadPart = mem32_data->Minimum;
+ ResourceDescriptor->u.Memory.Length = mem32_data->AddressLength;
ResourceDescriptor++;
break;
@@ -815,6 +978,11 @@
NumberOfResources += dma_data->ChannelCount;
break;
}
+ case ACPI_RESOURCE_TYPE_ADDRESS16:
+ case ACPI_RESOURCE_TYPE_ADDRESS32:
+ case ACPI_RESOURCE_TYPE_ADDRESS64:
+ case ACPI_RESOURCE_TYPE_MEMORY24:
+ case ACPI_RESOURCE_TYPE_MEMORY32:
case ACPI_RESOURCE_TYPE_IO:
{
NumberOfResources++;
@@ -905,15 +1073,188 @@
RequirementDescriptor->Flags |= CM_RESOURCE_PORT_16_BIT_DECODE;
else
RequirementDescriptor->Flags |= CM_RESOURCE_PORT_10_BIT_DECODE;
-
RequirementDescriptor->u.Port.Length = io_data->AddressLength;
-
RequirementDescriptor->Option = CurrentRes ? 0 : IO_RESOURCE_PREFERRED;
RequirementDescriptor->Type = CmResourceTypePort;
RequirementDescriptor->ShareDisposition = CmResourceShareDriverExclusive;
RequirementDescriptor->u.Port.Alignment = io_data->Alignment;
RequirementDescriptor->u.Port.MinimumAddress.QuadPart = io_data->Minimum;
RequirementDescriptor->u.Port.MaximumAddress.QuadPart = io_data->Maximum;
+
+ RequirementDescriptor++;
+ break;
+ }
+ case ACPI_RESOURCE_TYPE_ADDRESS16:
+ {
+ ACPI_RESOURCE_ADDRESS16 *addr16_data = (ACPI_RESOURCE_ADDRESS16*)
&resource->Data;
+ RequirementDescriptor->Option = CurrentRes ? 0 : IO_RESOURCE_PREFERRED;
+ if (addr16_data->ResourceType == ACPI_BUS_NUMBER_RANGE)
+ {
+ RequirementDescriptor->Type = CmResourceTypeBusNumber;
+ RequirementDescriptor->ShareDisposition = CmResourceShareShared;
+ RequirementDescriptor->Flags = 0;
+ RequirementDescriptor->u.BusNumber.MinBusNumber = addr16_data->Minimum;
+ RequirementDescriptor->u.BusNumber.MaxBusNumber = addr16_data->Maximum;
+ RequirementDescriptor->u.BusNumber.Length = addr16_data->AddressLength;
+ }
+ else if (addr16_data->ResourceType == ACPI_IO_RANGE)
+ {
+ RequirementDescriptor->Type = CmResourceTypePort;
+ RequirementDescriptor->ShareDisposition = CmResourceShareDeviceExclusive;
+ RequirementDescriptor->Flags = CM_RESOURCE_PORT_IO;
+ if (addr16_data->Decode == ACPI_POS_DECODE)
+ RequirementDescriptor->Flags |= CM_RESOURCE_PORT_POSITIVE_DECODE;
+ RequirementDescriptor->u.Port.MinimumAddress.QuadPart = addr16_data->Minimum;
+ RequirementDescriptor->u.Port.MaximumAddress.QuadPart = addr16_data->Maximum;
+ RequirementDescriptor->u.Port.Length = addr16_data->AddressLength;
+ }
+ else
+ {
+ RequirementDescriptor->Type = CmResourceTypeMemory;
+ RequirementDescriptor->ShareDisposition = CmResourceShareDeviceExclusive;
+ RequirementDescriptor->Flags = 0;
+ if (addr16_data->Info.Mem.WriteProtect == ACPI_READ_ONLY_MEMORY)
+ RequirementDescriptor->Flags |= CM_RESOURCE_MEMORY_READ_ONLY;
+ else
+ RequirementDescriptor->Flags |= CM_RESOURCE_MEMORY_READ_WRITE;
+ switch (addr16_data->Info.Mem.Caching)
+ {
+ case ACPI_CACHABLE_MEMORY: RequirementDescriptor->Flags |=
CM_RESOURCE_MEMORY_CACHEABLE; break;
+ case ACPI_WRITE_COMBINING_MEMORY: RequirementDescriptor->Flags |=
CM_RESOURCE_MEMORY_COMBINEDWRITE; break;
+ case ACPI_PREFETCHABLE_MEMORY: RequirementDescriptor->Flags |=
CM_RESOURCE_MEMORY_PREFETCHABLE; break;
+ }
+ RequirementDescriptor->u.Memory.MinimumAddress.QuadPart =
addr16_data->Minimum;
+ RequirementDescriptor->u.Memory.MaximumAddress.QuadPart =
addr16_data->Maximum;
+ RequirementDescriptor->u.Memory.Length = addr16_data->AddressLength;
+ }
+ RequirementDescriptor++;
+ break;
+ }
+ case ACPI_RESOURCE_TYPE_ADDRESS32:
+ {
+ ACPI_RESOURCE_ADDRESS32 *addr32_data = (ACPI_RESOURCE_ADDRESS32*)
&resource->Data;
+ RequirementDescriptor->Option = CurrentRes ? 0 : IO_RESOURCE_PREFERRED;
+ if (addr32_data->ResourceType == ACPI_BUS_NUMBER_RANGE)
+ {
+ RequirementDescriptor->Type = CmResourceTypeBusNumber;
+ RequirementDescriptor->ShareDisposition = CmResourceShareShared;
+ RequirementDescriptor->Flags = 0;
+ RequirementDescriptor->u.BusNumber.MinBusNumber = addr32_data->Minimum;
+ RequirementDescriptor->u.BusNumber.MaxBusNumber = addr32_data->Maximum;
+ RequirementDescriptor->u.BusNumber.Length = addr32_data->AddressLength;
+ }
+ else if (addr32_data->ResourceType == ACPI_IO_RANGE)
+ {
+ RequirementDescriptor->Type = CmResourceTypePort;
+ RequirementDescriptor->ShareDisposition = CmResourceShareDeviceExclusive;
+ RequirementDescriptor->Flags = CM_RESOURCE_PORT_IO;
+ if (addr32_data->Decode == ACPI_POS_DECODE)
+ RequirementDescriptor->Flags |= CM_RESOURCE_PORT_POSITIVE_DECODE;
+ RequirementDescriptor->u.Port.MinimumAddress.QuadPart = addr32_data->Minimum;
+ RequirementDescriptor->u.Port.MaximumAddress.QuadPart = addr32_data->Maximum;
+ RequirementDescriptor->u.Port.Length = addr32_data->AddressLength;
+ }
+ else
+ {
+ RequirementDescriptor->Type = CmResourceTypeMemory;
+ RequirementDescriptor->ShareDisposition = CmResourceShareDeviceExclusive;
+ RequirementDescriptor->Flags = 0;
+ if (addr32_data->Info.Mem.WriteProtect == ACPI_READ_ONLY_MEMORY)
+ RequirementDescriptor->Flags |= CM_RESOURCE_MEMORY_READ_ONLY;
+ else
+ RequirementDescriptor->Flags |= CM_RESOURCE_MEMORY_READ_WRITE;
+ switch (addr32_data->Info.Mem.Caching)
+ {
+ case ACPI_CACHABLE_MEMORY: RequirementDescriptor->Flags |=
CM_RESOURCE_MEMORY_CACHEABLE; break;
+ case ACPI_WRITE_COMBINING_MEMORY: RequirementDescriptor->Flags |=
CM_RESOURCE_MEMORY_COMBINEDWRITE; break;
+ case ACPI_PREFETCHABLE_MEMORY: RequirementDescriptor->Flags |=
CM_RESOURCE_MEMORY_PREFETCHABLE; break;
+ }
+ RequirementDescriptor->u.Memory.MinimumAddress.QuadPart =
addr32_data->Minimum;
+ RequirementDescriptor->u.Memory.MaximumAddress.QuadPart =
addr32_data->Maximum;
+ RequirementDescriptor->u.Memory.Length = addr32_data->AddressLength;
+ }
+ RequirementDescriptor++;
+ break;
+ }
+ case ACPI_RESOURCE_TYPE_ADDRESS64:
+ {
+ ACPI_RESOURCE_ADDRESS64 *addr64_data = (ACPI_RESOURCE_ADDRESS64*)
&resource->Data;
+ RequirementDescriptor->Option = CurrentRes ? 0 : IO_RESOURCE_PREFERRED;
+ if (addr64_data->ResourceType == ACPI_BUS_NUMBER_RANGE)
+ {
+ DPRINT1("64-bit bus address is not supported!\n");
+ RequirementDescriptor->Type = CmResourceTypeBusNumber;
+ RequirementDescriptor->ShareDisposition = CmResourceShareShared;
+ RequirementDescriptor->Flags = 0;
+ RequirementDescriptor->u.BusNumber.MinBusNumber =
(ULONG)addr64_data->Minimum;
+ RequirementDescriptor->u.BusNumber.MaxBusNumber =
(ULONG)addr64_data->Maximum;
+ RequirementDescriptor->u.BusNumber.Length = addr64_data->AddressLength;
+ }
+ else if (addr64_data->ResourceType == ACPI_IO_RANGE)
+ {
+ RequirementDescriptor->Type = CmResourceTypePort;
+ RequirementDescriptor->ShareDisposition = CmResourceShareDeviceExclusive;
+ RequirementDescriptor->Flags = CM_RESOURCE_PORT_IO;
+ if (addr64_data->Decode == ACPI_POS_DECODE)
+ RequirementDescriptor->Flags |= CM_RESOURCE_PORT_POSITIVE_DECODE;
+ RequirementDescriptor->u.Port.MinimumAddress.QuadPart = addr64_data->Minimum;
+ RequirementDescriptor->u.Port.MaximumAddress.QuadPart = addr64_data->Maximum;
+ RequirementDescriptor->u.Port.Length = addr64_data->AddressLength;
+ }
+ else
+ {
+ RequirementDescriptor->Type = CmResourceTypeMemory;
+ RequirementDescriptor->ShareDisposition = CmResourceShareDeviceExclusive;
+ RequirementDescriptor->Flags = 0;
+ if (addr64_data->Info.Mem.WriteProtect == ACPI_READ_ONLY_MEMORY)
+ RequirementDescriptor->Flags |= CM_RESOURCE_MEMORY_READ_ONLY;
+ else
+ RequirementDescriptor->Flags |= CM_RESOURCE_MEMORY_READ_WRITE;
+ switch (addr64_data->Info.Mem.Caching)
+ {
+ case ACPI_CACHABLE_MEMORY: RequirementDescriptor->Flags |=
CM_RESOURCE_MEMORY_CACHEABLE; break;
+ case ACPI_WRITE_COMBINING_MEMORY: RequirementDescriptor->Flags |=
CM_RESOURCE_MEMORY_COMBINEDWRITE; break;
+ case ACPI_PREFETCHABLE_MEMORY: RequirementDescriptor->Flags |=
CM_RESOURCE_MEMORY_PREFETCHABLE; break;
+ }
+ RequirementDescriptor->u.Memory.MinimumAddress.QuadPart =
addr64_data->Minimum;
+ RequirementDescriptor->u.Memory.MaximumAddress.QuadPart =
addr64_data->Maximum;
+ RequirementDescriptor->u.Memory.Length = addr64_data->AddressLength;
+ }
+ RequirementDescriptor++;
+ break;
+ }
+ case ACPI_RESOURCE_TYPE_MEMORY24:
+ {
+ ACPI_RESOURCE_MEMORY24 *mem24_data = (ACPI_RESOURCE_MEMORY24*)
&resource->Data;
+ RequirementDescriptor->Option = CurrentRes ? 0 : IO_RESOURCE_PREFERRED;
+ RequirementDescriptor->Type = CmResourceTypeMemory;
+ RequirementDescriptor->ShareDisposition = CmResourceShareDeviceExclusive;
+ RequirementDescriptor->Flags = CM_RESOURCE_MEMORY_24;
+ if (mem24_data->WriteProtect == ACPI_READ_ONLY_MEMORY)
+ RequirementDescriptor->Flags |= CM_RESOURCE_MEMORY_READ_ONLY;
+ else
+ RequirementDescriptor->Flags |= CM_RESOURCE_MEMORY_READ_WRITE;
+ RequirementDescriptor->u.Memory.MinimumAddress.QuadPart = mem24_data->Minimum;
+ RequirementDescriptor->u.Memory.MaximumAddress.QuadPart = mem24_data->Maximum;
+ RequirementDescriptor->u.Memory.Length = mem24_data->AddressLength;
+
+ RequirementDescriptor++;
+ break;
+ }
+ case ACPI_RESOURCE_TYPE_MEMORY32:
+ {
+ ACPI_RESOURCE_MEMORY32 *mem32_data = (ACPI_RESOURCE_MEMORY32*)
&resource->Data;
+ RequirementDescriptor->Option = CurrentRes ? 0 : IO_RESOURCE_PREFERRED;
+ RequirementDescriptor->Type = CmResourceTypeMemory;
+ RequirementDescriptor->ShareDisposition = CmResourceShareDeviceExclusive;
+ RequirementDescriptor->Flags = 0;
+ if (mem32_data->WriteProtect == ACPI_READ_ONLY_MEMORY)
+ RequirementDescriptor->Flags |= CM_RESOURCE_MEMORY_READ_ONLY;
+ else
+ RequirementDescriptor->Flags |= CM_RESOURCE_MEMORY_READ_WRITE;
+ RequirementDescriptor->u.Memory.MinimumAddress.QuadPart = mem32_data->Minimum;
+ RequirementDescriptor->u.Memory.MaximumAddress.QuadPart = mem32_data->Maximum;
+ RequirementDescriptor->u.Memory.Length = mem32_data->AddressLength;
RequirementDescriptor++;
break;