[PATCH v2 02/16] ArmPkg/ArmMmuStandaloneMmLib: Update to match ArmMmuLib


Bret Barkelew
 

From: Bret Barkelew <brbarkel@...>

Drop switch from the custom "StandaloneMmMmuLib" class to the
more generic "ArmMmuLib" class and add the missing functions
to fulfill that interface.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3647

Cc: Leif Lindholm <leif@...>
Cc: Ard Biesheuvel <ardb+tianocore@...>
Cc: Sean Brogan <sean.brogan@...>
Signed-off-by: Bret Barkelew <bret.barkelew@...>
---
ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.c | 37 +++++++++=
+++++++++++
ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf | 2 +-
2 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.c b/Ar=
mPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.c
index 20f873e6802c..42216bf40ac7 100644
--- a/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.c
+++ b/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.c
@@ -325,3 +325,40 @@ ArmClearMemoryRegionReadOnly (
}=0D
return Status;=0D
}=0D
+=0D
+EFI_STATUS=0D
+EFIAPI=0D
+ArmConfigureMmu (=0D
+ IN ARM_MEMORY_REGION_DESCRIPTOR *MemoryTable,=0D
+ OUT VOID **TranslationTableBase OPTIONAL,=0D
+ OUT UINTN *TranslationTableSize OPTIONAL=0D
+ )=0D
+{=0D
+ DEBUG ((DEBUG_ERROR, "%a() interface not implemented!\n", __FUNCTION__))=
;=0D
+ ASSERT (FALSE);=0D
+ return EFI_UNSUPPORTED;=0D
+}=0D
+=0D
+VOID=0D
+EFIAPI=0D
+ArmReplaceLiveTranslationEntry (=0D
+ IN UINT64 *Entry,=0D
+ IN UINT64 Value,=0D
+ IN UINT64 RegionStart=0D
+ )=0D
+{=0D
+ DEBUG ((DEBUG_ERROR, "%a() interface not implemented!\n", __FUNCTION__))=
;=0D
+ ASSERT (FALSE);=0D
+}=0D
+=0D
+EFI_STATUS=0D
+ArmSetMemoryAttributes (=0D
+ IN EFI_PHYSICAL_ADDRESS BaseAddress,=0D
+ IN UINT64 Length,=0D
+ IN UINT64 Attributes=0D
+ )=0D
+{=0D
+ DEBUG ((DEBUG_ERROR, "%a() interface not implemented!\n", __FUNCTION__))=
;=0D
+ ASSERT (FALSE);=0D
+ return EFI_UNSUPPORTED;=0D
+}=0D
diff --git a/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf b/=
ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf
index ff20e5898051..d34086853d32 100644
--- a/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf
+++ b/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf
@@ -13,7 +13,7 @@ [Defines]
FILE_GUID =3D 44a741c2-655f-41fc-b066-179f5a9aa78a=
=0D
MODULE_TYPE =3D MM_CORE_STANDALONE=0D
VERSION_STRING =3D 1.0=0D
- LIBRARY_CLASS =3D StandaloneMmMmuLib=0D
+ LIBRARY_CLASS =3D ArmMmuLib | MM_CORE_STANDALONE MM_STA=
NDALONE=0D
PI_SPECIFICATION_VERSION =3D 0x00010032=0D
=0D
[Sources]=0D
--=20
2.31.1.windows.1

Join devel@edk2.groups.io to automatically receive all group messages.