From patchwork Thu Mar 17 13:20:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 63996 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp465716lbc; Thu, 17 Mar 2016 06:23:11 -0700 (PDT) X-Received: by 10.98.75.214 with SMTP id d83mr14767482pfj.22.1458220991465; Thu, 17 Mar 2016 06:23:11 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id f5si1690476pat.162.2016.03.17.06.23.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Mar 2016 06:23:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 0E4331A1E42; Thu, 17 Mar 2016 06:23:31 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-wm0-x232.google.com (mail-wm0-x232.google.com [IPv6:2a00:1450:400c:c09::232]) (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 E91011A1E24 for ; Thu, 17 Mar 2016 06:23:29 -0700 (PDT) Received: by mail-wm0-x232.google.com with SMTP id p65so26040717wmp.1 for ; Thu, 17 Mar 2016 06:23:09 -0700 (PDT) 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=9zca8Fa3FnT1+UoBd7Y4qWUtlFT+qF4hAIP6hkkRbM0=; b=HlKotMm+xYWIkt6IxrArn6M0HRC53tyLCgfnVhNiFTQUd4nh0KfijsNwpEREOnnzgU lb4urkRIQ8PvvyMHeJImNm0ihdFlkhXHUg3KeliGK1ejC+0BrbCie0vAtnUABclysZQy ixr9cg9IBwZu6PN0hnHnaNibu6BBqjyXkXT3A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=9zca8Fa3FnT1+UoBd7Y4qWUtlFT+qF4hAIP6hkkRbM0=; b=VDbpIgxc2Hc1Td5PkrJCSYYy4DGs+lE5QV8Su9nMaqRYXEbw9GFm2MuQ9ydUbsel1z RwNHCZ5pnvlcBiDKJ8HSS6cRWIRa6ouFXlAlFVqwEHZt++T8J97LT6CLS/O6JdhXx6r4 HYjX1HuHrAuZ9a/eY7S+7Vq6S0EVz8i9wp7niIiRUo13H7AomjNTOr79VsogIfJmPtYk sC6gWqKatKuk4ootDECJA4BVGszT7+7MAv7qDUXL9jepu2R+ggiGbjKxZoY6RYMVpYUh Lr/r5ojvvN/GbZ9nhyTaz0CoZbFThp3ttSOwiPyQAmtDhS+8vVdd5RX2aJclR+s+1chF c1BQ== X-Gm-Message-State: AD7BkJLx5yelL2hxrE+eQlq9C3BZqe7a3Ue8GgOj6Fz75I/05yyluDEj9zDJtZJdXG/h+k/V X-Received: by 10.28.50.138 with SMTP id y132mr11456361wmy.52.1458220988633; Thu, 17 Mar 2016 06:23:08 -0700 (PDT) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id v5sm30198913wmg.16.2016.03.17.06.22.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 17 Mar 2016 06:23:08 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org, eugene@hp.com Date: Thu, 17 Mar 2016 14:20:14 +0100 Message-Id: <1458220815-6944-7-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1458220815-6944-1-git-send-email-ard.biesheuvel@linaro.org> References: <1458220815-6944-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH 6/7] ArmPkg/ArmExceptionLib: avoid indirect call if using vector table in place X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" If we are using the vector table in place, there is no need to make an indirect call to the common handler routine from the vector table entries, so just use a straight branch instruction in that case. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- ArmPkg/Library/ArmExceptionLib/AArch64/ExceptionSupport.S | 4 ++++ 1 file changed, 4 insertions(+) -- 2.5.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/ArmPkg/Library/ArmExceptionLib/AArch64/ExceptionSupport.S b/ArmPkg/Library/ArmExceptionLib/AArch64/ExceptionSupport.S index c7ea061a93ea..0fd304db2dbf 100644 --- a/ArmPkg/Library/ArmExceptionLib/AArch64/ExceptionSupport.S +++ b/ArmPkg/Library/ArmExceptionLib/AArch64/ExceptionSupport.S @@ -187,9 +187,13 @@ VECTOR_BASE(ExceptionHandlersStart) mov x0, #\val // Jump to our general handler to deal with all the common parts and process the exception. +#if defined(ARM_RELOCATE_VECTORS) ldr x1, =ASM_PFX(CommonExceptionEntry) br x1 .ltorg +#else + b ASM_PFX(CommonExceptionEntry) +#endif .endm //