summaryrefslogtreecommitdiffstats
path: root/ArmVirtPkg/ArmVirtKvmTool.dsc
Commit message (Collapse)AuthorAgeFilesLines
* ArmVirtPkg: Consume MdeLibs.dsc.inc for RegisterFilterLibDandan Bi2021-03-311-0/+2
| | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246 MdeLibs.dsc.inc was added for some basic/default library instances provided by MdePkg and RegisterFilterLibNull Library was also added into it as the first version of MdeLibs.dsc.inc. So update platform dsc to consume MdeLibs.dsc.inc for RegisterFilterLibNull which will be consumed by IoLib and BaseLib. Cc: Laszlo Ersek <lersek@redhat.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Leif Lindholm <leif@nuviainc.com> Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org>
* ArmVirtPkg: Refactor with PciHostBridgeUtilityLibJiahui Cen via groups.io2021-01-201-0/+1
| | | | | | | | | | | | | | | | Eliminate currently duplicated code in ArmVirtPkg with the common utility class PciHostBridgeUtilityLib. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3059 Cc: Laszlo Ersek <lersek@redhat.com> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Jiahui Cen <cenjiahui@huawei.com> Signed-off-by: Yubo Miao <miaoyubo@huawei.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20210119011302.10908-3-cenjiahui@huawei.com>
* ArmVirtPkg: Support for kvmtool virtual platformSami Mujawar2020-10-161-0/+321
Kvmtool is a virtual machine manager that enables hosting KVM guests. Kvmtool emulates certain devices like serial port, RTC, etc. essentially providing a virtual platform. This patch adds support for kvmtool virtual platform. Following is a brief description of the firmware implementation choices: - Serial Port: 16550 UART On some platforms the 16550 UART is interfaced using PCI. Therefore, the 16550 Serial port library is dependent on the PCI library. The 16550 UART driver checks the Device ID represented using the PCD gEfiMdeModulePkgTokenSpaceGuid.PcdSerialPciDeviceInfo to determine if the UART is behind PCI. If the Device ID is 0xFF then the serial 16550 UART is not behind PCI. On Kvmtool the Serial 16550 UART is not behind PCI, and therefore a combination of BasePciLibPciExpress and BasePciExpressLib is used to satisfy the PCI library dependency. The PcdSerialPciDeviceInfo is also set to 0xFF to indicate that the Serial 16550 UART is not behind PCI. The PCD PcdSerialUseMmio is also set to TRUE to indicate MMIO accesses are required for the UART registers. Additionally two instances of PlatformHookLibs are provided EarlyFdt16550SerialPortHookLib and Fdt16550SerialPortHookLib to patch the PcdSerialRegisterBase so that BaseSerialPortLib16550 and retrieve the base address of the 16550 UART. - Dependency order for Flash FaultTolerantWriteDxe makes use of PCDs (e.g. PcdFlashNvStorageFtwSpareBase64 etc.), which in case of kvmtool will be evaluated based on the CFI flash base address read from the DT. These variables are populated in the NorFlashPlatformLib loaded by ArmVeNorFlashDxe. This results in a dependency issue with FaultTolerantWriteDxe. To resolve this make the NorFlashPlatformLib as a library dependency for FaultTolerantWriteDxe. - RTC Controller A separate patch updates the MC146818 RTC controller driver to support MMIO accesses. A KvmtoolRtcFdtClientLib has been introduced to extract the base addresses of the RTC controller from the platform device tree and map the RTC register space as Runtime Memory. Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>