From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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-Google-Smtp-Source: AGs4zMb1henXw/je4+lvQ86YgSK6b1+TdoNakx4b7NXx/VfPyjlGStWJBJ/nicV08sa4Lcg+pIg+ZA== 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 Cc: Ard Biesheuvel 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: [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: , X-List-Received-Date: Wed, 22 Nov 2017 10:03:29 -0000 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(-) 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 -- 2.11.0