From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by mx.groups.io with SMTP id smtpd.web08.4013.1636590284537974835 for ; Wed, 10 Nov 2021 16:24:44 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@corthon-com.20210112.gappssmtp.com header.s=20210112 header.b=c9frPzve; spf=none, err=permanent DNS error (domain: corthon.com, ip: 209.85.210.171, mailfrom: bret@corthon.com) Received: by mail-pf1-f171.google.com with SMTP id m26so4086738pff.3 for ; Wed, 10 Nov 2021 16:24:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corthon-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ft6ib0hi+Xhmam9XgqM0IPjiDbjYaglfHV98++ReF6I=; b=c9frPzveod1+oDjblCf9Sv4KBlMB4gXL+K34p3agahyO9N4Z8gD6/CVSrxXjvixHCu hTqlt95mjlQprv5MTpjWfpGYEsQLIxhiYw0JL/PT55bNFof+V+GE7C0Z8Z2ijJOV9QKl ySLxtGfP1RY87VEawCPUdBUyZZ4Nr31L9yjmtESzlIq0eIzWX+LWQGJt/ZzODxVJj2He dd00rIOH0FITftmGQVWu+T/ugRFu1LK9u8B5QR/Rc4aXAQpeu75K3EsP57EtblRNqp5Y vPmhMDMnAWpghQ7v1YRVtRD++YVneqdxiLBL4s/ouKabIasC8GJrTGjNHwf0hT8TPgjD D9YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ft6ib0hi+Xhmam9XgqM0IPjiDbjYaglfHV98++ReF6I=; b=hMxx2Pbici4Z/2knBohMeOOu2Ncs6oS4yG0h3l2FtZ8vkseFMv/Z9qRJnyB3DSiCfT iodi0CZhc30Wyk+zGkd+nLG7UQuqGTDal9Fn7uWffwyC9YZAFsaYpSRAq4FFAr2C+4Ii llyVFru8MTCggXDlHN5U6wg0nPPj4HGkGwahQrr64TF/KkbW58qI5JFCY4FpWydtIDx2 uX38vklNwEwWvtSi2sSwiQySl6HPKs7DXXxKR/xN1oEpXRNkT6WdPHZTrekdHOKFgRKZ ssF47EvmDI+mDBafmrhJ/7N3/vxk/e7Uht2g0u7Nb3uMUZBPWqC0/H4TBwVaVdA5Ba7q S+jg== X-Gm-Message-State: AOAM530n9TtJ6NViKVQdp8VfABjDoWPsusJqlKLYIi8nui3Pi2kWf41H HuVErC3KHhyxGfkTZbbL60RizfE+0UdARmFk X-Google-Smtp-Source: ABdhPJzsVd/6484I2MrwCf5IVveo4l8GkgLnf8PFtCW5yVH7tjEVN4LzxQIDG8Im1cENk1+Nx3m+2A== X-Received: by 2002:a63:86c8:: with SMTP id x191mr684922pgd.390.1636590283835; Wed, 10 Nov 2021 16:24:43 -0800 (PST) Return-Path: Received: from localhost.localdomain (174-21-94-94.tukw.qwest.net. [174.21.94.94]) by smtp.gmail.com with ESMTPSA id e14sm838890pfv.18.2021.11.10.16.24.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Nov 2021 16:24:43 -0800 (PST) From: "Bret Barkelew" X-Google-Original-From: "brbarkel@microsoft.com" To: devel@edk2.groups.io Cc: Leif Lindholm , Ard Biesheuvel , Sean Brogan Subject: [PATCH v3 02/14] ArmPkg/ArmMmuStandaloneMmLib: Update to match ArmMmuLib Date: Wed, 10 Nov 2021 16:24:04 -0800 Message-Id: <20211111002416.1770-3-brbarkel@microsoft.com> X-Mailer: git-send-email 2.31.1.windows.1 In-Reply-To: <20211111002416.1770-1-brbarkel@microsoft.com> References: <20211111002416.1770-1-brbarkel@microsoft.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Bret Barkelew 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 Cc: Ard Biesheuvel Cc: Sean Brogan Signed-off-by: Bret Barkelew Reviewed-by: Leif Lindholm --- 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/Ar= mPkg/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 ( }=0D return Status;=0D }=0D +=0D +/**=0D + Placeholder function to fulfill API.=0D +=0D + @param [in] MemoryTable=0D + @param [out] TranslationTableBase=0D + @param [out] TranslationTableSize=0D +=0D + @retval EFI_UNSUPPORTED This function is not implemented by the= =0D + callee.=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 +/**=0D + Placeholder function to fulfill API.=0D +=0D + @param [in] Entry=0D + @param [in] Value=0D + @param [in] RegionStart=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 +/**=0D + Placeholder function to fulfill API.=0D +=0D + @param [in] BaseAddress=0D + @param [in] Length=0D + @param [in] Attributes=0D +=0D + @retval EFI_UNSUPPORTED This function is not implemented by the= =0D + callee.=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