From: "Bret Barkelew" <bret@corthon.com>
To: devel@edk2.groups.io
Cc: Leif Lindholm <leif@nuviainc.com>,
Ard Biesheuvel <ardb+tianocore@kernel.org>,
Sean Brogan <sean.brogan@microsoft.com>
Subject: [PATCH v3 02/14] ArmPkg/ArmMmuStandaloneMmLib: Update to match ArmMmuLib
Date: Wed, 10 Nov 2021 16:24:04 -0800 [thread overview]
Message-ID: <20211111002416.1770-3-brbarkel@microsoft.com> (raw)
In-Reply-To: <20211111002416.1770-1-brbarkel@microsoft.com>
From: Bret Barkelew <brbarkel@microsoft.com>
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=3647
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Signed-off-by: Bret Barkelew <bret.barkelew@microsoft.com>
Reviewed-by: Leif Lindholm <leif@nuviainc.com>
---
ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.c | 67 ++++++++++++++++++++
ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf | 2 +-
2 files changed, 68 insertions(+), 1 deletion(-)
diff --git a/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.c b/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.c
index 20f873e6802c..dde623f8ec69 100644
--- a/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.c
+++ b/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.c
@@ -325,3 +325,70 @@ ArmClearMemoryRegionReadOnly (
}
return Status;
}
+
+/**
+ Placeholder function to fulfill API.
+
+ @param [in] MemoryTable
+ @param [out] TranslationTableBase
+ @param [out] TranslationTableSize
+
+ @retval EFI_UNSUPPORTED This function is not implemented by the
+ callee.
+
+**/
+EFI_STATUS
+EFIAPI
+ArmConfigureMmu (
+ IN ARM_MEMORY_REGION_DESCRIPTOR *MemoryTable,
+ OUT VOID **TranslationTableBase OPTIONAL,
+ OUT UINTN *TranslationTableSize OPTIONAL
+ )
+{
+ DEBUG ((DEBUG_ERROR, "%a() interface not implemented!\n", __FUNCTION__));
+ ASSERT (FALSE);
+ return EFI_UNSUPPORTED;
+}
+
+/**
+ Placeholder function to fulfill API.
+
+ @param [in] Entry
+ @param [in] Value
+ @param [in] RegionStart
+
+**/
+VOID
+EFIAPI
+ArmReplaceLiveTranslationEntry (
+ IN UINT64 *Entry,
+ IN UINT64 Value,
+ IN UINT64 RegionStart
+ )
+{
+ DEBUG ((DEBUG_ERROR, "%a() interface not implemented!\n", __FUNCTION__));
+ ASSERT (FALSE);
+}
+
+/**
+ Placeholder function to fulfill API.
+
+ @param [in] BaseAddress
+ @param [in] Length
+ @param [in] Attributes
+
+ @retval EFI_UNSUPPORTED This function is not implemented by the
+ callee.
+
+**/
+EFI_STATUS
+ArmSetMemoryAttributes (
+ IN EFI_PHYSICAL_ADDRESS BaseAddress,
+ IN UINT64 Length,
+ IN UINT64 Attributes
+ )
+{
+ DEBUG ((DEBUG_ERROR, "%a() interface not implemented!\n", __FUNCTION__));
+ ASSERT (FALSE);
+ return EFI_UNSUPPORTED;
+}
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 = 44a741c2-655f-41fc-b066-179f5a9aa78a
MODULE_TYPE = MM_CORE_STANDALONE
VERSION_STRING = 1.0
- LIBRARY_CLASS = StandaloneMmMmuLib
+ LIBRARY_CLASS = ArmMmuLib | MM_CORE_STANDALONE MM_STANDALONE
PI_SPECIFICATION_VERSION = 0x00010032
[Sources]
--
2.31.1.windows.1
next prev parent reply other threads:[~2021-11-11 0:24 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-11 0:24 [PATCH v3 00/14] Un-siloing Arm common code Bret Barkelew
2021-11-11 0:24 ` [PATCH v3 01/14] ArmPkg/ArmMmuBaseLib: Disallow STANDALONE_MM Bret Barkelew
2021-11-11 0:24 ` Bret Barkelew [this message]
2021-11-11 0:24 ` [PATCH v3 03/14] ArmPkg/StandaloneMmCoreEntryPoint: Swap to ArmMmuLib Bret Barkelew
2021-11-11 0:24 ` [PATCH v3 04/14] ArmPkg: Disavow StandaloneMmMmuLib. It's just ArmMmuLib Bret Barkelew
2021-11-11 0:24 ` [PATCH v3 05/14] ArmPkg and MdePkg: Move the Arm CompilerIntrinsicsLib to MdePkg Bret Barkelew
2021-11-11 0:24 ` [PATCH v3 06/14] ArmPkg and BaseTools: Move the GccLto binaries from ArmPkg to BaseTools Bret Barkelew
2021-11-11 0:24 ` [PATCH v3 07/14] ArmPkg and MdePkg: Move the AsmMacroIoLib from ArmPkg to MdePkg Bret Barkelew
2021-11-11 0:24 ` [PATCH v3 08/14] MdePkg: Create the MMU access lib to abstract memory protection settings Bret Barkelew
2021-11-11 0:24 ` [PATCH v3 09/14] ArmPkg: Add Basic MMU Lib for Arm silicon Bret Barkelew
2021-11-11 0:24 ` [PATCH v3 10/14] MdeModulePkg: Swap to MmuLib instead of Arm-specific lib Bret Barkelew
2021-11-11 0:24 ` [PATCH v3 11/14] StandaloneMmPkg: Switch to the MmuLib abstraction Bret Barkelew
2021-11-11 0:24 ` [PATCH v3 12/14] ArmPkg: Move the StandaloneMmCpu driver to ArmPkg Bret Barkelew
2021-11-11 0:24 ` [PATCH v3 13/14] StandaloneMmPkg: Add StandaloneMmCoreEntryNull to satisfy CI on all archs Bret Barkelew
2021-11-11 0:24 ` [PATCH v3 14/14] ArmPkg: Create an Arm-specific version of StandaloneMmCoreEntryPoint Bret Barkelew
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211111002416.1770-3-brbarkel@microsoft.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox