From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Cc: heyi.guo@linaro.org, Ard Biesheuvel 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: [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: , X-List-Received-Date: Wed, 22 Feb 2017 09:38:34 -0000 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(-) 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 -- 2.7.4