From patchwork Mon Nov 26 22:37:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 152086 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp465647ljp; Mon, 26 Nov 2018 14:38:45 -0800 (PST) X-Google-Smtp-Source: AJdET5d33X9dJmbbMQcBKDDUPPCMJ7a8pz25nyQsDW8N6RWmUsvN2dncnczf5n0i8sZiTp6UBzPG X-Received: by 2002:a62:7f94:: with SMTP id a142mr30314570pfd.96.1543271925720; Mon, 26 Nov 2018 14:38:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543271925; cv=none; d=google.com; s=arc-20160816; b=uhMMxawfrJufodPnS1PJ4DIU8DhvjHvmWVN+87vj1fqjftzK6ShiZg8ZbVZ51ZsBUf 3vPcrB15HxWuwG0U2+ZZ7WQ04VveMx0ramC8/h85hI4mlKuOHW8r7nBxO92dZrSscRCy ukvT1cpuukgVPcw39K4dYxue43pUKB2MPktpcFZqEZQ67u+1Zt5uPeZsufnpx2p4Qtdl OR1s+frfCcDvR3H3V285Zz/P7+GzypebK3ZFAOoUlXP/2pNMHSOXONIZKEiAPpkZQTj6 oX1pqfDilAHjU12vEOS6wbxuZPH6bZZ79js6nd6GgT9qlazbhX4ybwQhdFe+Sq+QDmfA XLuA== 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=BY+UkFBtW4YX3cRF7zXDCCLXo42M4D57tm5EsNZKKqqACn6cijmWv0W/Ve/o1DOCf9 C2SMOC4s1p8CC2Poc26QF/4se75i552I2tC23MxuuCp7l3oQ64G9iwlVARToWYLJGkC5 V85uMkmuHMynqQUGK/ss1wRw45Ehs1HOtzOlJxajzIUVXT/cwUk3bAosb0i7Famq07Kr 0Jn3+Cpfk6NDHgzXsajOqTFnU+ri3H4a6tm58OhzgN24XbRe5CSK+XLmMzEwz0XPe79u 4UKbJwl9QI/J5K5WfYbBzCjUd+cYzWOxOqkC7pNssZhu0QP0qg6vrjKxTQZSCO7xMvS7 FW+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=XYRVfEbn; 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 r77-v6si1680054pfa.69.2018.11.26.14.38.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 14:38:45 -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=XYRVfEbn; 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 50E1721195BD7; Mon, 26 Nov 2018 14:38:39 -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::344; helo=mail-wm1-x344.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) (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 5CF992194D3AE for ; Mon, 26 Nov 2018 14:38:36 -0800 (PST) Received: by mail-wm1-x344.google.com with SMTP id j207so12811807wmj.1 for ; Mon, 26 Nov 2018 14:38:36 -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=XYRVfEbnxWbgKbG3yNP+zNZ4fsycRlxjQBQo9cSb7KJTC2GYKMaMuLDvTNT9GOMbp1 oOeZcHzjdp91PUa+QeCEXOb4N9DA4nKAJYdFnU7sQssD9ZumT3UzEF00174XXcPyqdmE PbHz71l0DupdlscOOHXPv8jYwsLduNpMSREI4= 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=E+EkSNVZN2f7WLZ3+6EzQ/I67sMvU6r4/0qD+pXdnA6auVgJxYet57f1WWN0Zhmv/Z 00UN+fsnHZK4W41LPtq9PfiIs3Au+pGgYGOVdGsQiXp2sR5D71Lx8XdVwQUgqhDg8wnw v+GZQgHhyKkqHwOa43bMKMqfGQu9R4I+azqFKnpvleLVGcfHERM937LvuDKXSAZ+iCvl 52qFqQkSK4nWYpo8Q88Sb5FTRRMkKApvBNEcU4gQ++9JHfSsmUlKn8PCxDMFm1jGhXRk 2b+MV9UmoXi4LPmedHd7be8u8o6fZ2nq83sk8YdozO2tlZ6CeWpVJXozU7E5vuoEaqyH O6zA== X-Gm-Message-State: AA+aEWY0j2o0JZ9xfO3pMaYSJULeIlCW9dWOhONaosqpPOqqRRN2qWIK bEf037bB1+K75VSTde1GvdVWQsclg1A= X-Received: by 2002:a1c:9314:: with SMTP id v20mr15024669wmd.15.1543271914550; Mon, 26 Nov 2018 14:38:34 -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.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 14:38:33 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Mon, 26 Nov 2018 23:37:54 +0100 Message-Id: <20181126223801.17121-7-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 06/13] 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 , 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 --- 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 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);