ArmVirtPkg: Introduce an ArmPlatformDeviceInfo lib
Introduce an Arm platform device info library that
parses the FDT and extracts the MMIO base address
and the range for the devices present in the FDT.
This is useful for populating the memory map for a
platform. e.g. the Kvmtool memory map is currently
configured such that the address range outside the
DRAM range is considered as peripheral memory.
Although this currently works, starting with the
RMM 1.0 - rel0 specification, it is expected
that the firmware queries the RMM to get the IPA
state for the MMIO address ranges for the devices
to determine if the shared attribute must be set.
If the IPA state is returned as RIPAS device,
the shared attribute must not be set for the
device. Otherwise the shared attribute needs to be
set for the MMIO address range covering the device
as it is emulated by the VMM.
The files in this library are a scaled down version
of the DynamicTablesPkg/Library/FdtHwInfoParserLib
wherein the parsers only parse the device MMIO base
addresses and range. The functionality to parse
other device information e.g. interrupts, etc.
and to populate the Configuration Manager objects
has been removed.
In this patch the initial infrastructure for parsing
the FDT and populating the PLATFROM_DEVICE_INFO
structure is implemented. Subsequent patches shall
introduce the functionality to parse the device
information.
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by:
Sami Mujawar <sami.mujawar@arm.com>
Loading
Please register or sign in to comment