mirror of https://github.com/acidanthera/audk.git
MdeModulePkg/PciBus: reorganize case-statement to reduce code lines
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
parent
4653749963
commit
e90f51a822
|
@ -1819,6 +1819,14 @@ PciIoGetBarAttributes (
|
|||
Descriptor->ResType = ACPI_ADDRESS_SPACE_TYPE_IO;
|
||||
break;
|
||||
|
||||
case PciBarTypePMem32:
|
||||
//
|
||||
// prefechable
|
||||
//
|
||||
Descriptor->SpecificFlag = EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_PREFETCHABLE;
|
||||
//
|
||||
// Fall through
|
||||
//
|
||||
case PciBarTypeMem32:
|
||||
//
|
||||
// Mem
|
||||
|
@ -1830,21 +1838,14 @@ PciIoGetBarAttributes (
|
|||
Descriptor->AddrSpaceGranularity = 32;
|
||||
break;
|
||||
|
||||
case PciBarTypePMem32:
|
||||
//
|
||||
// Mem
|
||||
//
|
||||
Descriptor->ResType = ACPI_ADDRESS_SPACE_TYPE_MEM;
|
||||
case PciBarTypePMem64:
|
||||
//
|
||||
// prefechable
|
||||
//
|
||||
Descriptor->SpecificFlag = 0x6;
|
||||
Descriptor->SpecificFlag = EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_PREFETCHABLE;
|
||||
//
|
||||
// 32 bit
|
||||
// Fall through
|
||||
//
|
||||
Descriptor->AddrSpaceGranularity = 32;
|
||||
break;
|
||||
|
||||
case PciBarTypeMem64:
|
||||
//
|
||||
// Mem
|
||||
|
@ -1856,21 +1857,6 @@ PciIoGetBarAttributes (
|
|||
Descriptor->AddrSpaceGranularity = 64;
|
||||
break;
|
||||
|
||||
case PciBarTypePMem64:
|
||||
//
|
||||
// Mem
|
||||
//
|
||||
Descriptor->ResType = ACPI_ADDRESS_SPACE_TYPE_MEM;
|
||||
//
|
||||
// prefechable
|
||||
//
|
||||
Descriptor->SpecificFlag = 0x6;
|
||||
//
|
||||
// 64 bit
|
||||
//
|
||||
Descriptor->AddrSpaceGranularity = 64;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue