Skip to content
Commit fd99bb90 authored by Sami Mujawar's avatar Sami Mujawar
Browse files

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's avatarSami Mujawar <sami.mujawar@arm.com>
parent 4412414d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment