From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by mx.groups.io with SMTP id smtpd.web11.10848.1636028102668928683 for ; Thu, 04 Nov 2021 05:15:03 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20210112.gappssmtp.com header.s=20210112 header.b=UxKM8kxc; spf=pass (domain: nuviainc.com, ip: 209.85.221.43, mailfrom: leif@nuviainc.com) Received: by mail-wr1-f43.google.com with SMTP id r8so8256996wra.7 for ; Thu, 04 Nov 2021 05:15:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=KtIkiAo7X/kqm1QIqjTQOdR3weTcL0RQ+ImVrmIBpYg=; b=UxKM8kxc1Xd8QhzPBwo6CdWSmvwP/Xz0mtLwLaAfyMHjbezM4kesUsD/HR1hjZfCDi GAAuodsZnES+DcLrMKy1raHLqzJ+ADlDan0tEYWJGJAlO6Ho73jt2Sqy6925EXWStmGK qCN6ovxRkm6dHNg312A0c1A07hi0htB7L4611ElXjGwiWsPtn8WvJMDZz8VKWWwnKXyq wvyPvWV/G9rsIcHJ2D9rojgPRnTBDpRr5Ljngpxgr519D662Va9oUnVkPF0vGJtBsLbN m4OY5s7ixfpbEkHjGyP27U5KL5oZb0eboC3g0h6wwo7CJN76OEkLz3mpgFbRbAgtc9eG k+bQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=KtIkiAo7X/kqm1QIqjTQOdR3weTcL0RQ+ImVrmIBpYg=; b=KtGIhmGTyUHqW3BrEHkqH37OaOVITvd5gb1QiX+09E79vxey97xBXwd5W8ksrGM7Qr VMqTsD4u2yxeSqX+vK6kFXZwVaN7ErN0VY4WSSnVaQJCFsjkEYVjmpw5T8v+YzVArG8B nN+6CemrEPIixg9IxwrjFUZqsKKVfSnalc5CEwRwdPHM0Q0kxQcAKIR5T6VSewV+YslH 730ropucaFMkkpUOI76icbXFuTopZJtz1boyM8OQZbd11oNoG2YdYeK4WMhY9Xtfa/vZ 4E3nrJ46p9mzMLR+glaZPBIeqPQJR5pSif451gwZ+3GtjcDNerOOxqQfKfHzlh3Dbooi nsLA== X-Gm-Message-State: AOAM533092Rf8XkRGJUZrVzK56POUkD2zxigM3ITcC/UEUA688ylBfuH /LP7pNNgxBdYCtNiPli3gTUY1w== X-Google-Smtp-Source: ABdhPJxwv+ncatf3eXWVAOYkh3lQ1PGcyGuJAVeL39eY1BPo/HaFGHmxOdtm5D6KY8F0Mdde5Ij6QQ== X-Received: by 2002:adf:f20f:: with SMTP id p15mr60312299wro.187.1636028101271; Thu, 04 Nov 2021 05:15:01 -0700 (PDT) Return-Path: Received: from leviathan (cpc92314-cmbg19-2-0-cust559.5-4.cable.virginm.net. [82.11.186.48]) by smtp.gmail.com with ESMTPSA id t11sm4879946wrz.97.2021.11.04.05.15.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Nov 2021 05:15:00 -0700 (PDT) Date: Thu, 4 Nov 2021 12:14:59 +0000 From: "Leif Lindholm" To: "brbarkel@microsoft.com" Cc: devel@edk2.groups.io, Ard Biesheuvel , Sean Brogan Subject: Re: [PATCH v2 02/16] ArmPkg/ArmMmuStandaloneMmLib: Update to match ArmMmuLib Message-ID: <20211104121459.7fihyud4iqexqxix@leviathan> References: <20211102201748.1963-1-brbarkel@microsoft.com> <20211102201748.1963-3-brbarkel@microsoft.com> MIME-Version: 1.0 In-Reply-To: <20211102201748.1963-3-brbarkel@microsoft.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Nov 02, 2021 at 13:17:34 -0700, brbarkel@microsoft.com wrote: > 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=3647 > > Cc: Leif Lindholm > Cc: Ard Biesheuvel > Cc: Sean Brogan > Signed-off-by: Bret Barkelew Reviewed-by: Leif Lindholm > --- > 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/ArmPkg/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 ( > } > return Status; > } > + > +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; > +} > + > +VOID > +EFIAPI > +ArmReplaceLiveTranslationEntry ( > + IN UINT64 *Entry, > + IN UINT64 Value, > + IN UINT64 RegionStart > + ) > +{ > + DEBUG ((DEBUG_ERROR, "%a() interface not implemented!\n", __FUNCTION__)); > + ASSERT (FALSE); > +} > + > +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 >