From patchwork Wed Nov 28 14:33:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 152283 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1164713ljp; Wed, 28 Nov 2018 06:34:52 -0800 (PST) X-Google-Smtp-Source: AFSGD/WBCZph2yaYxF22VwFpiJx8+qdOdMmvkXvckLpsRSbXWb3uLVIbgFQ6jPQ6teb8MQLQOXSC X-Received: by 2002:a17:902:5066:: with SMTP id f35mr33300423plh.78.1543415692541; Wed, 28 Nov 2018 06:34:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543415692; cv=none; d=google.com; s=arc-20160816; b=pVt5OeS9ciWsksmQ21JudrquvcZQJQIe82YNuDDS9YRapcCAKZqecULmw4YqUp1SMW deYgl5tUROoCnp6sBhqc5RMQNo9coVh1qFi85IlVI8FBN64CTOgbHvThmjCQII/MKdwD ivxr/0uGeaKOSrW47EvucM/ADEHAPxsVazTeYEXKvY4Q/INJ274YvThkPqwrQBZRRnvg TJF1ttM1dTx5BaqWHLTrMJ6WjiKnNdR7M/FjGJtuTDwukbQb6tjxmvG5g1XIR/aqPaTF WckgzyXDC4O8szs3MGRgrhynMzCKa1H7AsCIu4fRporz31Wpopw7TaGUA2lZINqyCh16 bxiw== 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=xDWo/SmlExwPI5Bkw55W6OiJInKHkC2gim/y5X3nRCg=; b=sO5TkKZ/2e5Nb99oFhidJq/aOy/CQzmzwXHIDkExH4S0N0SizrljdT+NnskwCPyzuH trEgRLBXwhI2pa934XYdaVMtlUStQ3IFvkrc3UTUh4N8aeWRwbctik2GjZmrIp2VvQIC ZxyHENyGK/catbb75xX2BnQi83eRevrqVXgZIFlKgmu4+T98bES7WqxDnU+3I2Ylc3oO wv3VC7Jq6Br4ktJsAg+ATiibl6r2nrRP/nDxQbr5baTcpeIde7P7l+3KjQVysq0Ic50L wWZa5kfg2wPqgWFHSSnVitSnHoIEhn6W8LDLeU37+Fmw4BgjAo82e+WVNOpYkd9IGNgC S3pQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ejUF00bo; 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 m61si7451769plb.154.2018.11.28.06.34.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Nov 2018 06:34:52 -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=ejUF00bo; 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 9DDF22119622D; Wed, 28 Nov 2018 06:34:24 -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::444; helo=mail-wr1-x444.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) (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 AC5112119621C for ; Wed, 28 Nov 2018 06:34:20 -0800 (PST) Received: by mail-wr1-x444.google.com with SMTP id l9so26514118wrt.13 for ; Wed, 28 Nov 2018 06:34:20 -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=VTw6MXF4TfPCkKPOxZSN+wMK3LwGW18zflElAM/tN3U=; b=ejUF00bo0JcIGt5oLp13BnJWkI5/iywx5Wk29FqlVt5/c0fYBnr80m+sY4f5IjPiGj AXz1plNNI/6WmQfMmQe8wFZ8+VTSxbK4zsJVq3kMtLe6vjAvbnc/sihI4bTZwVKGyWHp z3OJo50YUMnHoe/8zxt3kQqjh4GZ1ks7HeVqs= 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=VTw6MXF4TfPCkKPOxZSN+wMK3LwGW18zflElAM/tN3U=; b=MbzVAr/eLnf8ZAk8iudu1RjtL8eNBKOHNpgBSxty7wnbmATDl5C5Z1LEqh6zZHtkom FzK/9oDUiPUW2Sfv81GSZet1IgWYOpG7dJzOH0u2uVCFSMJfkOHc+UdyCLwiBtl0UpW3 JktaTw7o5rXPja+s2cXhXnQwuiZ4LlNaoMGBBbdlhZdUwL5EWwPivkSkDmH5dpcIduUX omHPyaS9wIMeyB8aT6uLoZyezemnQ4GKMZBjRsQf2ZVB2Qgbkn+ZpJHd3gsngADkbBtm GTHpozxCmMsmnthq+rsjR2+kWQvMdP2UtNYrw5BsqBvntY7Hqqprz3sk8oAmEMlHBhzJ 6ZaA== X-Gm-Message-State: AA+aEWYoA+R74qpBP0OYMvDG9s16dfJ83Eje1OelV4mgih/QftpaP9m2 LdG/Icbd1fiRJFMfRSE8r1fJGNdpqNE= X-Received: by 2002:adf:9ec8:: with SMTP id b8mr21159072wrf.164.1543415658550; Wed, 28 Nov 2018 06:34:18 -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.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Nov 2018 06:34:17 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Wed, 28 Nov 2018 15:33:52 +0100 Message-Id: <20181128143357.991-12-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 11/16] ArmVirtPkg/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 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 --- ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf | 1 - ArmVirtPkg/PrePi/PrePi.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é Acked-by: Laszlo Ersek diff --git a/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf b/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf index 1587bd92f206..034ddb41cb48 100755 --- a/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf +++ b/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf @@ -85,7 +85,6 @@ [FixedPcd] gArmPlatformTokenSpaceGuid.PcdCoreCount - gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory diff --git a/ArmVirtPkg/PrePi/PrePi.c b/ArmVirtPkg/PrePi/PrePi.c index f6abe2f2016b..61de6cfd4ae6 100755 --- a/ArmVirtPkg/PrePi/PrePi.c +++ b/ArmVirtPkg/PrePi/PrePi.c @@ -80,7 +80,7 @@ PrePiMain ( BuildStackHob (StacksBase, StacksSize); //TODO: Call CpuPei as a library - BuildCpuHob (PcdGet8 (PcdPrePiCpuMemorySize), PcdGet8 (PcdPrePiCpuIoSize)); + BuildCpuHob (ArmGetPhysicalAddressBits (), PcdGet8 (PcdPrePiCpuIoSize)); // Set the Boot Mode SetBootMode (BOOT_WITH_FULL_CONFIGURATION);