From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x231.google.com (mail-wm0-x231.google.com [IPv6:2a00:1450:400c:c09::231]) (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 CFE661A1E47 for ; Wed, 10 Aug 2016 08:18:25 -0700 (PDT) Received: by mail-wm0-x231.google.com with SMTP id f65so96800531wmi.0 for ; Wed, 10 Aug 2016 08:18:25 -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=89PplE3QkH4u0YW/WzvThy8r2/eow2e4kuwC+zx5n0c=; b=L4olZR4av1x5vDGhR7PZrpjPomzpBoPMLn33Gz1yi2KlkEgeWr4tNyIxOqNF0HQ6jW NpubbxbyRbrs3Tpe/e7KmqWjG0LFVghd1QF5q4yEcPGXJsYYiGB2QINZJWawzo7B3li8 vNyN+9K7pE/fJ9byBAQYrW3aaDNxYw30V+4PY= 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=89PplE3QkH4u0YW/WzvThy8r2/eow2e4kuwC+zx5n0c=; b=ETu8KzVi4JeTNK1TT9Jc4x1ELl9cGNC2W0y3ccnz5duHGqZ3HXPpAESSQg6v1F4Dzx Ip1doupcjR1hv73FAAdlMeRgPXvlZGiW6+IwKtLnAEncHM/eQNBso4OmqhDAi5OK2TDV dQDMgy24A0eQJleB+IhgCyjNqeZv2uPTJMkc51qon/9Ew8qzKp17oIs1t85yT6zKYash 8OUENVMXHSl+Ek48We+HE0b2nxa2Pv/TKzo2RaorWo4uasUWt6kQp/MDttDuYC1XFw32 VmfpcctN3Ay/+rl7YiUFY0ApJ6iNjF0NoleoU3zmo+GTWQ4OIp8uMmxxBmpPG+jMmKnH DMGg== X-Gm-Message-State: AEkoouvmzUlIFbR2ytDgG6TwX/RVA27tU5Z23khQuf9VGPCJpggMHhAf00FeFOUAvVEpjS3Z X-Received: by 10.28.183.135 with SMTP id h129mr4181724wmf.2.1470842303988; Wed, 10 Aug 2016 08:18:23 -0700 (PDT) Received: from localhost.localdomain (46.red-81-37-107.dynamicip.rima-tde.net. [81.37.107.46]) by smtp.gmail.com with ESMTPSA id c16sm8908374wme.4.2016.08.10.08.18.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 10 Aug 2016 08:18:23 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org, eugene@hp.com Cc: lersek@redhat.com, Ard Biesheuvel Date: Wed, 10 Aug 2016 17:17:42 +0200 Message-Id: <1470842282-8415-7-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1470842282-8415-1-git-send-email-ard.biesheuvel@linaro.org> References: <1470842282-8415-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [PATCH 06/26] ArmVirt/PrePi: make jump to CEntryPoint relative 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 15:18:26 -0000 The ArmVirtPkg platforms that use PrePi have no notion of boot remapped aliases, so we can simply jump to CEntryPoint() directly rather than via an absolute reference. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S | 7 +------ ArmVirtPkg/PrePi/Arm/ModuleEntryPoint.S | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S b/ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S index d6be34541834..1fed84ed0ac3 100644 --- a/ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S +++ b/ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S @@ -27,7 +27,6 @@ GCC_ASM_IMPORT(ArmPlatformStackSet) GCC_ASM_EXPORT(_ModuleEntryPoint) ASM_GLOBAL ASM_PFX(mSystemMemoryEnd) -StartupAddr: .8byte ASM_PFX(CEntryPoint) ASM_PFX(mSystemMemoryEnd): .8byte 0 ASM_PFX(_ModuleEntryPoint): @@ -163,15 +162,11 @@ _PrepareArguments: mov x1, x21 mov x2, x22 - // Move sec startup address into a data register - // Ensure we're jumping to FV version of the code (not boot remapped alias) - ldr x4, StartupAddr - // Jump to PrePiCore C code // x0 = MpId // x1 = UefiMemoryBase // x2 = StacksBase - blr x4 + bl ASM_PFX(CEntryPoint) _NeverReturn: b _NeverReturn diff --git a/ArmVirtPkg/PrePi/Arm/ModuleEntryPoint.S b/ArmVirtPkg/PrePi/Arm/ModuleEntryPoint.S index 3215c7d55876..a0176af91c8f 100644 --- a/ArmVirtPkg/PrePi/Arm/ModuleEntryPoint.S +++ b/ArmVirtPkg/PrePi/Arm/ModuleEntryPoint.S @@ -27,7 +27,6 @@ GCC_ASM_IMPORT(ArmPlatformStackSet) GCC_ASM_EXPORT(_ModuleEntryPoint) ASM_GLOBAL ASM_PFX(mSystemMemoryEnd) -StartupAddr: .long ASM_PFX(CEntryPoint) ASM_PFX(mSystemMemoryEnd): .quad 0 __relocs: @@ -182,15 +181,11 @@ _PrepareArguments: mov r1, r11 mov r2, r9 - // Move sec startup address into a data register - // Ensure we're jumping to FV version of the code (not boot remapped alias) - ldr r4, StartupAddr - // Jump to PrePiCore C code // r0 = MpId // r1 = UefiMemoryBase // r2 = StacksBase - blx r4 + bl ASM_PFX(CEntryPoint) _NeverReturn: b _NeverReturn -- 2.7.4