From patchwork Mon Nov 26 22:37:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 152084 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp465552ljp; Mon, 26 Nov 2018 14:38:39 -0800 (PST) X-Google-Smtp-Source: AFSGD/VjB/c9COYo/Q5PjFUw7V+IiqXg48CxegMApTSNusey8r/Of9+fYGO7tjt8hf+GCDskli2G X-Received: by 2002:a63:6302:: with SMTP id x2mr26635950pgb.183.1543271919324; Mon, 26 Nov 2018 14:38:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543271919; cv=none; d=google.com; s=arc-20160816; b=HAU7p9ZpUqtU5k0RydtZdKZ9kDwNYbJISOws7DB6qEsH7VaIFqZSaGJfnMW+YI669f 6CNpDIoyQv5jW4xg6qix72ffzEr1ePeLaNUhcET8L19n/F6IXTP/S26rbjZ5l9BO3YJm 7QHTvXHqIdPkKPJxmmwRQgnRs2wrayFmlbqXcFwsotYSfmguT3qhormJyZ/o4v1x4sBT RhwAgsNDoaO92aixouD3IjK7fem5L2D+HbsV8FNQGv8rgX7HcSBn6yKAYU/63QsiWNBe fAnlPMbF3WNRUZfP/FFu9UCf6hPmavNdNZyHIazDzg8No1xPf8OoR/tSIwKqOfe1VS20 i+uw== 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=t2FxStij5TI28I/D82lmvFk8RJvFxp5GuRpDpqPjEw4=; b=yiJDxfasKznEOc/AHtiCpMLsanJ2ON267Ws1bUcy9UrCie6zTTHDIBEyv0M9sX0k0E Ou6t0YUPWlAl2E1+If0W4NA8C45KbvtcaBaD8HGBP6Lsl6JAhvvadrfKVpzhsHXfvEzL 4RUMBcD8ikMKEMJS49PjprVm+5m95VcOBz8DHjTvNTqEwSX2OTQTUahJjU2nJuebfUve wP8zU81eZa4ZLa8xPYFiMRwb/bpJZlnnylKy9uQhCfXTe2ON2vehXWkQQbM2oDp9d3a9 25wzdU2ATKAMmBMcqDDywcxeArpetpLUktlNfm30AcDSzOHC4xHMRE/P/jFA1Nt/kNCV YGrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="hh51/T1N"; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 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. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id p2si1614989pgr.133.2018.11.26.14.38.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 14:38:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="hh51/T1N"; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 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 E5D0421195BD1; Mon, 26 Nov 2018 14:38:36 -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::442; helo=mail-wr1-x442.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) (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 852102194D3AE for ; Mon, 26 Nov 2018 14:38:33 -0800 (PST) Received: by mail-wr1-x442.google.com with SMTP id p4so20665903wrt.7 for ; Mon, 26 Nov 2018 14:38:33 -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=ynicutrS9BlDWKykqGtt6Amc2Qylqt/36mhMiGAjv0g=; b=hh51/T1NJfq85DaJSLU1fgIsukyga/apVbUI/AsyXHGAy7KE/DBmuaVGLPDW1W31/7 41+KHtWNGeG5oc8qRvYLIcpGiSOrfrGGOITzuLj2EpJ8IoMoswFmv8qYZNu6TPNjyztf W4f2iSqK9cnxnv9YGXjKOnJHl6xChfgLDQTXo= 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=ynicutrS9BlDWKykqGtt6Amc2Qylqt/36mhMiGAjv0g=; b=b4jXT3fIOsT88xxH3FAf9lUW8XkEeYiRRx0ViqQGDvSafHUhCqOZ8wSSIbk2QcuKcc VeNla0HUPH4pyY9peMH/1rIIg6UgmOiEaM4VLTTJu/injDwbXi9oEO0Ucfj+R7UJHTFX UZG4K18Pv1LG9/Ly7Ur1Et5kSkhhfVEjabVkkdgy6tXzbOxsIk+feHNrSaMPes4F59CA p3E3B2iUTbP0ci7iPVh6rAck4QzY3ZIVd8LT5HE7uiZ0uHAuEr0thm5coh/U6F6Q+C4O iDkP5WZZ22Li4Cc/JaKzDN/hYNMizZKKmKzugFTmu4XANHwVaePMxgAw/F9yPoczT20e z9aQ== X-Gm-Message-State: AA+aEWbC4M2wN3d88qRSDJymFttHjrHRPTFOutKpWVJWgFnHO14GTTzV 1iIR6gAbX3d5GxwzjcjIJ5+VlBvtVFI= X-Received: by 2002:adf:8143:: with SMTP id 61mr3691302wrm.47.1543271911866; Mon, 26 Nov 2018 14:38:31 -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.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 14:38:30 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Mon, 26 Nov 2018 23:37:52 +0100 Message-Id: <20181126223801.17121-5-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 04/13] ArmPkg/CpuPei: 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 --- ArmPkg/Drivers/CpuPei/CpuPei.inf | 1 - ArmPkg/Drivers/CpuPei/CpuPei.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) -- 2.19.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/ArmPkg/Drivers/CpuPei/CpuPei.inf b/ArmPkg/Drivers/CpuPei/CpuPei.inf index eafccd600983..dcea012fd8f9 100644 --- a/ArmPkg/Drivers/CpuPei/CpuPei.inf +++ b/ArmPkg/Drivers/CpuPei/CpuPei.inf @@ -50,7 +50,6 @@ [Guids] gArmMpCoreInfoGuid [FixedPcd] - gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize [Depex] diff --git a/ArmPkg/Drivers/CpuPei/CpuPei.c b/ArmPkg/Drivers/CpuPei/CpuPei.c index d54f42acfcc8..e63519ff6481 100644 --- a/ArmPkg/Drivers/CpuPei/CpuPei.c +++ b/ArmPkg/Drivers/CpuPei/CpuPei.c @@ -73,7 +73,7 @@ InitializeCpuPeim ( ArmEnableBranchPrediction (); // Publish the CPU memory and io spaces sizes - BuildCpuHob (PcdGet8 (PcdPrePiCpuMemorySize), PcdGet8 (PcdPrePiCpuIoSize)); + BuildCpuHob (ArmGetPhysicalAddressBits (), PcdGet8 (PcdPrePiCpuIoSize)); // Only MP Core platform need to produce gArmMpCoreInfoPpiGuid Status = PeiServicesLocatePpi (&gArmMpCoreInfoPpiGuid, 0, NULL, (VOID**)&ArmMpCoreInfoPpi);