]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc
ArmVirtualizationPkg/ArmVirtualizationQemu: add USB keyboard input
[mirror_edk2.git] / ArmPlatformPkg / ArmVirtualizationPkg / ArmVirtualizationQemu.dsc
index 66052f56abec45149007c4dfbb8bc9b64e66290f..d3384a7dc1b355d738cfb1a96a8ee020d5fa0205 100644 (file)
@@ -42,6 +42,7 @@
   # Virtio Support\r
   VirtioLib|OvmfPkg/Library/VirtioLib/VirtioLib.inf\r
   VirtioMmioDeviceLib|OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceLib.inf\r
+  QemuFwCfgLib|ArmPlatformPkg/ArmVirtualizationPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf\r
 \r
   ArmPlatformLib|ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformLib/ArmVirtualizationPlatformLib.inf\r
   ArmPlatformSysConfigLib|ArmPlatformPkg/Library/ArmPlatformSysConfigLibNull/ArmPlatformSysConfigLibNull.inf\r
@@ -51,8 +52,9 @@
 !ifdef INTEL_BDS\r
   CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf\r
   GenericBdsLib|IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf\r
-  PlatformBdsLib|ArmPlatformPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf\r
+  PlatformBdsLib|ArmPlatformPkg/ArmVirtualizationPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf\r
   CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf\r
+  QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf\r
 !endif\r
 \r
 [LibraryClasses.common.UEFI_DRIVER]\r
 ################################################################################\r
 \r
 [PcdsFeatureFlag.common]\r
+  gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderPciTranslation|TRUE\r
+  gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderMmioTranslation|TRUE\r
+\r
   ## If TRUE, Graphics Output Protocol will be installed on virtual handle created by ConsplitterDxe.\r
   #  It could be set FALSE to save size.\r
-  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|FALSE\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE\r
+\r
+  # Activate KVM workaround for now.\r
+  gArmVirtualizationTokenSpaceGuid.PcdKludgeMapPciMmioAsCached|TRUE\r
 \r
 [PcdsFixedAtBuild.common]\r
   gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument|"root=/dev/vda2 console=ttyAMA0 earlycon uefi_debug"\r
   gArmPlatformTokenSpaceGuid.PcdDefaultBootType|0\r
 \r
-  # Use the serial console (ConIn & ConOut) and the Graphic driver (ConOut)\r
-  gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenVt100()"\r
-  gArmPlatformTokenSpaceGuid.PcdDefaultConInPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenVt100()"\r
+  #\r
+  # Use the serial console (ConIn & ConOut), the USB keyboard (ConIn), and the\r
+  # Graphic driver (ConOut).\r
+  #\r
+  # For the PCI VGA device path to work, you must start QEMU with the option\r
+  # '-device VGA,addr=01.0' (see "Pci(0x1,0x0)").\r
+  #\r
+  # For the USB keyboard device path to work, the following QEMU options are\r
+  # needed (see "docs/usb2.txt" and "docs/ich9-ehci-uhci.cfg"):\r
+  #\r
+  # -device ich9-usb-ehci1,multifunction=on,addr=1d.7,id=ehci\r
+  # -device ich9-usb-uhci1,multifunction=on,addr=1d.0,masterbus=ehci.0,firstport=0\r
+  # -device ich9-usb-uhci2,multifunction=on,addr=1d.1,masterbus=ehci.0,firstport=2\r
+  # -device ich9-usb-uhci3,multifunction=on,addr=1d.2,masterbus=ehci.0,firstport=4\r
+  # -device usb-kbd,bus=ehci.0\r
+  #\r
+  # Note the match between addr=1d.7 and Pci(0x1D,0x7).\r
+  #\r
+  gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenVt100();PciRoot(0x0)/Pci(0x1,0x0)/AcpiAdr(0x80010100)"\r
+  gArmPlatformTokenSpaceGuid.PcdDefaultConInPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenVt100();PciRoot(0x0)/Pci(0x1D,0x7)/USB(0x0,0x0)"\r
   gArmPlatformTokenSpaceGuid.PcdPlatformBootTimeOut|3\r
 \r
   #\r
-  # ARM Virtual Architectural Timer\r
+  # ARM Virtual Architectural Timer -- fetch frequency from QEMU (TCG) or KVM\r
   #\r
-  gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|100000000\r
+  gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|0\r
 \r
   #\r
   # NV Storage PCDs. Use base of 0x04000000 for NOR1\r
 \r
 !ifdef INTEL_BDS\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE\r
+  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile|{ 0x83, 0xA5, 0x04, 0x7C, 0x3E, 0x9E, 0x1C, 0x4F, 0xAD, 0x65, 0xE0, 0x52, 0x68, 0xD0, 0xB4, 0xD1 }\r
 !endif\r
 \r
+  #\r
+  # The maximum physical I/O addressability of the processor, set with\r
+  # BuildCpuHob().\r
+  #\r
+  gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize|16\r
+\r
 [PcdsDynamicDefault.common]\r
+  ## If TRUE, OvmfPkg/AcpiPlatformDxe will not wait for PCI\r
+  #  enumeration to complete before installing ACPI tables.\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration|TRUE\r
+\r
   # System Memory Size -- 1 MB initially, actual size will be fetched from DT\r
   gArmTokenSpaceGuid.PcdSystemMemorySize|0x00100000\r
 \r
   ## PL031 RealTimeClock\r
   gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x0\r
 \r
+  gArmPlatformTokenSpaceGuid.PcdPciBusMin|0x0\r
+  gArmPlatformTokenSpaceGuid.PcdPciBusMax|0x0\r
+  gArmPlatformTokenSpaceGuid.PcdPciIoBase|0x0\r
+  gArmPlatformTokenSpaceGuid.PcdPciIoSize|0x0\r
+  gArmPlatformTokenSpaceGuid.PcdPciIoTranslation|0x0\r
+  gArmPlatformTokenSpaceGuid.PcdPciMmio32Base|0x0\r
+  gArmPlatformTokenSpaceGuid.PcdPciMmio32Size|0x0\r
+  gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0x0\r
+\r
   gArmVirtualizationTokenSpaceGuid.PcdArmPsciMethod|0\r
 \r
+  gArmVirtualizationTokenSpaceGuid.PcdFwCfgSelectorAddress|0x0\r
+  gArmVirtualizationTokenSpaceGuid.PcdFwCfgDataAddress|0x0\r
+\r
+  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPlatformBootTimeOut|3\r
+\r
+  #\r
+  # Set video resolution for boot options and for text setup.\r
+  # PlatformDxe can set the former at runtime.\r
+  #\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|800\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|600\r
+  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution|640\r
+  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution|480\r
+\r
 ################################################################################\r
 #\r
 # Components Section - list of all EDK II Modules needed by this Platform\r
   #\r
   MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf\r
   MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf\r
+\r
+  #\r
+  # ACPI Support\r
+  #\r
+  MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf\r
+  OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatformDxe.inf\r
+\r
+  #\r
+  # PCI support\r
+  #\r
+  ArmPlatformPkg/ArmVirtualizationPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf\r
+  MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf\r
+  OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf\r
+\r
+  #\r
+  # Video support\r
+  #\r
+  OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf {\r
+    <LibraryClasses>\r
+      BltLib|OptionRomPkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf\r
+  }\r
+  OvmfPkg/PlatformDxe/Platform.inf\r
+\r
+  #\r
+  # USB Support\r
+  #\r
+  MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf\r
+  MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf\r
+  MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf\r
+  MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf\r