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::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-Google-Smtp-Source: AFSGD/WTaH5KEdNBiNR7QrkyUQ1xRQnL3Rn5Pgcm6nisT6XjEUox7sqjtl90VdWIJ77NN1pJi7I/VQ== 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 Cc: Ard Biesheuvel , Laszlo Ersek , Leif Lindholm , Eric Auger , Andrew Jones , Philippe Mathieu-Daude , Julien Grall 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: [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: , X-List-Received-Date: Mon, 26 Nov 2018 22:38:36 -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