/* Set up a descriptor entry for reserving MMIO space. */
STATIC VOID SetMmioPadding(IN OUT EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *Descriptor, IN BOOLEAN Prefetchable, IN BOOLEAN ThirtyTwoBitOnly, IN UINTN SizeExponent)
/* Set up a descriptor entry for reserving MMIO space. */
STATIC VOID SetMmioPadding(IN OUT EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *Descriptor, IN BOOLEAN Prefetchable, IN BOOLEAN ThirtyTwoBitOnly, IN UINTN SizeExponent)
{
  Descriptor->ResType = ACPI_ADDRESS_SPACE_TYPE_MEM;
  if (Prefetchable) {
    Descriptor->SpecificFlag =
      EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_PREFETCHABLE;
    Descriptor->AddrSpaceGranularity = ThirtyTwoBitOnly ? 32 : 64;
  } else {
    Descriptor->SpecificFlag =
      EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_NON_CACHEABLE;
    Descriptor->AddrSpaceGranularity = 32;
  }
  Descriptor->AddrLen      = LShiftU64 (1, SizeExponent);
  Descriptor->AddrRangeMax = Descriptor->AddrLen - 1;
}