From patchwork Wed Nov 22 10:07:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 119446 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp6489200qgn; Wed, 22 Nov 2017 02:07:50 -0800 (PST) X-Google-Smtp-Source: AGs4zMYmz0DXD3NRxzR27NYM0foLGfY/8can6Y5FEjXCbPu02hKBAxE9UbD2ibDRT6l6H1JQFDxh X-Received: by 10.101.101.216 with SMTP id y24mr14655218pgv.236.1511345270508; Wed, 22 Nov 2017 02:07:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511345270; cv=none; d=google.com; s=arc-20160816; b=yD9CgyF3ZYxJ09yR5g9uKFF74jKp5cibCE4NPqXc1UmjSYLSYUqrESehQBd4FZt+Oa Xz/lr0bAfwRqpSiMnzVwqatxQCoUQ3n1byvYHEROeOclxHiHF3pN+8xCBRKZu7JdR/xp pTbREY7dr6gb5kWCz6ooYJ2r+JPp86WsspAnETfZK3/lK6Zj6MuO49WIFqeQhpY2U4n3 KN/OoGDzO795GISosaqkRRldR7eMZcfGgS2Jcax/4sgR7d/WmnpUDuGOW5fydfY0G/cs 0Xn6rmIKbjr33DjYF4RNDK1s1ICwJISj+dmmdV+UMo0nvW5+gZjgQBWcFJ6g+l/teIQ5 a1NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=D7EkiIxK8jlRG/8xCHIL9dxGl99QCX1nJOT945z88pc=; b=rKskyUxURhCaUJ4DvGTIv37IwukIJBp++5RoLtx2kilyWOtNH3n31VbCZTLEsXoPvE +G7YAWFoLUA0nQ1n20FQ9/uFQph/M+oD0SngJ1wfSUgy7DvbbSqGZgacRFlDr3Mfw2X7 BIwR1y72MTdOywllRWQM1lPGye85UfniUs6TvZMSiu4s4qx0ztax//++IzVtucDvDCwf DpZhs92sNO3gbhenUcsIA/2T1ZqZ2+vaGe0oMMEtWm4OxaEu43tAFBQsoyYM7kcEP3cJ vTGopefheIUUiLs8IquIEeqKs1ZJEVasFWB+AMIM7cvKDkxs/CuFVw4QUtSkSvqykcLA zDjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=bskAeTBV; 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 Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id t12si13186305pgn.395.2017.11.22.02.07.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Nov 2017 02:07:50 -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 header.s=google header.b=bskAeTBV; 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 C951C220C1612; Wed, 22 Nov 2017 02:03:30 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::244; helo=mail-wr0-x244.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x244.google.com (mail-wr0-x244.google.com [IPv6:2a00:1450:400c:c0c::244]) (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 735E2220C1608 for ; Wed, 22 Nov 2017 02:03:29 -0800 (PST) Received: by mail-wr0-x244.google.com with SMTP id z75so12643834wrc.5 for ; Wed, 22 Nov 2017 02:07:45 -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=lTEFpZh+dgctLSe2P5kpl/Bt/gF97hPrX5I6UXrqAjg=; b=bskAeTBVhBzEJ2xVFaaNevvUU+rluJvf1Sy5z3obJVJQwMVUPiT6fAqjaj3NmLJ4ti gjqP56syNfTjKXmWbeZ6cINpIONkNkFI9SS4Qy9uaIfNNMzXt1PAKCqHn313VJ5KpSzh U6GYpChjDhTCrmkkNY2u93n44pFCUz7ikq6NU= 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=lTEFpZh+dgctLSe2P5kpl/Bt/gF97hPrX5I6UXrqAjg=; b=ICH14tjPGRfeIPR9A8+IqMjJUGplbFMmD31nYCfZfK4ota9akTV9FELb6QeR9uOIEu 9KGFJSYP2AE1Q1ha9lirW9gotxs4PGim6PtXw8UtvcQdBfafrTu7zbi50WCn12vQnyWr xFIj/Ua6xxSrkrokGvr9A0an+RpWdKbLrv0SwZ4VTwHsoK8RIdTQxxaY/8ylv0t0xvkU xNtxC0xR2DRZLl/kpTP2Fxdq2JMmja4F+wKhbQ4FO+OCdUMKTvdqQa+Los3Q4J4I6bnY aLPGREegxgXmoLBtuq9MqE/u7zWGaiElwxSUbK6gBlCFy5rUL6jl71AP1BPaNouQy6In 3Hvw== X-Gm-Message-State: AJaThX5cR3RL9v74zMihpNMPZ87hKCsfaj2SpYm4uSa7JKO8EH+MdyCP TU/J8iobuYeYRbGE0qj0kuF/RjgpjcU= X-Received: by 10.223.172.245 with SMTP id o108mr18733698wrc.122.1511345263974; Wed, 22 Nov 2017 02:07:43 -0800 (PST) Received: from localhost.localdomain ([154.145.25.106]) by smtp.gmail.com with ESMTPSA id i192sm2761457wmf.46.2017.11.22.02.07.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Nov 2017 02:07:43 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org, lersek@redhat.com Date: Wed, 22 Nov 2017 10:07:20 +0000 Message-Id: <20171122100731.24525-4-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 03/14] ArmVirtPkg/PrePi: remove bogus primary core check 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 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" QEMU and KVM based ARM/AARCH64 virtual machines only enter UEFI on a single core, so ArmPlatformIsPrimaryCore() always returns true. And even if it didn't, our code does absolutely nothing meaningful based on its return value, so don't bother calling it, and remove another frivolous dependency on ArmPlatformLib. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel Reviewed-by: Laszlo Ersek --- ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S | 7 ------- ArmVirtPkg/PrePi/Arm/ModuleEntryPoint.S | 7 ------- 2 files changed, 14 deletions(-) -- 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S b/ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S index cc8b47e69026..7a9c0c3787cc 100644 --- a/ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S +++ b/ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S @@ -128,13 +128,6 @@ _GetStackBase: MOV32 (x3, FixedPcdGet32(PcdCPUCoreSecondaryStackSize)) bl ASM_PFX(ArmPlatformStackSet) - // Is it the Primary Core ? - mov x0, x10 - bl ASM_PFX(ArmPlatformIsPrimaryCore) - cmp x0, #1 - bne _PrepareArguments - -_PrepareArguments: mov x0, x20 mov x1, x21 mov x2, x22 diff --git a/ArmVirtPkg/PrePi/Arm/ModuleEntryPoint.S b/ArmVirtPkg/PrePi/Arm/ModuleEntryPoint.S index 59028d0a553e..eebf660acdb2 100644 --- a/ArmVirtPkg/PrePi/Arm/ModuleEntryPoint.S +++ b/ArmVirtPkg/PrePi/Arm/ModuleEntryPoint.S @@ -136,13 +136,6 @@ _GetStackBase: MOV32 (r3, FixedPcdGet32(PcdCPUCoreSecondaryStackSize)) bl ASM_PFX(ArmPlatformStackSet) - // Is it the Primary Core ? - mov r0, r10 - bl ASM_PFX(ArmPlatformIsPrimaryCore) - cmp r0, #1 - bne _PrepareArguments - -_PrepareArguments: mov r0, r10 mov r1, r11 mov r2, r9