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::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-Google-Smtp-Source: AFSGD/XAaAXrdC8I7KwPQjx7wVW0sUqTEPKF1SGm/Y8DwQiZBkqKIZYNA7mw1992sielhj0hwVvKRw== 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 Cc: Ard Biesheuvel , Laszlo Ersek , Leif Lindholm , Eric Auger , Andrew Jones , Philippe Mathieu-Daude , Julien Grall 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: [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: , X-List-Received-Date: Wed, 28 Nov 2018 14:34:21 -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 --- ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf | 1 - ArmVirtPkg/PrePi/PrePi.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) 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); -- 2.19.1