|
The existing ArmCcaLib instance uses GUID HOBs to read the cached
IsRealm status and Realm IPA width. This does not work during early SEC
execution, where GetHobList() can fail because the HOB list has not yet
been set up.
Split the direct RSI query helpers into common code and add an early
ArmCcaLib instance for SEC and PEI users. The early instance implements
ArmCcaIsRealm() and ArmCcaGetIpaWidth() by querying RSI directly,
without relying on cached HOB data.
Keep the existing ArmCcaLib instance for DXE and later phases, where the
cached HOB values can be used. Also make ArmCcaMemRangeIsProtectedMmio()
return RETURN_UNSUPPORTED when called outside a Realm.
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
|