Reviewed-by: Feng Tian <feng.t...@intel.com> Thanks Feng
-----Original Message----- From: Ni, Ruiyu Sent: Wednesday, February 24, 2016 4:07 PM To: edk2-devel@lists.01.org Cc: Ni, Ruiyu <ruiyu...@intel.com>; Tian, Feng <feng.t...@intel.com>; Fan, Jeff <jeff....@intel.com> Subject: [Patch V2 2/3] MdeModulePkg/PciBus: reorganize case-statement to reduce code lines Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu...@intel.com> Cc: Feng Tian <feng.t...@intel.com> Cc: Jeff Fan <jeff....@intel.com> --- MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c | 34 ++++++++++------------------------ 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c index 020048d..334a6ac 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c @@ -1819,53 +1819,39 @@ PciIoGetBarAttributes ( Descriptor->ResType = ACPI_ADDRESS_SPACE_TYPE_IO; break; - case PciBarTypeMem32: + case PciBarTypePMem32: // - // Mem + // prefechable // - Descriptor->ResType = ACPI_ADDRESS_SPACE_TYPE_MEM; + Descriptor->SpecificFlag = EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_PREFETCHABLE; // - // 32 bit + // Fall through // - Descriptor->AddrSpaceGranularity = 32; - break; - - case PciBarTypePMem32: + case PciBarTypeMem32: // // Mem // Descriptor->ResType = ACPI_ADDRESS_SPACE_TYPE_MEM; // - // prefechable - // - Descriptor->SpecificFlag = 0x6; - // // 32 bit // Descriptor->AddrSpaceGranularity = 32; break; - case PciBarTypeMem64: + case PciBarTypePMem64: // - // Mem + // prefechable // - Descriptor->ResType = ACPI_ADDRESS_SPACE_TYPE_MEM; + Descriptor->SpecificFlag = EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_PREFETCHABLE; // - // 64 bit + // Fall through // - Descriptor->AddrSpaceGranularity = 64; - break; - - case PciBarTypePMem64: + case PciBarTypeMem64: // // Mem // Descriptor->ResType = ACPI_ADDRESS_SPACE_TYPE_MEM; // - // prefechable - // - Descriptor->SpecificFlag = 0x6; - // // 64 bit // Descriptor->AddrSpaceGranularity = 64; -- 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel