From patchwork Mon Nov 26 22:37:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 152088 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp465753ljp; Mon, 26 Nov 2018 14:38:52 -0800 (PST) X-Google-Smtp-Source: AFSGD/Vooob4jh+L3+kK9hVGFJrkkhR/WLggmXpNScLAz/dV/u7NmdwMy2SP4jCv9BJh8HCg+RGm X-Received: by 2002:a63:4044:: with SMTP id n65mr25935028pga.90.1543271932016; Mon, 26 Nov 2018 14:38:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543271932; cv=none; d=google.com; s=arc-20160816; b=SCjjgm+pF7MZ1g2LhP9noNcqrl8jWBayK6WjVyujvXi6g7yuAl5Qydf9NmRYDhCIIB t+tmzfftnborhZqnOrQca7vne6HiAKS5AhvdgaMmxnH2lIcC1T4asAcSdJUWOLNNBjTv 122dTOK9zv30TOFdy6Zw4Vg+QGZ0EXI8aOyyiNxnZrQgOEk6W5Vq+tlQrGRJvuZxHiyj LuoiL19nGLMD3VSFH21HeVoxun5fwP8KWVfX311pyko0Fo7iv58R12JU6uLAQgvSN/xW AhM/HjvW8abVXdgH1EhkAiZi4X0a6pjCzfXDUGwF1fMoUmr7494BFB+XK0ktYv2XHG/h QAhA== 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=BueAZVja70Uf00sRpXrdGTQ6v2YDgHhjR870Y5HQcQ4=; b=brxcDuRgUprmdMZ6l+scb1dFNPdeu79HZq1SSmNNysDpXny4WQh26rRa9CH5OYGqZG PqXQRzp5XKNYRT9M7zwiQzw3mvxBjc2KHB2PadsYdkZ4jnVeh83CQ5N3E0y3nEQ0J82A M93zh/fM6AjJiFlzs1ZaU5BofSdwNxymEB/Hu9cYnAwNqSX81QA42V79xDetYrojslo2 tlRa+mc2uNEpkLZfIc6nbOuF7mqDILJVzRA6zAf+K8I8UuCIGWVizDI8WolH879Scupg nWOweuC7q4vV9Re21NSOzWfLRJuBIovSOaqMb6SDqCfAJu2XPRXBJIO2w3qurC97bILV EFHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="fuZ/X0xF"; 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 z6si1532615pln.66.2018.11.26.14.38.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 14:38:52 -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="fuZ/X0xF"; 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 AFC9421195BDF; Mon, 26 Nov 2018 14:38:41 -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::341; helo=mail-wm1-x341.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) (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 3852B211944A7 for ; Mon, 26 Nov 2018 14:38:39 -0800 (PST) Received: by mail-wm1-x341.google.com with SMTP id z18so5199621wmc.4 for ; Mon, 26 Nov 2018 14:38:39 -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=X6KZu55ZZa5rydhjCMQqGd/5R9brir3k9jqm5YJ/AoQ=; b=fuZ/X0xFvE76QCabKZPmTIItqYIS8XWRUQaytKUlgYMmipSHCZ/decU2MF214hyaps Dh/YyDU/RdsO0ZBDMTtAb7ijMmDQqyDp479IV9nmX24OJNAJXDq7m9MhE5AQH3QM6FyP Y5RwGwmlZhtzanAuSVfNYKcojfOPjZslrWe3s= 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=X6KZu55ZZa5rydhjCMQqGd/5R9brir3k9jqm5YJ/AoQ=; b=ef3fsI2/sW5dtCVBpYbaJSIHUxlFGDpvl1R6m3LXvx9YHpxEwNmW5nuenlDiwpain0 YDQ5xW7lwBuaSsGOnwOEmuYKvKaKMYWMJ+cidq9dyiOMqvnZhykTUNd4Fx05c6Q/fM9Q U5dLzplcVQXS0OEh2QRXt90PTrbR8HnSjk7j3z8VkFwaFUdME2F0hGJqn2N5z1WQcFt3 qSMPoFrhEUNeUUK9NWcvGwvnDBn3+8X2Fd5aaWHf1iWC5pnbV1ujny7G47+OtnX9R8PB 1VEs4pDdC0CUdyrRUn4BIrC2yvpXBlyKPQileXO+t6XzSsBnECRV04n8EKj4SjWqr19U WI2A== X-Gm-Message-State: AA+aEWZ58dtZWCGekGNMmTS9BhDGYLazjfPqPppJ7AU9zElEy4sLLzvC OMdKXaV37AfOMt86ltoWkKffrJgaa1s= X-Received: by 2002:a1c:a5c8:: with SMTP id o191mr26584013wme.150.1543271917366; Mon, 26 Nov 2018 14:38:37 -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.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 14:38:36 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Mon, 26 Nov 2018 23:37:56 +0100 Message-Id: <20181126223801.17121-9-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 08/13] EmbeddedPkg/PrePiHobLib: 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 --- EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf | 1 - EmbeddedPkg/Library/PrePiHobLib/Hob.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/EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf b/EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf index 526db4c0d8f9..1ce3546d007d 100644 --- a/EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf +++ b/EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf @@ -47,7 +47,6 @@ [Guids] gEfiHobMemoryAllocStackGuid [FixedPcd.common] - gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory diff --git a/EmbeddedPkg/Library/PrePiHobLib/Hob.c b/EmbeddedPkg/Library/PrePiHobLib/Hob.c index aff8ea05797b..e3d70ae0f9fe 100644 --- a/EmbeddedPkg/Library/PrePiHobLib/Hob.c +++ b/EmbeddedPkg/Library/PrePiHobLib/Hob.c @@ -193,7 +193,7 @@ CreateHobList ( Hob = HobConstructor (MemoryBegin,MemoryLength,HobBase,StackBase); SetHobList (Hob); - BuildCpuHob (PcdGet8 (PcdPrePiCpuMemorySize), PcdGet8 (PcdPrePiCpuIoSize)); + BuildCpuHob (ArmGetPhysicalAddressBits (), PcdGet8 (PcdPrePiCpuIoSize)); Attributes =( EFI_RESOURCE_ATTRIBUTE_PRESENT |