From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x22e.google.com (mail-wm0-x22e.google.com [IPv6:2a00:1450:400c:c09::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 37B8E1A1E2B for ; Wed, 10 Aug 2016 09:56:49 -0700 (PDT) Received: by mail-wm0-x22e.google.com with SMTP id o80so117010392wme.1 for ; Wed, 10 Aug 2016 09:56:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=JWA4Fui0zN/LoZithX3egFpoSECty0Pbeqbf32ple1s=; b=gXUxANaLRh7lkbB8K7AemZuXYwEz9apmcFsUNORqqzriLsKPAQ62yX6fu+vBjeeEXp woGwCpG5QRGflMdATrfH9pLmindZWOwGB0Xeec23P6dSPgTCYg0P1aDnp+G15KwJImmU N6lHHkXIfXj1ODtuAGA4jMnSssb1Yhm3skGwY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=JWA4Fui0zN/LoZithX3egFpoSECty0Pbeqbf32ple1s=; b=QDOsxeeoam8JIIFtA2KjkgCV6Rcg6TkWpSRkMO6Uy3J8xO47pEspt0C+rctvIldv2c 3O/UwskwuciP/MHx/bXb34ksbBrUjytDWP5VVnOXyPcsm2AnT4R8Iq8+cfxmI3yFBep8 f0dvDFXkg4vLVxKc9WHcivReOFuf5E3/5WXzA9qVhe6XK9DQkGEJ2mSBc9QEGARM9UPR shijMkaEnT9nuMSyNWz6gknCz4oJhLwfUoJxFRelceK46CgIGyti96O883d5T+lb3k+S HX6twCl3dInAjUGTpMf/j7FguMYai3Wcoc7nCfbILPsaHbdhzOWv0qQewJKFE+QZN71k DeOA== X-Gm-Message-State: AEkooutRh7bVIRzRcOkWfn3p/bbUFt6XCcahehfUqs4fmYVo4/izFP6SHvZvCdff/J6SH5/y X-Received: by 10.28.184.19 with SMTP id i19mr4106294wmf.43.1470848207796; Wed, 10 Aug 2016 09:56:47 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id bc10sm43895799wjc.32.2016.08.10.09.56.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Aug 2016 09:56:46 -0700 (PDT) Date: Wed, 10 Aug 2016 17:56:45 +0100 From: Leif Lindholm To: Ard Biesheuvel Cc: edk2-devel@lists.01.org, eugene@hp.com, lersek@redhat.com Message-ID: <20160810165644.GK31760@bivouac.eciton.net> References: <1470842282-8415-1-git-send-email-ard.biesheuvel@linaro.org> <1470842282-8415-2-git-send-email-ard.biesheuvel@linaro.org> MIME-Version: 1.0 In-Reply-To: <1470842282-8415-2-git-send-email-ard.biesheuvel@linaro.org> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [PATCH 01/26] ArmLib: remove ArmReplaceLiveTranslationEntry() implementation X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Aug 2016 16:56:49 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Aug 10, 2016 at 05:17:37PM +0200, Ard Biesheuvel wrote: > The function ArmReplaceLiveTranslationEntry() has been moved to > ArmMmuLib, so remove the old implementation from ArmLib. Could you add a statement to this commit message that you're also fixing up the export attributes for the ArmMmuLib version to prepare for the new macros? If you do: Reviewed-by: Leif Lindholm > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel > --- > ArmPkg/Library/ArmLib/AArch64/AArch64Support.S | 60 -------------------- > ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibReplaceEntry.S | 4 ++ > 2 files changed, 4 insertions(+), 60 deletions(-) > > diff --git a/ArmPkg/Library/ArmLib/AArch64/AArch64Support.S b/ArmPkg/Library/ArmLib/AArch64/AArch64Support.S > index 9441f47e30ba..5cef98fd42a0 100644 > --- a/ArmPkg/Library/ArmLib/AArch64/AArch64Support.S > +++ b/ArmPkg/Library/ArmLib/AArch64/AArch64Support.S > @@ -488,64 +488,4 @@ ASM_PFX(ArmReadCurrentEL): > mrs x0, CurrentEL > ret > > - > - .macro __replace_entry, el > - > - // disable the MMU > - mrs x8, sctlr_el\el > - bic x9, x8, #CTRL_M_BIT > - msr sctlr_el\el, x9 > - isb > - > - // write updated entry > - str x1, [x0] > - > - // invalidate again to get rid of stale clean cachelines that may > - // have been filled speculatively since the last invalidate > - dmb sy > - dc ivac, x0 > - > - // flush the TLBs > - .if \el == 1 > - tlbi vmalle1 > - .else > - tlbi alle\el > - .endif > - dsb sy > - > - // re-enable the MMU > - msr sctlr_el\el, x8 > - isb > - .endm > - > -//VOID > -//ArmReplaceLiveTranslationEntry ( > -// IN UINT64 *Entry, > -// IN UINT64 Value > -// ) > -ASM_PFX(ArmReplaceLiveTranslationEntry): > - > - // disable interrupts > - mrs x2, daif > - msr daifset, #0xf > - isb > - > - // clean and invalidate first so that we don't clobber > - // adjacent entries that are dirty in the caches > - dc civac, x0 > - dsb ish > - > - EL1_OR_EL2_OR_EL3(x3) > -1:__replace_entry 1 > - b 4f > -2:__replace_entry 2 > - b 4f > -3:__replace_entry 3 > - > -4:msr daif, x2 > - ret > - > -ASM_PFX(ArmReplaceLiveTranslationEntrySize): > - .long . - ArmReplaceLiveTranslationEntry > - > ASM_FUNCTION_REMOVE_IF_UNREFERENCED > diff --git a/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibReplaceEntry.S b/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibReplaceEntry.S > index 7c5d205d940b..3834da7bfedd 100644 > --- a/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibReplaceEntry.S > +++ b/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibReplaceEntry.S > @@ -14,6 +14,8 @@ > > #include > > +GCC_ASM_EXPORT(ArmReplaceLiveTranslationEntry) > + > .set CTRL_M_BIT, (1 << 0) > > .macro __replace_entry, el > @@ -72,5 +74,7 @@ ASM_PFX(ArmReplaceLiveTranslationEntry): > 4:msr daif, x2 > ret > > +ASM_GLOBAL ASM_PFX(ArmReplaceLiveTranslationEntrySize) > + > ASM_PFX(ArmReplaceLiveTranslationEntrySize): > .long . - ArmReplaceLiveTranslationEntry > -- > 2.7.4 >