]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmVirtPkg: remove PcdKludgeMapPciMmioAsCached
authorLaszlo Ersek <lersek@redhat.com>
Thu, 18 Aug 2016 09:51:33 +0000 (11:51 +0200)
committerLaszlo Ersek <lersek@redhat.com>
Thu, 1 Sep 2016 20:56:04 +0000 (22:56 +0200)
In ARM/AARCH64 guests that run on KVM, we can now use virtio-gpu-pci, so
PcdKludgeMapPciMmioAsCached is no longer necessary. Standard VGA continues
to work on TCG without the kludge.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Ref: https://tianocore.acgmultimedia.com/show_bug.cgi?id=66
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
ArmVirtPkg/ArmVirtPkg.dec
ArmVirtPkg/ArmVirtQemu.dsc
ArmVirtPkg/ArmVirtQemuKernel.dsc
ArmVirtPkg/PciHostBridgeDxe/PciHostBridge.c
ArmVirtPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf

index 9f98f28f01e10c4c76f7a5bb2a17a4861a7cda71..a5ec421664450eda2495ede370d2b3501081c50d 100644 (file)
   gArmVirtTokenSpaceGuid.PcdTerminalTypeGuidBuffer|{0x65, 0x60, 0xA6, 0xDF, 0x19, 0xB4, 0xD3, 0x11, 0x9A, 0x2D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D}|VOID*|0x00000007\r
 \r
 [PcdsFeatureFlag]\r
   gArmVirtTokenSpaceGuid.PcdTerminalTypeGuidBuffer|{0x65, 0x60, 0xA6, 0xDF, 0x19, 0xB4, 0xD3, 0x11, 0x9A, 0x2D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D}|VOID*|0x00000007\r
 \r
 [PcdsFeatureFlag]\r
-  #\r
-  # "Map PCI MMIO as Cached"\r
-  #\r
-  # Due to the way Stage1 and Stage2 mappings are combined on Aarch64, and\r
-  # because KVM -- for the time being -- does not try to interfere with the\r
-  # Stage1 mappings, we must not set EFI_MEMORY_UC for emulated PCI MMIO\r
-  # regions.\r
-  #\r
-  # EFI_MEMORY_UC is mapped to Device-nGnRnE, and that Stage1 attribute would\r
-  # direct guest writes to host DRAM immediately, bypassing the cache\r
-  # regardless of Stage2 attributes. However, QEMU's reads of the same range\r
-  # can easily be served from the (stale) CPU cache.\r
-  #\r
-  # Setting this PCD to TRUE will use EFI_MEMORY_WB for mapping PCI MMIO\r
-  # regions, which ensures that guest writes to such regions go through the CPU\r
-  # cache. Strictly speaking this is wrong, but it is needed as a temporary\r
-  # workaround for emulated PCI devices. Setting the PCD to FALSE results in\r
-  # the theoretically correct EFI_MEMORY_UC mapping, and should be the long\r
-  # term choice, especially with assigned devices.\r
-  #\r
-  # The default is to turn off the kludge; DSC's can selectively enable it.\r
-  #\r
-  gArmVirtTokenSpaceGuid.PcdKludgeMapPciMmioAsCached|FALSE|BOOLEAN|0x00000006\r
-\r
   #\r
   # Pure ACPI boot\r
   #\r
   #\r
   # Pure ACPI boot\r
   #\r
index 2d2c653c9e8df1d6b720e0df957dd767aa02c9fa..f8b61402625ace74ca23aa51bc5f62cf09ac2b38 100644 (file)
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE\r
 \r
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE\r
 \r
-  # Activate KVM workaround for now.\r
-  gArmVirtTokenSpaceGuid.PcdKludgeMapPciMmioAsCached|TRUE\r
-\r
 !if $(PURE_ACPI_BOOT_ENABLE) == TRUE\r
   gArmVirtTokenSpaceGuid.PcdPureAcpiBoot|TRUE\r
 !endif\r
 !if $(PURE_ACPI_BOOT_ENABLE) == TRUE\r
   gArmVirtTokenSpaceGuid.PcdPureAcpiBoot|TRUE\r
 !endif\r
index ba262ac919f90d2ca4d8d8f473db2c9107253efb..ea722ddf8ea7ba832a409c1cb4d33f7383e66bc3 100644 (file)
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE\r
 \r
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE\r
 \r
-  # Activate KVM workaround for now.\r
-  gArmVirtTokenSpaceGuid.PcdKludgeMapPciMmioAsCached|TRUE\r
-\r
 [PcdsFixedAtBuild.common]\r
   gArmPlatformTokenSpaceGuid.PcdCoreCount|1\r
 !if $(ARCH) == AARCH64\r
 [PcdsFixedAtBuild.common]\r
   gArmPlatformTokenSpaceGuid.PcdCoreCount|1\r
 !if $(ARCH) == AARCH64\r
index 4b2b6a562a3f4f2f7069cf4241bd85049e850418..5063782bb392b630cd9a004a820ac5bbe005cc9b 100644 (file)
@@ -365,8 +365,7 @@ InitializePciHostBridge (
                   );\r
   ASSERT_EFI_ERROR (Status);\r
 \r
                   );\r
   ASSERT_EFI_ERROR (Status);\r
 \r
-  MmioAttributes = FeaturePcdGet (PcdKludgeMapPciMmioAsCached) ?\r
-                   EFI_MEMORY_WB : EFI_MEMORY_UC;\r
+  MmioAttributes = EFI_MEMORY_UC;\r
 \r
   Status = gDS->AddMemorySpace (\r
                   EfiGcdMemoryTypeMemoryMappedIo,\r
 \r
   Status = gDS->AddMemorySpace (\r
                   EfiGcdMemoryTypeMemoryMappedIo,\r
index 41e134b24b0ef58318a5865f80759f35a74bc921..8c75eda3deb525eab4f4d3f11b15748dd27e7a65 100644 (file)
@@ -56,7 +56,6 @@
   gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress\r
 \r
 [FeaturePcd]\r
   gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress\r
 \r
 [FeaturePcd]\r
-  gArmVirtTokenSpaceGuid.PcdKludgeMapPciMmioAsCached\r
   gArmVirtTokenSpaceGuid.PcdPureAcpiBoot\r
 \r
 [depex]\r
   gArmVirtTokenSpaceGuid.PcdPureAcpiBoot\r
 \r
 [depex]\r