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: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-Google-Smtp-Source: AGs4zMbyWNyk4kcuyIDjqhqlIMshxB7ciizY8NxwRF1evlxM630XNH+9d1p8GEfT26Fj7RoneLaA2g== 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 Cc: leif.lindholm@linaro.org, Ard Biesheuvel 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: [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: , X-List-Received-Date: Fri, 17 Nov 2017 16:05:20 -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 --- 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