From patchwork Tue Apr 19 07:26:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 66077 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp1696784qge; Tue, 19 Apr 2016 00:26:42 -0700 (PDT) X-Received: by 10.98.34.142 with SMTP id p14mr1962391pfj.79.1461050802440; Tue, 19 Apr 2016 00:26:42 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id fc9si12922670pac.174.2016.04.19.00.26.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Apr 2016 00:26:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id C58951A21F2; Tue, 19 Apr 2016 00:26:41 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-wm0-x235.google.com (mail-wm0-x235.google.com [IPv6:2a00:1450:400c:c09::235]) (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 0F8AF1A21D5 for ; Tue, 19 Apr 2016 00:26:40 -0700 (PDT) Received: by mail-wm0-x235.google.com with SMTP id u206so13649089wme.1 for ; Tue, 19 Apr 2016 00:26:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=44q4lnr4lJD7LGeQFKi7IpTcTksRwUG6UICB5W7MMX8=; b=QICoKpJUmWqPBPzaMBkIZLNM3JhBedgsUkKs9G7IKtlxXYqJHcZPXjLZiubGM11VXr XiW6cSH20cqBZcjSZCom8ecVV6PDBDAmgaezA2171t20jSE8/GkrCZE63p4wjYK8G0d7 QZHS1HsgL4fmLbIfwE96TYAwdV50X8cScXhP4= 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=44q4lnr4lJD7LGeQFKi7IpTcTksRwUG6UICB5W7MMX8=; b=nKXusCzZXHlbBGewFXQw6Y8NgDTz5YJqThO4EQoOdE9U/xi/4xeiaWxIuUY5P3Wha0 K3DrzobDAggn30dRwDwPYHyc3w2bxg2w03mTPxvvlm4NUgUCRkCOM+t3nQyKnFEIwqLV ruoP1ciQArtRoxmhey+cxJj/Ke7bBnp/wOawruWPdaQdpyeMPRxMoJYekFuaPa2fos/I Pcj3p4PO1668M7lWcSUNgBisgES68EP0D4NjDBr3SNQnElGMpuJfCnnSO1giHTETlxBM vv2V1IiafeETHoIey4hyvkhbF6bSt0vzqZ/gzlOR5Vu/0mfNxruc5EmVDbrXuF4xGBiv I+NA== X-Gm-Message-State: AOPr4FX2MpLaEKQ6P3LxEVTmTN8nWgqWTjG9SN1LCD7VNhdCAB6rZsnMkcnkNZ0CcTN+BYiw X-Received: by 10.28.58.77 with SMTP id h74mr23160961wma.82.1461050798401; Tue, 19 Apr 2016 00:26:38 -0700 (PDT) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id f204sm2704562wmf.22.2016.04.19.00.26.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 19 Apr 2016 00:26:37 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org Date: Tue, 19 Apr 2016 09:26:32 +0200 Message-Id: <1461050792-16020-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.5.0 Subject: [edk2] [PATCH] ArmPlatformPkg/PrePi: allow unicore version to be used on MP hardware X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" When combining UEFI firmware built from Tianocore with ARM Trusted Firmware running in EL3, it is the responsibility of ATF that only a single core enters the UEFI firmware in EL2, and the remaining cores are released directly to the OS via PSCI SMC calls. In this case, we don't need the MpCore flavor of PrePi or PrePeiCore, but the UniCore flavor currently checks the CPU identification registers directly, and refuses to proceed if the boot CPU is part of a MpCore system. So drop the ASSERT()'s that implement this check. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- ArmPlatformPkg/PrePi/MainUniCore.c | 5 ----- ArmPlatformPkg/PrePi/PrePi.c | 2 -- 2 files changed, 7 deletions(-) -- 2.5.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Leif Lindholm diff --git a/ArmPlatformPkg/PrePi/MainUniCore.c b/ArmPlatformPkg/PrePi/MainUniCore.c index 49b02338ebc2..11b9f462bb48 100644 --- a/ArmPlatformPkg/PrePi/MainUniCore.c +++ b/ArmPlatformPkg/PrePi/MainUniCore.c @@ -21,11 +21,6 @@ PrimaryMain ( IN UINT64 StartTimeStamp ) { - DEBUG_CODE_BEGIN(); - // On MPCore system, PeiMpCore.inf should be used instead of PeiUniCore.inf - ASSERT(ArmIsMpCore() == 0); - DEBUG_CODE_END(); - PrePiMain (UefiMemoryBase, StacksBase, StartTimeStamp); // We must never return diff --git a/ArmPlatformPkg/PrePi/PrePi.c b/ArmPlatformPkg/PrePi/PrePi.c index 8740b2a9e84d..36928c65a73b 100644 --- a/ArmPlatformPkg/PrePi/PrePi.c +++ b/ArmPlatformPkg/PrePi/PrePi.c @@ -183,8 +183,6 @@ CEntryPoint ( { UINT64 StartTimeStamp; - ASSERT(!ArmIsMpCore() || (PcdGet32 (PcdCoreCount) > 1)); - // Initialize the platform specific controllers ArmPlatformInitialize (MpId);