From patchwork Wed Feb 22 09:38:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 94302 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp830087qgi; Wed, 22 Feb 2017 01:38:35 -0800 (PST) X-Received: by 10.99.210.81 with SMTP id t17mr40097592pgi.95.1487756315285; Wed, 22 Feb 2017 01:38:35 -0800 (PST) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id f21si749861pgg.271.2017.02.22.01.38.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Feb 2017 01:38:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 8944E82248; Wed, 22 Feb 2017 01:38:34 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-wr0-x230.google.com (mail-wr0-x230.google.com [IPv6:2a00:1450:400c:c0c::230]) (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 900CF82247 for ; Wed, 22 Feb 2017 01:38:33 -0800 (PST) Received: by mail-wr0-x230.google.com with SMTP id 89so4119529wrr.3 for ; Wed, 22 Feb 2017 01:38:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=j6Bqr71ACfrh7Gt9Os6p9ytfAaqp+QXZOZ2fBsBezgU=; b=VO8u5KZSggDbQ0+CSxtirdaD7uyjAFY7EC6+n8JVwzi6ykL+Nr414Y7XaBTnt4hh7A bcFbrsGdAHKSnomMATEJ7FJj8963cg1uF0knezXukfGlwTJ4Kvw6JENfTFtW6nhC+P/f Su9dZ0cGe0tdLaimgIr4uYobweIAen43bmAz0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=j6Bqr71ACfrh7Gt9Os6p9ytfAaqp+QXZOZ2fBsBezgU=; b=B9t+NHXS8g8JL5WfWzSXR/bG9ck9A3hA/Pfzeg9V7iaR6J8IJ+RskWz3nLxJvyqQ70 8QJzFW4dzIywpY6av26T3XzqJgB9bq9x+CtoQohmuJU43n0XYzov6R7tFQBI57MYZLa/ FLUay1pefsFWeqgQDpkUwukNy7945JpD95Qsm+ouDoCTrb8K0klQ3ojFxawDiPn+ITZj 007+kEvSzuEEYEVZW/FbtYl2pVI8zlUujlDO9+2QFsNrUii1+iZxeZZ4p+Qt+c7pYKHG KWpq84K4Skh40Bn8WOdQrksku1E1/sHDI9Klti6EOAYIpxu+UJbIvtKQcScRAMF4wCjX V9xg== X-Gm-Message-State: AMke39kmOIat61e5Eu5K0xJni+93asPRQtsoChB6KpYU7rMmwK4w1cNck16PRm2kaZ0rXsla X-Received: by 10.223.139.213 with SMTP id w21mr24108939wra.108.1487756312170; Wed, 22 Feb 2017 01:38:32 -0800 (PST) Received: from localhost.localdomain ([160.163.32.105]) by smtp.gmail.com with ESMTPSA id c36sm976544wrc.49.2017.02.22.01.38.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 22 Feb 2017 01:38:31 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org Date: Wed, 22 Feb 2017 09:38:19 +0000 Message-Id: <1487756301-15646-3-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1487756301-15646-1-git-send-email-ard.biesheuvel@linaro.org> References: <1487756301-15646-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH 2/4] ArmPkg/ArmLib: AARCH64: set frame pointer in cache maintenance routine 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: , Cc: heyi.guo@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Stack and unstack the frame pointer according to the AAPCS in AArch64AllDataCachesOperation (). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- ArmPkg/Library/ArmLib/AArch64/AArch64Support.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Leif Lindholm diff --git a/ArmPkg/Library/ArmLib/AArch64/AArch64Support.S b/ArmPkg/Library/ArmLib/AArch64/AArch64Support.S index 5cee7c1519c3..c35c05fdf681 100644 --- a/ArmPkg/Library/ArmLib/AArch64/AArch64Support.S +++ b/ArmPkg/Library/ArmLib/AArch64/AArch64Support.S @@ -273,7 +273,7 @@ ASM_FUNC(ArmDisableBranchPrediction) ASM_FUNC(AArch64AllDataCachesOperation) // We can use regs 0-7 and 9-15 without having to save/restore. // Save our link register on the stack. - The stack must always be quad-word aligned - str x30, [sp, #-16]! + stp x29, x30, [sp, #-16]! mov x1, x0 // Save Function call in x1 mrs x6, clidr_el1 // Read EL1 CLIDR and x3, x6, #0x7000000 // Mask out all but Level of Coherency (LoC) @@ -324,7 +324,7 @@ L_Skip: L_Finished: dsb sy isb - ldr x30, [sp], #0x10 + ldp x29, x30, [sp], #0x10 ret