- Handle ACPI_RESOURCE_TYPE_ADDRESS16, ACPI_RESOURCE_TYPE_ADDRESS32, ACPI_RESOURCE_T...
authorCameron Gutman <aicommander@gmail.com>
Fri, 12 Mar 2010 23:00:18 +0000 (23:00 +0000)
committerCameron Gutman <aicommander@gmail.com>
Fri, 12 Mar 2010 23:00:18 +0000 (23:00 +0000)
svn path=/trunk/; revision=46154

reactos/drivers/bus/acpi/buspdo.c

index eb8f668..4b44eca 100644 (file)
@@ -633,6 +633,11 @@ Bus_PDO_QueryResources(
                                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,13 +730,171 @@ Bus_PDO_QueryResources(
                                        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;
+                       }
                        default:
                        {
                                break;
@@ -815,6 +978,11 @@ Bus_PDO_QueryResourceRequirements(
                                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,9 +1073,7 @@ Bus_PDO_QueryResourceRequirements(
                                        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;
@@ -918,6 +1084,181 @@ Bus_PDO_QueryResourceRequirements(
                                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;
+                       }
                        default:
                        {
                                break;