From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yb1-f182.google.com (mail-yb1-f182.google.com [209.85.219.182]) by mx.groups.io with SMTP id smtpd.web11.1101.1636576806440168608 for ; Wed, 10 Nov 2021 12:40:06 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@corthon-com.20210112.gappssmtp.com header.s=20210112 header.b=Lx8o7V1/; spf=pass (domain: gmail.com, ip: 209.85.219.182, mailfrom: debtech@gmail.com) Received: by mail-yb1-f182.google.com with SMTP id v64so9599803ybi.5 for ; Wed, 10 Nov 2021 12:40:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corthon-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yTFHpX6LdvTBmI4NvacHw6RtjlTppmkWBcWlQX0APEY=; b=Lx8o7V1/Yc14yNsjTJhLzXZDT8JykeLr6H3UtrUAuGQK/y8mmJTXK2BE3CexmQ7v/j 5z9sumk182PcQuZDxR/zMc8KoUakBuHOnuaNYYRRah5+serfJtMVTJ19LMCXohzx9umg XUFDp+y5m3Th5Erh4jBUyBp6ydUr2CijI+sCyeRmu243bmrq1rTyHE8WwClkQ7nzhXYC FLvVRx81L8loOkAG4EwkjGRKkJ7UefabRa5bR0bWi5eH+9gA+iu9/AZCaNMOXnRISoph PvNtK8/k5DiiJdINSMjiOcor9hc/6YRkrQ9rorBe7DiyMg2sCt8/JKKlMjTGMzAjHeK2 j6VA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yTFHpX6LdvTBmI4NvacHw6RtjlTppmkWBcWlQX0APEY=; b=Q/H39RbhO0USd7R2w+8UfKm7San2x+WjFLyTwaOG/pUnItzw+h4+IGdSwYEGucJsxa UgPc4fg88EUmSjqYel7nvGReliLKjU9oGrjx/G468jvrMAZRRHfxvsXw0/fyyDJ03wBZ 4Bnla8b4y2TvXESDbv9Rh0WPUjAYwDY7chPeljqBaYyJ7mxfkSsEdvRZ6ysFzo3H7b2j 1qhs3ulQBZ5ad2laX8llWxwa3u2/hLunQFhnpu7lQvgVdEqwdIvM6hDdgMvadKULLtE1 LdBMrFvHiJfH+ZwhaV8wZ9ODuxzurT59OcW0vR7DuV6a3B8MyVKBZb5/g97NWdCwelO3 boSA== X-Gm-Message-State: AOAM532T77fOrRqbzxNfmgLQf9rV9D4aUQLwgE+bow+loEQXsA5FAsIx nmEfTYERpiwiQ56dXucFQi/Bqq4JAoAAU+Qjjc4= X-Google-Smtp-Source: ABdhPJz1TJ5AxwEldsnhjjPWhQSQJ9RMupiVelced8v4bCj1TeOoV0JfJJoaXwF/stp/pnujecI8e72GSIFRUot8K+A= X-Received: by 2002:a5b:381:: with SMTP id k1mr2314297ybp.271.1636576805626; Wed, 10 Nov 2021 12:40:05 -0800 (PST) MIME-Version: 1.0 References: <20211102201748.1963-1-brbarkel@microsoft.com> <20211102201748.1963-12-brbarkel@microsoft.com> <20211104124342.y3wkleuohac67p7a@leviathan> In-Reply-To: <20211104124342.y3wkleuohac67p7a@leviathan> From: "Bret Barkelew" Date: Wed, 10 Nov 2021 12:39:53 -0800 Message-ID: Subject: Re: [PATCH v2 11/16] ArmPkg: Add Basic MMU Lib for Arm silicon To: Leif Lindholm Cc: edk2-devel-groups-io , Ard Biesheuvel , Sean Brogan Content-Type: multipart/alternative; boundary="00000000000025a84d05d0753b55" --00000000000025a84d05d0753b55 Content-Type: text/plain; charset="UTF-8" Will address in next release. On Thu, Nov 4, 2021 at 5:43 AM Leif Lindholm wrote: > On Tue, Nov 02, 2021 at 13:17:43 -0700, brbarkel@microsoft.com wrote: > > From: Sean Brogan > > > > The previously Arm-specific "ArmMmuLib" has been generalized > > as "MmuLib". The Arm implementation of this lib can still use > > the existing library logic to back it. > > > > As such, this implementation is currently just a shim to the > > old library, while enabling higher-level code to be more > > common. > > This commit message still required me to go and cross refecence a few > patches to (I think) understand what's going on. > (not least because it relies on a patch to MdePkg which I wasn't cc:d > on, so hadn't spotted.) > > Correct me if I've got this wrong, but here's my theory: > - 8/16 adds a library class that currently basically amounts to an > unabstracted version of ArmMmuLib, but in MdePkg, minus the Arm > prefixes. > - 9/16 switches MdeModulePkg to use the new MmuLib instead of > ArmMmuLib. > - 10/16 does the same for StandaloneMmPkg. > - 11/16 adds an actual implementation of this library class under > ArmPkg - backed by ArmMmuLib. > > If that's accurate... > > Starting with the commit message - could we reduce the use of passive > voice a bit? Suggestion: > > --- > After adding the abstract MmuLib to MdePkg, add an implementation > backed by the existing ArmMmuLib to ArmPkg. > --- > > While not required functionality-wise, it would also feel more logical > to me to add the arch-specific implementation immediately after the > abstract version rather than a few patches down the set (kees the > reviewer in the same context). > > / > Leif > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3651 > > > > Cc: Leif Lindholm > > Cc: Ard Biesheuvel > > Cc: Sean Brogan > > Signed-off-by: Bret Barkelew > > --- > > ArmPkg/Library/MmuLib/MmuLib.c | 120 ++++++++++++++++++++ > > ArmPkg/ArmPkg.dsc | 1 + > > ArmPkg/Library/MmuLib/BaseMmuLib.inf | 30 +++++ > > 3 files changed, 151 insertions(+) > > > > diff --git a/ArmPkg/Library/MmuLib/MmuLib.c > b/ArmPkg/Library/MmuLib/MmuLib.c > > new file mode 100644 > > index 000000000000..70840c26f489 > > --- /dev/null > > +++ b/ArmPkg/Library/MmuLib/MmuLib.c > > @@ -0,0 +1,120 @@ > > +/** @file > > +This library instance implements a very limited MMU Lib instance > > +for the ARM/AARCH64 architectures. This library shims a common library > > +interface to the ArmPkg defined ArmMmuLib.ib. > > + > > +Copyright (c) Microsoft Corporation. > > +SPDX-License-Identifier: BSD-2-Clause-Patent > > + > > +**/ > > + > > +#include > > +#include > > +#include > > + > > +/** > > + Bitwise sets the memory attributes on a range of memory based on an > attributes mask. > > + > > + @param BaseAddress The start of the range for which to set > attributes. > > + @param Length The length of the range. > > + @param Attributes A bitmask of the attributes to set. See > "Physical memory > > + protection attributes" in UefiSpec.h > > + > > + @return EFI_SUCCESS > > + @return Others > > + > > +**/ > > +EFI_STATUS > > +EFIAPI > > +MmuSetAttributes ( > > + IN EFI_PHYSICAL_ADDRESS BaseAddress, > > + IN UINT64 Length, > > + IN UINT64 Attributes > > + ) > > + { > > + EFI_STATUS Status; > > + > > + Status = EFI_UNSUPPORTED; > > + > > + if (Attributes & EFI_MEMORY_XP) { > > + Status = ArmSetMemoryRegionNoExec (BaseAddress, Length); > > + if (EFI_ERROR(Status)) { > > + DEBUG((DEBUG_ERROR, "%a - Failed to set NX. Status = %r\n", > __FUNCTION__, Status)); > > + } > > + } > > + > > + ASSERT_EFI_ERROR(Status); > > + return Status; > > + } > > + > > + > > +/** > > + Bitwise clears the memory attributes on a range of memory based on an > attributes mask. > > + > > + @param BaseAddress The start of the range for which to > clear attributes. > > + @param Length The length of the range. > > + @param Attributes A bitmask of the attributes to clear. > See "Physical memory > > + protection attributes" in UefiSpec.h > > + > > + @return EFI_SUCCESS > > + @return Others > > + > > +**/ > > +EFI_STATUS > > +EFIAPI > > +MmuClearAttributes ( > > + IN EFI_PHYSICAL_ADDRESS BaseAddress, > > + IN UINT64 Length, > > + IN UINT64 Attributes > > + ) > > + { > > + EFI_STATUS Status; > > + > > + Status = EFI_UNSUPPORTED; > > + > > + if (Attributes & EFI_MEMORY_XP) { > > + Status = ArmClearMemoryRegionNoExec (BaseAddress, Length); > > + if (EFI_ERROR(Status)) { > > + DEBUG((DEBUG_ERROR, "%a - Failed to clear NX. Status = %r\n", > __FUNCTION__, Status)); > > + } > > + } > > + > > + if (Attributes & EFI_MEMORY_RO) { > > + Status = ArmClearMemoryRegionReadOnly(BaseAddress, Length); > > + if (EFI_ERROR(Status)) { > > + DEBUG((DEBUG_ERROR, "%a - Failed to clear RO. Status = %r\n", > __FUNCTION__, Status)); > > + } > > + } > > + > > + ASSERT_EFI_ERROR(Status); > > + return Status; > > + } > > + > > + > > +/** > > + Returns the memory attributes on a range of memory. > > + > > + @param BaseAddress The start of the range for which to set > attributes. > > + @param Attributes A return pointer for the attributes. > > + > > + @return EFI_SUCCESS > > + @return EFI_INVALID_PARAMETER A return pointer is NULL. > > + @return Others > > + > > +**/ > > +EFI_STATUS > > +EFIAPI > > +MmuGetAttributes ( > > + IN EFI_PHYSICAL_ADDRESS BaseAddress, > > + OUT UINT64 *Attributes > > + ) > > + { > > + EFI_STATUS Status; > > + > > + Status = EFI_UNSUPPORTED; > > + > > + DEBUG ((DEBUG_ERROR, "%a() API not implemented\n", __FUNCTION__)); > > + > > + ASSERT_EFI_ERROR(Status); > > + return Status; > > + } > > diff --git a/ArmPkg/ArmPkg.dsc b/ArmPkg/ArmPkg.dsc > > index 06ede068f99d..cbc67daa7696 100644 > > --- a/ArmPkg/ArmPkg.dsc > > +++ b/ArmPkg/ArmPkg.dsc > > @@ -165,3 +165,4 @@ [Components.AARCH64] > > > > [Components.AARCH64, Components.ARM] > > ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf > > + ArmPkg/Library/MmuLib/BaseMmuLib.inf > > diff --git a/ArmPkg/Library/MmuLib/BaseMmuLib.inf > b/ArmPkg/Library/MmuLib/BaseMmuLib.inf > > new file mode 100644 > > index 000000000000..15095abee9c3 > > --- /dev/null > > +++ b/ArmPkg/Library/MmuLib/BaseMmuLib.inf > > @@ -0,0 +1,30 @@ > > +## @file > > +# This library instance implements a very limited MMU Lib instance > > +# for the ARM/AARCH64 architectures. This library shims a common > library > > +# interface to the ArmPkg defined ArmMmuLib. > > +# > > +# Copyright (c) Microsoft Corporation. > > +# > > +# SPDX-License-Identifier: BSD-2-Clause-Patent > > +# > > +## > > + > > +[Defines] > > + INF_VERSION = 0x00010005 > > + BASE_NAME = MmuLib > > + FILE_GUID = 6f2ee9a4-79b3-4b77-9a47-e2bd4b917b75 > > + MODULE_TYPE = BASE > > + VERSION_STRING = 1.0 > > + LIBRARY_CLASS = MmuLib > > + > > +[Sources] > > + MmuLib.c > > + > > +[Packages] > > + MdePkg/MdePkg.dec > > + MdeModulePkg/MdeModulePkg.dec > > + ArmPkg/ArmPkg.dec > > + > > +[LibraryClasses] > > + DebugLib > > + ArmMmuLib > > -- > > 2.31.1.windows.1 > > > --00000000000025a84d05d0753b55 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Will address in next release.

On Thu, Nov 4, 2021 at 5:43 A= M Leif Lindholm <leif@nuviainc.com<= /a>> wrote:
O= n Tue, Nov 02, 2021 at 13:17:43 -0700, brbarkel@microsoft.com wrote:
> From: Sean Brogan <sean.brogan@microsoft.com>
>
> The previously Arm-specific "ArmMmuLib" has been generalized=
> as "MmuLib". The Arm implementation of this lib can still us= e
> the existing library logic to back it.
>
> As such, this implementation is currently just a shim to the
> old library, while enabling higher-level code to be more
> common.

This commit message still required me to go and cross refecence a few
patches to (I think) understand what's going on.
(not least because it relies on a patch to MdePkg which I wasn't cc:d on, so hadn't spotted.)

Correct me if I've got this wrong, but here's my theory:
- 8/16 adds a library class that currently basically amounts to an
=C2=A0 unabstracted version of ArmMmuLib, but in MdePkg, minus the Arm
=C2=A0 prefixes.
- 9/16 switches MdeModulePkg to use the new MmuLib instead of
=C2=A0 ArmMmuLib.
- 10/16 does the same for StandaloneMmPkg.
- 11/16 adds an actual implementation of this library class under
=C2=A0 ArmPkg - backed by ArmMmuLib.

