From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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-Google-Smtp-Source: AFSGD/VfDnHth1MZEeBXo3dnwIzRQMebz+4QFMoylOByTiZLD/yJCwRj9SUMy9tCDplAWeKPNhiErA== 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 Cc: Ard Biesheuvel , Laszlo Ersek , Leif Lindholm , Eric Auger , Andrew Jones , Philippe Mathieu-Daude , Julien Grall 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: [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: , X-List-Received-Date: Wed, 28 Nov 2018 14:34:17 -0000 Content-Transfer-Encoding: 8bit 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(-) 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); -- 2.19.1