From patchwork Wed Nov 28 14:33:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 152282 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1164603ljp; Wed, 28 Nov 2018 06:34:46 -0800 (PST) X-Google-Smtp-Source: AFSGD/X3iKvimA/zxuWfK5+6CrAsrTmLbBte2d3xpazE+VB4A8Rxt8QJp49UcwCo3eQsayaUqhKh X-Received: by 2002:a17:902:4:: with SMTP id 4mr23671276pla.20.1543415685961; Wed, 28 Nov 2018 06:34:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543415685; cv=none; d=google.com; s=arc-20160816; b=whYWBISVoVGzuTYrwyNXUHE8ZyseyvImW+exzX29AKyLik7WIC5XrwbPbeS9FJb7m1 pphd4KriRA4Par5sPU/lCEA9SeNypsfWXnr8/HASR6Et3G8+Xfz3BydpTjTryWNJshhk k4uQA+ezE/YDFcQFtq+y+x2L0WsD08i5k7RirDTR/hDaswuazIIF7I+9mE4oLXkgEuSN 5mmWhTnBynZqfJrqgZ/eb7hY+TcOnjTKl8uoCUFV/Kp2JHULGLKw1oIcSAKOnizRqQrQ 145zMhu+Vi7JkJm2uWYzc/Xk8ZrNv0HRYAoD/udnWaJf7zQ4i6++k5dzlzzz0Xmukguy 3XDg== 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=ShehCmIwu+ByyTQU/LpWeoaQAXvMMM67Rv4GSkOinmU=; b=GFhX35PN/ymEcN+kYHxAw1Y7fbTzKvNswnYw3cw6skCJd4bFz33gGGc+e3vUqzkyI8 o45++zqC0M1WfpTrfhYzmPKSf/ur4s9EkyX4tMdgmI/8HeR97N5CncvHSM/XPej2mlmv L6dav9z23NxydxrbVe/FCWpeB0hUmBK0FAobGjdq9hZzrGEjNzalP6Gpp0nY5AU3uPUz BsoHrw16YYYzAxNrw+7F12lrH+qKvlvXOq8RCaiq3HQudZp84zZ2HjghfwTC3tKohRzs NRu8lJYvqU5GAU0yyZKA497s+C0YKXuR0YFCHjwKcSpnJT0UkeKk7QNEw8WXLLqys7EX fV+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=g+hBD1cL; 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 i18si6645766pgl.414.2018.11.28.06.34.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Nov 2018 06:34:45 -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=g+hBD1cL; 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 5012B21196224; Wed, 28 Nov 2018 06:34:21 -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 D73672119621C for ; Wed, 28 Nov 2018 06:34:18 -0800 (PST) Received: by mail-wm1-x341.google.com with SMTP id 125so2880032wmh.0 for ; Wed, 28 Nov 2018 06:34:18 -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=DmIC3LRgfDV9DiB4dlJpGn4KauqSXmeZm5QJ7+nO9O8=; b=g+hBD1cLA9QerVpxYHTRl3ifo9NeGNf2PVWk7XFFDBbPktmx6poIexfuv/kaOB7Sis EIMlsZet68o29zrbuEfBV54wb5VJuBG62w+CR2srz96ZqYOWXeq4CV49CHfbwwG9sWWd yhW8siJqsyFlSLa4x/LBiVWL74jdJyLG8Ti6E= 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=DmIC3LRgfDV9DiB4dlJpGn4KauqSXmeZm5QJ7+nO9O8=; b=W4q5hrS/p0AhlwM/OZmIv4kvqb/SBgOfb+2qAN4eibOunJaj1dY9Imbz+Ws4NsmlQ9 zjYBTnONF1t3q0iDw6zINtBQd14lr+f7Qb0BoYCbtDSEKQX11sUwCLI7SJgDOEPvdaaj /dyVdxeY2t+QA65roiTMYbaDo64sRCHudCvIIeRYuR6pbB+yF/ELJmRrLFDUBpgReE5i 5238deGbKK4+Y5kJPzUmG68rwTECcAcB2Wk8y18dkpzQm9fstuGGou3nCD5JVqjsaFdU a6u1UaXo9etT8f6BaXhVc66c0BijKH38bCBtIy2IwPFQK6ey+hIYaJanx+hmLM1v0wsR Vxvg== X-Gm-Message-State: AA+aEWbCe/nsDSl+UP9zmRHx+cGxIRhTigVoEmcTP26nZ2sS8TR2r42L MsWNOsw4FzY3MoFA6Jbowm46QBdJN7Y= X-Received: by 2002:a7b:ca53:: with SMTP id m19mr3194157wml.102.1543415657169; Wed, 28 Nov 2018 06:34:17 -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.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Nov 2018 06:34:16 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Wed, 28 Nov 2018 15:33:51 +0100 Message-Id: <20181128143357.991-11-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 10/16] ArmPlatformPkg/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 --- ArmPlatformPkg/PrePi/PeiMPCore.inf | 1 - ArmPlatformPkg/PrePi/PeiUniCore.inf | 1 - ArmPlatformPkg/PrePi/PrePi.c | 2 +- 3 files changed, 1 insertion(+), 3 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 Reviewed-by: Leif Lindholm diff --git a/ArmPlatformPkg/PrePi/PeiMPCore.inf b/ArmPlatformPkg/PrePi/PeiMPCore.inf index 242b03175536..7e2ad6fc483d 100644 --- a/ArmPlatformPkg/PrePi/PeiMPCore.inf +++ b/ArmPlatformPkg/PrePi/PeiMPCore.inf @@ -97,7 +97,6 @@ [FixedPcd] gArmPlatformTokenSpaceGuid.PcdCoreCount - gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory diff --git a/ArmPlatformPkg/PrePi/PeiUniCore.inf b/ArmPlatformPkg/PrePi/PeiUniCore.inf index a45cdef4ed91..26328b7e8f67 100644 --- a/ArmPlatformPkg/PrePi/PeiUniCore.inf +++ b/ArmPlatformPkg/PrePi/PeiUniCore.inf @@ -90,7 +90,6 @@ [FixedPcd] gArmPlatformTokenSpaceGuid.PcdCoreCount - gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory diff --git a/ArmPlatformPkg/PrePi/PrePi.c b/ArmPlatformPkg/PrePi/PrePi.c index 02cff7ddc204..245bdded1eb3 100644 --- a/ArmPlatformPkg/PrePi/PrePi.c +++ b/ArmPlatformPkg/PrePi/PrePi.c @@ -115,7 +115,7 @@ PrePiMain ( BuildStackHob (StacksBase, StacksSize); //TODO: Call CpuPei as a library - BuildCpuHob (PcdGet8 (PcdPrePiCpuMemorySize), PcdGet8 (PcdPrePiCpuIoSize)); + BuildCpuHob (ArmGetPhysicalAddressBits (), PcdGet8 (PcdPrePiCpuIoSize)); if (ArmIsMpCore ()) { // Only MP Core platform need to produce gArmMpCoreInfoPpiGuid