From patchwork Wed Nov 28 14:33:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 152281 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1164510ljp; Wed, 28 Nov 2018 06:34:41 -0800 (PST) X-Google-Smtp-Source: AFSGD/UM8eZcvkLyeI8JoC3YFnq7fKHkZIWfNzmlVMWKrlkXKCTADIwD3iBWUy/doAjn7xrik3sV X-Received: by 2002:a63:c24c:: with SMTP id l12mr33481533pgg.146.1543415681267; Wed, 28 Nov 2018 06:34:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543415681; cv=none; d=google.com; s=arc-20160816; b=JBOpcdiGG9SupZbF5C89q4LHMWvdX9oX6iJClWCRuIPbZ8/WErjKtmo0MVyVhwYsZ9 zigXEDiRVe6aY5p0o2TQBHZwL1hZ/XisSHpiX9NB2BcLkKr1bk/qYYZHJOOpDbiLEG+m GEX2MeHyPEikDETcSr3vDLjWZmiW0FWv4Bh3TPzYaVjoaOgX5CFfkrcyTLLCKQn/Pof5 029bI7qVjPcAcCtAd5IHtA2luUlHfUT2CGwtGHmr8bX/10fD4lhHD9Qf4TY9tJujUefQ MLN9snJqECnILtzD27LoVg3sSwm6qz30dR8LwLNUkUhzP23za8fXBVuMBae+AxYXL4nR /A/w== 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=r3CpyWKVynQqEEKOhyHc9QtjFmSVnd1ROwAb2gAGAx3QwKazxrdlbUqvcgXh0NbR7K cpybPTOrKwqj3p7tGC/j254euwJF5UWkgCzzFZTYbkgwLb/p6mhayQgGYBaRRL7Nm9ue KUp5e1ZEsTO0MOIEV4Cuzdghs/HE4A8I62Uv+xsqBkvjGUhXCbFTEqeEbqIHp+9nuhr4 e3rLd4tubmag94bai8R6C8x2MweW17LZ0brlOKixDNSfnnltuzpcJsOjbCDoG3wFURsY B6lDCbQutJr6pZzmwiLxXm8o+o/AiODKe2utb9Zv3TEdWiDome4ZNsPtx8GfUDZCj9Yu 6SEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=iRnUMYZw; 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 m1si7396384pgm.194.2018.11.28.06.34.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Nov 2018 06:34:41 -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=iRnUMYZw; 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 1C1CA21196223; Wed, 28 Nov 2018 06:34:21 -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 7BE9B2119620F for ; Wed, 28 Nov 2018 06:34:17 -0800 (PST) Received: by mail-wr1-x442.google.com with SMTP id r10so26513739wrs.10 for ; Wed, 28 Nov 2018 06:34:17 -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=iRnUMYZwfKTEvu63ELuosdwWsUK2T/hfxQYGrvbw4dCdhH6T3XtBv+aIEgrwmd4P+9 u6kilT4WAyfT9KEzIzGRD6N0fn/SAb4Xgqb/C8HBfyfAB+16k+3s4J+79zApv03hgOp6 gYXfyNhbAPQBeZIlN1YT0u+Mg/A8XYKn3XywQ= 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=ZdQ8z8YUSaqlYrZsJDuwpn4KbJJ1PSAs/mxB0D3u2d8DzY8X0egKjMjdLWhZ2KFf1L aMbCOAFLsjIAJBwTDrlpUcReR10fDQw1U5Z94XIJAXQURdkuNJbLKgD80wYhgocxV7VO WaTChPU3mcmjE9LB/RtlleFyZvTZcfX/ISiLDQ58lQD2aCeR92kOc4BBe4xLL2gDJbTf mqAdcHrcKiVSc2m5gdc+HY5zir6Mg1c1dlMctoCk8zB6gHggO0LYCLGvz+GvaXRUNBKF 6NcadLFdB2+7rk3tbX7HNmoDel88UoHdUH+CBHWyQkBeNCPSEt2udec1bL2YoAS8WPHq SAUw== X-Gm-Message-State: AA+aEWbnshEBY4nzRGgRWq7zEDkz98NTiQsnHmKDzV5Wm45MkcjabPOJ 8FrmD2/XlflMrVB72XHx0illd69tUYE= X-Received: by 2002:adf:ba8e:: with SMTP id p14mr22608734wrg.230.1543415655835; Wed, 28 Nov 2018 06:34:15 -0800 (PST) Received: from harold.home ([2a01:cb1d:112:6f00:296f:238b:c20d:3626]) by smtp.gmail.com with ESMTPSA id 6sm3391891wmk.26.2018.11.28.06.34.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Nov 2018 06:34:14 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Wed, 28 Nov 2018 15:33:50 +0100 Message-Id: <20181128143357.991-10-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181128143357.991-1-ard.biesheuvel@linaro.org> References: <20181128143357.991-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Subject: [edk2] [PATCH v3 09/16] 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 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 Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laszlo Ersek Reviewed-by: Leif Lindholm 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);