On 05/14/20 10:40, Sami Mujawar wrote: > Kvmtool is a virtual machine manager that enables hosting > KVM guests. Kvmtool emulates certain devices like serial > port, RTC, etc. essentially providing an emulated platform. > > This patch adds support for kvmtool emulated 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. For such platforms a NULL > implementation of the PCI library has been provided > so that the serial output is available during the > early boot stages. > > On Kvmtool the Serial 16550 UART is not behind PCI, > and therefore makes use of PciLibNull library during > early boot stages. The DXE modules that make use of > PCI functionality explicitly include the library > BasePciLibPciExpress, so that the required PCI > functionality is available. > > 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. > > - 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. > > Signed-off-by: Sami Mujawar <sami.muja...@arm.com> > --- > > Notes: > v2: > - Updates to reflect review comments and support [Sami] > for latest features emulated by kvmtool e.g. CFI. > > v1: > - Add support for Kvmtool emulated platform [Sami] > - Add more justification for platform and [Laszlo] > document platform maintainer. > Ref: https://edk2.groups.io/g/devel/topic/30915279#30693 > > ArmVirtPkg/ArmVirtKvmTool.dsc | 408 ++++++++++++++++++++ > ArmVirtPkg/ArmVirtKvmTool.fdf | 276 +++++++++++++ > 2 files changed, 684 insertions(+)
Acked-by: Laszlo Ersek <ler...@redhat.com> -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59552): https://edk2.groups.io/g/devel/message/59552 Mute This Topic: https://groups.io/mt/74200917/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-