From patchwork Mon Nov 26 22:37:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 152085 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp465612ljp; Mon, 26 Nov 2018 14:38:42 -0800 (PST) X-Google-Smtp-Source: AFSGD/W/O/a3XztU6f4cQbiMrxcdR5wj/OUAADMkCELi/gj3m2PvVkRHxOEP1A8tf45p0xyqfSmK X-Received: by 2002:a17:902:6946:: with SMTP id k6mr30268047plt.101.1543271922360; Mon, 26 Nov 2018 14:38:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543271922; cv=none; d=google.com; s=arc-20160816; b=jPDzCH1Kncx9HT+7FubtbmjKmNtKHyWHmMqud6gkl6Efc8w6lv3/utlF+JpgEJd0D5 lEmbJqcvS4e86ANUGlTBojhkuFNxVD75+ooOU9YQKTXdq8o126zKtEdi5qmMl9coAVs+ mSbxfciUH2Df9IpCYtOp43Hg2i0W9rbzHh0hL/WMw2G13u7KkS8xvdQ/oRWpjOUbshXo auM0129t3jsley3HQZDufW6D8MNdJgBmVaVCw3j3itIifGXTvD60qvVC0+3vzFYxPcFn xFeaJPkkeKRduKL/zHhikjJI5XHIJVDCtIieRhRPAOBe28P9sg1z7wbOMWWbEkawX6Lq gVbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=ShehCmIwu+ByyTQU/LpWeoaQAXvMMM67Rv4GSkOinmU=; b=hnTIu7hL0CoAAWbapazUfel7hVXhlBp8x0GbrIeCBPrw8x+3GR6T/Ac4jrkmOHYpIO xQ1hR60bYhWEhj2gNN0HtDAz4Fphb6YqeVGmV3GDtkP8YO9SnUXMBgfvZkaQFRqFXWuJ ytV6k75CcWTOVE9JB6IvDSiZ+d/gw7g3oEqhuI7OhG2PEUjzIkkezClgxRu0TFnzRJft 83nc6co81TvTBjyKXO66u1VHhqgSquwS0MZ8vJ9M5jTDMQOzeW+LNBWvxZApQTGF5Td4 sGSIoJuVncVposwPwRRlEA54sn54bmbhHOKrFoBLPU76Qgrojm2DN8at8mI8b9jGjgOC QIvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=aOfyM45+; 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 sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id r12si1568020pgk.520.2018.11.26.14.38.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 14:38:42 -0800 (PST) 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 header.s=google header.b=aOfyM45+; 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 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 207BF2194D3B8; Mon, 26 Nov 2018 14:38:37 -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:4864:20::441; helo=mail-wr1-x441.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) (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 0227C2119377F for ; Mon, 26 Nov 2018 14:38:34 -0800 (PST) Received: by mail-wr1-x441.google.com with SMTP id t27so12698331wra.6 for ; Mon, 26 Nov 2018 14:38:34 -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 :mime-version:content-transfer-encoding; bh=DmIC3LRgfDV9DiB4dlJpGn4KauqSXmeZm5QJ7+nO9O8=; b=aOfyM45+wXu2D4ZWpbiTjfLYxH+v8dxNjmP/lZsQ+oq6WrrV/E1qt3RwNC6xc1csDw VtsVSz7wJ306mdb5lrOILNmcqA4pmDi2dI3n2R7OkEE21x5GmUJNqqYMg44vzW3aCZOs yfAGKtsEbv2WQgcCdReWASGYQ7j9E3fiJVQSo= 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:mime-version:content-transfer-encoding; bh=DmIC3LRgfDV9DiB4dlJpGn4KauqSXmeZm5QJ7+nO9O8=; b=niDOpXcVxBHwwpYtZ9+ItLUX/H6xBvTFZDr0qTa4BSVpXqlhoRUvTMUl78DcCSIArW kEdWNmZp6X5T1u1l/vyEXg3DEPPmpNc99tfk1NiZcZBoWVUb2gsStXfaVQLEXCIOtScc B1z8nA14wDYz1GG/eG73S2IxiFSektponNFxHwBTWPywBAy5HJIbSS22WufH5ToMGnOv Y71jwNJwtwekpqCG/dGABiGVUqL+xi1HXLRJBqVvwiv3FBCyLHICYnhQRnyG3JtVNCJl 5n8M9n2cxkEbppfnY2YnMx0IZrT8yhY06dymWZ9zpr2YJ11++D5VSU4kNRt4yZCkPURl 4jDg== X-Gm-Message-State: AA+aEWbsc2EyLNOMg/cPpip4lKBOhrt41cVvJrSa7RdbaN91PzRSJuG1 7lj1SCa+yIXG+YOHD7FQCBtqnWRDGps= X-Received: by 2002:adf:a14d:: with SMTP id r13mr293079wrr.169.1543271913145; Mon, 26 Nov 2018 14:38:33 -0800 (PST) Received: from harold.home ([2a01:cb1d:112:6f00:8571:4c23:4f5c:5eb7]) by smtp.gmail.com with ESMTPSA id v5sm2641916wrn.71.2018.11.26.14.38.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 14:38:32 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Mon, 26 Nov 2018 23:37:53 +0100 Message-Id: <20181126223801.17121-6-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181126223801.17121-1-ard.biesheuvel@linaro.org> References: <20181126223801.17121-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Subject: [edk2] [PATCH v2 05/13] ArmPlatformPkg/PrePi: base GCD memory space size on CPU's PA range X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jones , Laszlo Ersek , Eric Auger Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Derive the size of the GCD memory space map directly from the CPU's information registers rather than from the PcdPrePiCpuMemorySize PCD, which will be removed. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- ArmPlatformPkg/PrePi/PeiMPCore.inf | 1 - ArmPlatformPkg/PrePi/PeiUniCore.inf | 1 - ArmPlatformPkg/PrePi/PrePi.c | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) -- 2.19.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/ArmPlatformPkg/PrePi/PeiMPCore.inf b/ArmPlatformPkg/PrePi/PeiMPCore.inf index 242b03175536..7e2ad6fc483d 100644 --- a/ArmPlatformPkg/PrePi/PeiMPCore.inf +++ b/ArmPlatformPkg/PrePi/PeiMPCore.inf @@ -97,7 +97,6 @@ [FixedPcd] gArmPlatformTokenSpaceGuid.PcdCoreCount - gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory diff --git a/ArmPlatformPkg/PrePi/PeiUniCore.inf b/ArmPlatformPkg/PrePi/PeiUniCore.inf index a45cdef4ed91..26328b7e8f67 100644 --- a/ArmPlatformPkg/PrePi/PeiUniCore.inf +++ b/ArmPlatformPkg/PrePi/PeiUniCore.inf @@ -90,7 +90,6 @@ [FixedPcd] gArmPlatformTokenSpaceGuid.PcdCoreCount - gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory diff --git a/ArmPlatformPkg/PrePi/PrePi.c b/ArmPlatformPkg/PrePi/PrePi.c index 02cff7ddc204..245bdded1eb3 100644 --- a/ArmPlatformPkg/PrePi/PrePi.c +++ b/ArmPlatformPkg/PrePi/PrePi.c @@ -115,7 +115,7 @@ PrePiMain ( BuildStackHob (StacksBase, StacksSize); //TODO: Call CpuPei as a library - BuildCpuHob (PcdGet8 (PcdPrePiCpuMemorySize), PcdGet8 (PcdPrePiCpuIoSize)); + BuildCpuHob (ArmGetPhysicalAddressBits (), PcdGet8 (PcdPrePiCpuIoSize)); if (ArmIsMpCore ()) { // Only MP Core platform need to produce gArmMpCoreInfoPpiGuid