From patchwork Fri Nov 17 16:09:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 119176 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp703180qgn; Fri, 17 Nov 2017 08:09:35 -0800 (PST) X-Google-Smtp-Source: AGs4zMZx/9kh4qKF2OlzFCGR4LgzDKwGXklKFdOY0wzNIM5T22Fpd8e2wl6Rr02EbRdaoZmJsP+o X-Received: by 10.84.235.8 with SMTP id o8mr2276689plk.354.1510934975790; Fri, 17 Nov 2017 08:09:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510934975; cv=none; d=google.com; s=arc-20160816; b=NSP/NPiLDjWtXw3RJcFb0N47/0w59S6GbF7SctdP036fKViPvaLr+QuO47+sr2DDUx PbEZUEdPZytuAPolHB/coXapkT9tNLanRiQaHqROjQ2A3EULOXnT2LFl7HtXSL4cKtT0 S9lJzN7GcdzlMaXSsHwOmLRVmh4mBVX9nhHZfmuKRNiCVfzdyn/a1Fb4iB/P0DJaSRyl Y6UrtbrrtwkSUqVQnvmeLab+pUhQgWO0ZxzrxlWZDeH0WFpXAczercFKYMB60oJ8U0NO 6LL6KrVFnP8R1D41hPQWz5dSjnQ7w79r7eveNpb2GU0YJ2ZCilHXVircG7rcsmEafP5e 75eQ== 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=MxFQUVFA1dnUkdxB1XmcN3DsrvntSZZOUrViUFq93ho=; b=mLPeXSSDf4IFlGsNMT5XQedlhZs4C7zVzAf5PEqK1RK8Uh68jK1HjJck7QQuLhHtYJ emAXD5h5+7KD8iI84tKi3/49O2m0qK77inTUZ96IaR8NDe92BslQtlme2VCpLLwDMXf0 HoH/49370eevmKJpzLjKh6gMCVvJ0NuF9Y0YH+xK47JCkPZ+thXEKwGE/6b1cgLeRtcY uD2uDux6dMbHvqo5T2q0dz03t2umF6yYD/Bo/HwDrce1RCgkQDOdjsSvBJUSZN4A+VkW e8pbpkUs1rlGXLOw1/K9jM4q91/iy/0H4hLNM6H8EHCexYSRtumNiRbqMMrtLKpFknmy FgXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Elga6eon; 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 f29si3272109pfj.387.2017.11.17.08.09.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Nov 2017 08:09:35 -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=Elga6eon; 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 7C33321B00DEB; Fri, 17 Nov 2017 08:05:21 -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:c09::241; helo=mail-wm0-x241.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org 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 B2BFA2035BB1C for ; Fri, 17 Nov 2017 08:05:19 -0800 (PST) Received: by mail-wm0-x241.google.com with SMTP id g130so3957053wme.0 for ; Fri, 17 Nov 2017 08:09:30 -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=fmr6hK/LcgcK41uLIDdd13QraJfHkDsodJP7FpJYPe4=; b=Elga6eon/xYbu/q3Rnap8PhQgu6AyNzjQYqJQdgG2edQrNTwMXRUA2KrK04kdl6UfI quACD9efYd9B1uFls8DNh2ILkmzfCtt0SJ5fgHXbdeRzSuwRxBQG47bYI/3J8YhZuGzG VcY5Z9KrOdzMlhiuKljPQ7lkDf79zZ2++6HUM= 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=fmr6hK/LcgcK41uLIDdd13QraJfHkDsodJP7FpJYPe4=; b=RIEBDjrMcSv6mbNaVH/cRhpzOHXMr4JALGZuZKKVItND2NMF3NwcBEi4XLIpLNooPm 3gtdJqVsbyOhfAIgwgTViVBMzRYCHLZRQmNt6fG480sVg44sI4ST8MqWfIvNFdozQMt1 +XjlzZzjIW+4KMlsldOj5obCfYpy9iGEbw7aMoCje3+aADYYoQsyOhOBwR8D4EFQzl5S GCGB76GDMQfU/Wkjt7QAdPRNj3kegTP9Fx5tGMMpiXO1/RE0wQgkvbaxbHzC+M59OrtQ E8LUOJDI0GOUuGwIcNsxqxsg9eaIM/9fdrhkQ2UOkyKsosvohTd4pX6Z7K/1i6l35QPy z7RA== X-Gm-Message-State: AJaThX6EB8VFaZFdbWEKQ9i0yyME7Gpm7JFayiF1AgBQA+KDysqa0YUu EINU+s/T48GJ7cVUGriv1WKG0Vfcv0g= X-Received: by 10.28.72.9 with SMTP id v9mr4762300wma.102.1510934969059; Fri, 17 Nov 2017 08:09:29 -0800 (PST) Received: from localhost.localdomain ([160.167.170.128]) by smtp.gmail.com with ESMTPSA id p42sm5575959wrb.28.2017.11.17.08.09.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Nov 2017 08:09:28 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org, lersek@redhat.com Date: Fri, 17 Nov 2017 16:09:02 +0000 Message-Id: <20171117160913.17292-5-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171117160913.17292-1-ard.biesheuvel@linaro.org> References: <20171117160913.17292-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH 04/15] 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: leif.lindholm@linaro.org, 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 --- 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 Reviewed-by: Laszlo Ersek 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