From patchwork Mon Aug 29 12:50:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 74906 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1616056qga; Mon, 29 Aug 2016 05:50:43 -0700 (PDT) X-Received: by 10.55.153.68 with SMTP id b65mr12089182qke.10.1472475043485; Mon, 29 Aug 2016 05:50:43 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id h35si23180262qta.56.2016.08.29.05.50.41; Mon, 29 Aug 2016 05:50:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=linaro-uefi-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 0E76760E74; Mon, 29 Aug 2016 12:50:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 0213D60C47; Mon, 29 Aug 2016 12:50:37 +0000 (UTC) X-Original-To: linaro-uefi@lists.linaro.org Delivered-To: linaro-uefi@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 58C5660C49; Mon, 29 Aug 2016 12:50:31 +0000 (UTC) Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) by lists.linaro.org (Postfix) with ESMTPS id 7A10B60C3E for ; Mon, 29 Aug 2016 12:50:29 +0000 (UTC) Received: by mail-wm0-f52.google.com with SMTP id i5so90296700wmg.0 for ; Mon, 29 Aug 2016 05:50:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=vOesjoU9x+0Y0sNGTKvw1eiLL61fL59CMWJJwNnCDig=; b=Uae3E0vbNy8yFs14tv9Z29/Dml1ifgmKEMP8kbCwsPilYLk1Rfbgvy/JUgTv0xaXNi IKpkeZ+ROHVo9p6HlmvblCmpVbVqboa8vD7CU+UNwdKS20ruUCavpZCdNlTVH5cjKYCv MvDPbVX2AP2iDk+HIM6MqOY2jUQbDx/Qy1Uo9mlh1iCpqDRGyy5Oa4IUzGPRL27ZjW0k /n60zsMPVH2i2W2Qh19KbwaoyGUP0oB0pW7/OYCAxBjdcCCitTVnx93HLnY02JY4qB2E BaVdEAX92+dTSR/+afhDe6LdzB9mm4lirVEJBoscbUCQNyZflFOGwmHwVe+kP/Q/5aAs 68Tg== X-Gm-Message-State: AE9vXwPdPF9koIV2VxfoMbMFqxvDCCVbtDlN9GFHTDJb8NpeSzVOINtqTzPDxh8Dzm70lMG81wY= X-Received: by 10.28.166.140 with SMTP id p134mr9944911wme.21.1472475028503; Mon, 29 Aug 2016 05:50:28 -0700 (PDT) Received: from localhost.localdomain ([160.165.12.73]) by smtp.gmail.com with ESMTPSA id g7sm34305746wjx.10.2016.08.29.05.50.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 Aug 2016 05:50:27 -0700 (PDT) From: Ard Biesheuvel To: linaro-uefi@lists.linaro.org, alan@softiron.co.uk Date: Mon, 29 Aug 2016 13:50:23 +0100 Message-Id: <1472475023-2996-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 Subject: [Linaro-uefi] [PATCH] Platforms/Styx: ignore PcdArmPrimaryCoreMask X-BeenThere: linaro-uefi@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linaro-uefi-bounces@lists.linaro.org Sender: "Linaro-uefi" The PCD PcdArmPrimaryCoreMask is of dubious value, not only because it is unclear what the point is of masking out bits before comparing a given MPIDR_EL1 value with a known value belonging to the primary core, but also because the default value of 0xF03 masks out bits that belong to the actual affinity levels. For Styx, simply ignore the mask altogether. Since its version of ArmPlatformPeiBootAction () records the primary MPIDR_EL1 value upon first entry, we know its exact value, and no masking is necessary. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm --- Hello Alan, Any chance you could try this patch, and check whether it solves the regression you have been experiencing? I'd try it myself it it weren't for the fact that my SPI flash programmer is broken atm. Thanks, Ard. Platforms/AMD/Styx/Library/AmdStyxLib/AArch64/Helper.S | 3 --- Platforms/AMD/Styx/Library/AmdStyxLib/AmdStyxLib.inf | 1 - Platforms/AMD/Styx/Library/AmdStyxLib/AmdStyxLibSec.inf | 1 - 3 files changed, 5 deletions(-) diff --git a/Platforms/AMD/Styx/Library/AmdStyxLib/AArch64/Helper.S b/Platforms/AMD/Styx/Library/AmdStyxLib/AArch64/Helper.S index a3ac60282706..b7ec02f0e69f 100644 --- a/Platforms/AMD/Styx/Library/AmdStyxLib/AArch64/Helper.S +++ b/Platforms/AMD/Styx/Library/AmdStyxLib/AArch64/Helper.S @@ -58,9 +58,6 @@ ASM_FUNC(ArmGetCpuCountPerCluster) // IN UINTN MpId // ); ASM_FUNC(ArmPlatformIsPrimaryCore) - MOV32 (w1, FixedPcdGet32 (PcdArmPrimaryCoreMask)) - and x0, x0, x1 - ldr w1, PrimaryCoreMpid cmp w0, w1 diff --git a/Platforms/AMD/Styx/Library/AmdStyxLib/AmdStyxLib.inf b/Platforms/AMD/Styx/Library/AmdStyxLib/AmdStyxLib.inf index 4a6469ee016c..8e9169161d16 100644 --- a/Platforms/AMD/Styx/Library/AmdStyxLib/AmdStyxLib.inf +++ b/Platforms/AMD/Styx/Library/AmdStyxLib/AmdStyxLib.inf @@ -67,7 +67,6 @@ gAmdStyxTokenSpaceGuid.PcdTrustedFWMemorySize [FixedPcd] - gArmTokenSpaceGuid.PcdArmPrimaryCoreMask gArmTokenSpaceGuid.PcdArmPrimaryCore gArmPlatformTokenSpaceGuid.PcdCoreCount diff --git a/Platforms/AMD/Styx/Library/AmdStyxLib/AmdStyxLibSec.inf b/Platforms/AMD/Styx/Library/AmdStyxLib/AmdStyxLibSec.inf index 0b9b6287168d..2a2d6ffb8c64 100644 --- a/Platforms/AMD/Styx/Library/AmdStyxLib/AmdStyxLibSec.inf +++ b/Platforms/AMD/Styx/Library/AmdStyxLib/AmdStyxLibSec.inf @@ -62,7 +62,6 @@ gArmTokenSpaceGuid.PcdFvBaseAddress [FixedPcd] - gArmTokenSpaceGuid.PcdArmPrimaryCoreMask gArmTokenSpaceGuid.PcdArmPrimaryCore gArmPlatformTokenSpaceGuid.PcdCoreCount