If that's accurate...

Starting with the commit message - could we reduce the use of passive
voice a bit? Suggestion:

---
After adding the abstract MmuLib to MdePkg, add an implementation
backed by the existing ArmMmuLib to ArmPkg.
---

While not required functionality-wise, it would also feel more logical
to me to add the arch-specific implementation immediately after the
abstract version rather than a few patches down the set (kees the
reviewer in the same context).

/
=C2=A0 =C2=A0 Leif

> REF: https://bugzilla.tianocore.org/show_b= ug.cgi?id=3D3651
>
> 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>
> ---
>=C2=A0 ArmPkg/Library/MmuLib/MmuLib.c=C2=A0 =C2=A0 =C2=A0 =C2=A0| 120 += +++++++++++++++++++
>=C2=A0 ArmPkg/ArmPkg.dsc=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 =C2=A01 +
>=C2=A0 ArmPkg/Library/MmuLib/BaseMmuLib.inf |=C2=A0 30 +++++
>=C2=A0 3 files changed, 151 insertions(+)
>
> diff --git a/ArmPkg/Library/MmuLib/MmuLib.c b/ArmPkg/Library/MmuLib/Mm= uLib.c
> new file mode 100644
> index 000000000000..70840c26f489
> --- /dev/null
> +++ b/ArmPkg/Library/MmuLib/MmuLib.c
> @@ -0,0 +1,120 @@
> +/** @file
> +This library instance implements a very limited MMU Lib instance
> +for the ARM/AARCH64 architectures.=C2=A0 This library shims a common = library
> +interface to the ArmPkg defined ArmMmuLib.ib.
> +
> +Copyright (c) Microsoft Corporation.
> +SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#include <Library/ArmMmuLib.h>
> +#include <Library/DebugLib.h>
> +#include <Library/MmuLib.h>
> +
> +/**
> +=C2=A0 Bitwise sets the memory attributes on a range of memory based = on an attributes mask.
> +
> +=C2=A0 @param=C2=A0 BaseAddress=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0The start of the range for which to set attributes.
> +=C2=A0 @param=C2=A0 Length=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 The length of the range.
> +=C2=A0 @param=C2=A0 Attributes=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 A bitmask of the attributes to set. See "Physical memory
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 protection attributes" in U= efiSpec.h
> +
> +=C2=A0 @return EFI_SUCCESS
> +=C2=A0 @return Others
> +
> +**/
> +EFI_STATUS
> +EFIAPI
> +MmuSetAttributes (
> +=C2=A0 IN=C2=A0 EFI_PHYSICAL_ADDRESS=C2=A0 =C2=A0 =C2=A0 BaseAddress,=
> +=C2=A0 IN=C2=A0 UINT64=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 Length,
> +=C2=A0 IN=C2=A0 UINT64=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 Attributes
> +=C2=A0 )
> +=C2=A0 {
> +=C2=A0 =C2=A0 EFI_STATUS Status;
> +
> +=C2=A0 =C2=A0 Status =3D EFI_UNSUPPORTED;
> +
> +=C2=A0 =C2=A0 if (Attributes & EFI_MEMORY_XP) {
> +=C2=A0 =C2=A0 =C2=A0 Status =3D ArmSetMemoryRegionNoExec (BaseAddress= , Length);
> +=C2=A0 =C2=A0 =C2=A0 if (EFI_ERROR(Status)) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 DEBUG((DEBUG_ERROR, "%a - Failed to = set NX.=C2=A0 Status =3D %r\n", __FUNCTION__, Status));
> +=C2=A0 =C2=A0 =C2=A0 }
> +=C2=A0 =C2=A0 }
> +
> +=C2=A0 =C2=A0 ASSERT_EFI_ERROR(Status);
> +=C2=A0 =C2=A0 return Status;
> +=C2=A0 }
> +
> +
> +/**
> +=C2=A0 Bitwise clears the memory attributes on a range of memory base= d on an attributes mask.
> +
> +=C2=A0 @param=C2=A0 BaseAddress=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0The start of the range for which to clear attributes.
> +=C2=A0 @param=C2=A0 Length=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 The length of the range.
> +=C2=A0 @param=C2=A0 Attributes=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 A bitmask of the attributes to clear. See "Physical memory
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 protection attributes" in U= efiSpec.h
> +
> +=C2=A0 @return EFI_SUCCESS
> +=C2=A0 @return Others
> +
> +**/
> +EFI_STATUS
> +EFIAPI
> +MmuClearAttributes (
> +=C2=A0 IN=C2=A0 EFI_PHYSICAL_ADDRESS=C2=A0 =C2=A0 =C2=A0 BaseAddress,=
> +=C2=A0 IN=C2=A0 UINT64=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 Length,
> +=C2=A0 IN=C2=A0 UINT64=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 Attributes
> +=C2=A0 )
> +=C2=A0 {
> +=C2=A0 =C2=A0 EFI_STATUS Status;
> +
> +=C2=A0 =C2=A0 Status =3D EFI_UNSUPPORTED;
> +
> +=C2=A0 =C2=A0 if (Attributes & EFI_MEMORY_XP) {
> +=C2=A0 =C2=A0 =C2=A0 Status =3D ArmClearMemoryRegionNoExec (BaseAddre= ss, Length);
> +=C2=A0 =C2=A0 =C2=A0 if (EFI_ERROR(Status)) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 DEBUG((DEBUG_ERROR, "%a - Failed to = clear NX.=C2=A0 Status =3D %r\n", __FUNCTION__, Status));
> +=C2=A0 =C2=A0 =C2=A0 }
> +=C2=A0 =C2=A0 }
> +
> +=C2=A0 =C2=A0 if (Attributes & EFI_MEMORY_RO) {
> +=C2=A0 =C2=A0 =C2=A0 Status =3D ArmClearMemoryRegionReadOnly(BaseAddr= ess, Length);
> +=C2=A0 =C2=A0 =C2=A0 if (EFI_ERROR(Status)) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 DEBUG((DEBUG_ERROR, "%a - Failed to = clear RO.=C2=A0 Status =3D %r\n", __FUNCTION__, Status));
> +=C2=A0 =C2=A0 =C2=A0 }
> +=C2=A0 =C2=A0 }
> +
> +=C2=A0 =C2=A0 ASSERT_EFI_ERROR(Status);
> +=C2=A0 =C2=A0 return Status;
> +=C2=A0 }
> +
> +
> +/**
> +=C2=A0 Returns the memory attributes on a range of memory.
> +
> +=C2=A0 @param=C2=A0 BaseAddress=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0The start of the range for which to set attributes.
> +=C2=A0 @param=C2=A0 Attributes=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 A return pointer for the attributes.
> +
> +=C2=A0 @return EFI_SUCCESS
> +=C2=A0 @return EFI_INVALID_PARAMETER=C2=A0 =C2=A0A return pointer is = NULL.
> +=C2=A0 @return Others
> +
> +**/
> +EFI_STATUS
> +EFIAPI
> +MmuGetAttributes (
> +=C2=A0 IN=C2=A0 EFI_PHYSICAL_ADDRESS=C2=A0 =C2=A0 =C2=A0 BaseAddress,=
> +=C2=A0 OUT UINT64=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 *Attributes
> +=C2=A0 )
> +=C2=A0 {
> +=C2=A0 =C2=A0 EFI_STATUS Status;
> +
> +=C2=A0 =C2=A0 Status =3D EFI_UNSUPPORTED;
> +
> +=C2=A0 =C2=A0 DEBUG ((DEBUG_ERROR, "%a() API not implemented\n&q= uot;, __FUNCTION__));
> +
> +=C2=A0 =C2=A0 ASSERT_EFI_ERROR(Status);
> +=C2=A0 =C2=A0 return Status;
> +=C2=A0 }
> diff --git a/ArmPkg/ArmPkg.dsc b/ArmPkg/ArmPkg.dsc
> index 06ede068f99d..cbc67daa7696 100644
> --- a/ArmPkg/ArmPkg.dsc
> +++ b/ArmPkg/ArmPkg.dsc
> @@ -165,3 +165,4 @@ [Components.AARCH64]
>=C2=A0
>=C2=A0 [Components.AARCH64, Components.ARM]
>=C2=A0 =C2=A0 ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.i= nf
> +=C2=A0 ArmPkg/Library/MmuLib/BaseMmuLib.inf
> diff --git a/ArmPkg/Library/MmuLib/BaseMmuLib.inf b/ArmPkg/Library/Mmu= Lib/BaseMmuLib.inf
> new file mode 100644
> index 000000000000..15095abee9c3
> --- /dev/null
> +++ b/ArmPkg/Library/MmuLib/BaseMmuLib.inf
> @@ -0,0 +1,30 @@
> +## @file
> +# This library instance implements a very limited MMU Lib instance > +# for the ARM/AARCH64 architectures.=C2=A0 This library shims a commo= n library
> +# interface to the ArmPkg defined ArmMmuLib.
> +#
> +# Copyright (c) Microsoft Corporation.
> +#
> +# SPDX-License-Identifier: BSD-2-Clause-Patent
> +#
> +##
> +
> +[Defines]
> +=C2=A0 INF_VERSION=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =3D 0x00010005
> +=C2=A0 BASE_NAME=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =3D MmuLib
> +=C2=A0 FILE_GUID=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =3D 6f2ee9a4-79b3-4b77-9a47-e2bd4b917b75
> +=C2=A0 MODULE_TYPE=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =3D BASE
> +=C2=A0 VERSION_STRING=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0=3D 1.0
> +=C2=A0 LIBRARY_CLASS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =3D MmuLib
> +
> +[Sources]
> +=C2=A0 MmuLib.c
> +
> +[Packages]
> +=C2=A0 MdePkg/MdePkg.dec
> +=C2=A0 MdeModulePkg/MdeModulePkg.dec
> +=C2=A0 ArmPkg/ArmPkg.dec
> +
> +[LibraryClasses]
> +=C2=A0 DebugLib
> +=C2=A0 ArmMmuLib
> --
> 2.31.1.windows.1
>
--00000000000025a84d05d0753b55--