From nobody Wed Dec 25 03:21:16 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1511345280890632.0314725455771; Wed, 22 Nov 2017 02:08:00 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 8452C220C161C; Wed, 22 Nov 2017 02:03:36 -0800 (PST) Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) (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 55CDC220C1600 for ; Wed, 22 Nov 2017 02:03:34 -0800 (PST) Received: by mail-wm0-x241.google.com with SMTP id l188so7315852wma.1 for ; Wed, 22 Nov 2017 02:07:50 -0800 (PST) Received: from localhost.localdomain ([154.145.25.106]) by smtp.gmail.com with ESMTPSA id i192sm2761457wmf.46.2017.11.22.02.07.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Nov 2017 02:07:48 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::241; helo=mail-wm0-x241.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org 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=fdFwKTgdxEvMIHZYz0Fu19cFQUyZ8VcIqedyLDlmr8g=; b=kN0ISdKY5wyG2Sz9s2jlQKxyAtya6oOOtPfvPyr7lUY6HxV1nOGXbjx0rkGsZv/6oY bXjmy1fCUARySdJeiCWxpEKEGRYxB0i2RWWrDvXuy35la5l7B7Tz/KljYNA6i52W73bj uKoYeU4rvMqdIGwyKwjG0Rt2SShql1GlbnNZI= 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=fdFwKTgdxEvMIHZYz0Fu19cFQUyZ8VcIqedyLDlmr8g=; b=ZsIe0kcXN/O84RH6fLvdWLufxpFvUttePWss2QY49rM80zD5BgTvcaWXXCo88KpZcx fZ5Ri2HQHf6FIiNeLrnYaL7RKjab0p5IaQ0vZOoYHITtADUTomTa+lQ4fHgZvrqJeAuH SfGiyHbYYfm5aXljsAxcUEUQzw6Y4OKqWRTFZkYnb73mit6+2MCTLGs+XKbb1R/ouSen +WmoLdT9Bd/yOYgHFMFdL/VQgOGWFQe1ngUIKsxRfwI5lmWqEaeOj3oI3unJ8NwL2RPa H7b9hsFg+iWxbQKh32sXp5U/0jB12skJlDb6ZnA+cX3n1qbSbt/h6qwqTbmjIdwTYkgt ZY1A== X-Gm-Message-State: AJaThX5zq/k5A6onrf7hyourAlJHb2ZrQL6aWvbNcxOl7S/RYURqLlC5 QwlMGbt0Cz9ahjJssCjw15wNBOb1V9w= X-Google-Smtp-Source: AGs4zMZwwZBlzyFEu3URPNspegpm9Vl9s5W+JdyMeDX1fpM5cWYYO7UtqCS2XSc6tIj3ImV1c9IuWQ== X-Received: by 10.28.211.213 with SMTP id k204mr3311007wmg.68.1511345268996; Wed, 22 Nov 2017 02:07:48 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org, lersek@redhat.com Date: Wed, 22 Nov 2017 10:07:23 +0000 Message-Id: <20171122100731.24525-7-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171122100731.24525-1-ard.biesheuvel@linaro.org> References: <20171122100731.24525-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH v2 06/14] ArmVirtPkg/PrePi: remove ArmPlatformStackLib dependency X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" ArmPlatformStackLib has hooks into primary/secondary core PCDs and other ArmPlatformLib related junk, so let's simply set the stack pointer directly. This is trivial given that our PrePi is unicore only. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel Acked-by: Laszlo Ersek --- ArmVirtPkg/ArmVirt.dsc.inc | 1 - ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S | 14 ++------------ ArmVirtPkg/PrePi/Arm/ModuleEntryPoint.S | 14 ++------------ ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf | 1 - 4 files changed, 4 insertions(+), 26 deletions(-) diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc index 50eb8675d1c0..5d7edff104b5 100644 --- a/ArmVirtPkg/ArmVirt.dsc.inc +++ b/ArmVirtPkg/ArmVirt.dsc.inc @@ -93,7 +93,6 @@ [LibraryClasses.common] ArmDisassemblerLib|ArmPkg/Library/ArmDisassemblerLib/ArmDisassemblerLib.= inf ArmGicLib|ArmPkg/Drivers/ArmGic/ArmGicLib.inf ArmGicArchLib|ArmVirtPkg/Library/ArmVirtGicArchLib/ArmVirtGicArchLib.inf - ArmPlatformStackLib|ArmPlatformPkg/Library/ArmPlatformStackLib/ArmPlatfo= rmStackLib.inf ArmSmcLib|ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf ArmHvcLib|ArmPkg/Library/ArmHvcLib/ArmHvcLib.inf ArmGenericTimerCounterLib|ArmPkg/Library/ArmGenericTimerVirtCounterLib/A= rmGenericTimerVirtCounterLib.inf diff --git a/ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S b/ArmVirtPkg/PrePi= /AArch64/ModuleEntryPoint.S index 3296aedfe9aa..891cf1fcab40 100644 --- a/ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S +++ b/ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S @@ -111,22 +111,12 @@ _GetBaseUefiMemory: =20 _GetStackBase: // r1 =3D The top of the Mpcore Stacks + mov sp, x1 + // Stack for the primary core =3D PrimaryCoreStack MOV32 (x2, FixedPcdGet32(PcdCPUCorePrimaryStackSize)) sub x22, x1, x2 =20 - // Stack for the secondary core =3D Number of Cores - 1 - MOV32 (x1, (FixedPcdGet32(PcdCoreCount) - 1) * FixedPcdGet32(PcdCPUCoreS= econdaryStackSize)) - sub x22, x22, x1 - - // x22 =3D The base of the MpCore Stacks (primary stack & secondary stac= ks) - mov x0, x22 - mov x1, x20 - //ArmPlatformStackSet(StackBase, MpId, PrimaryStackSize, SecondaryStackS= ize) - MOV32 (x2, FixedPcdGet32(PcdCPUCorePrimaryStackSize)) - MOV32 (x3, FixedPcdGet32(PcdCPUCoreSecondaryStackSize)) - bl ASM_PFX(ArmPlatformStackSet) - mov x0, x20 mov x1, x21 mov x2, x22 diff --git a/ArmVirtPkg/PrePi/Arm/ModuleEntryPoint.S b/ArmVirtPkg/PrePi/Arm= /ModuleEntryPoint.S index a918c191432e..ced08593e9de 100644 --- a/ArmVirtPkg/PrePi/Arm/ModuleEntryPoint.S +++ b/ArmVirtPkg/PrePi/Arm/ModuleEntryPoint.S @@ -120,22 +120,12 @@ _GetBaseUefiMemory: =20 _GetStackBase: // r1 =3D The top of the Mpcore Stacks + mov sp, r1 + // Stack for the primary core =3D PrimaryCoreStack MOV32 (r2, FixedPcdGet32(PcdCPUCorePrimaryStackSize)) sub r9, r1, r2 =20 - // Stack for the secondary core =3D Number of Cores - 1 - MOV32 (r1, (FixedPcdGet32(PcdCoreCount) - 1) * FixedPcdGet32(PcdCPUCoreS= econdaryStackSize)) - sub r9, r9, r1 - - // r9 =3D The base of the MpCore Stacks (primary stack & secondary stack= s) - mov r0, r9 - mov r1, r10 - //ArmPlatformStackSet(StackBase, MpId, PrimaryStackSize, SecondaryStackS= ize) - MOV32 (r2, FixedPcdGet32(PcdCPUCorePrimaryStackSize)) - MOV32 (r3, FixedPcdGet32(PcdCPUCoreSecondaryStackSize)) - bl ASM_PFX(ArmPlatformStackSet) - mov r0, r10 mov r1, r11 mov r2, r9 diff --git a/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf b/ArmVirtP= kg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf index e816e9583da8..ae9a088c7256 100755 --- a/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf +++ b/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf @@ -54,7 +54,6 @@ [LibraryClasses] LzmaDecompressLib PeCoffGetEntryPointLib PrePiLib - ArmPlatformStackLib MemoryAllocationLib HobLib PrePiHobListPointerLib --=20 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel