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::441; helo=mail-wr1-x441.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) (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 0227C2119377F for ; Mon, 26 Nov 2018 14:38:34 -0800 (PST) Received: by mail-wr1-x441.google.com with SMTP id t27so12698331wra.6 for ; Mon, 26 Nov 2018 14:38:34 -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=aOfyM45+wXu2D4ZWpbiTjfLYxH+v8dxNjmP/lZsQ+oq6WrrV/E1qt3RwNC6xc1csDw VtsVSz7wJ306mdb5lrOILNmcqA4pmDi2dI3n2R7OkEE21x5GmUJNqqYMg44vzW3aCZOs yfAGKtsEbv2WQgcCdReWASGYQ7j9E3fiJVQSo= 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=niDOpXcVxBHwwpYtZ9+ItLUX/H6xBvTFZDr0qTa4BSVpXqlhoRUvTMUl78DcCSIArW kEdWNmZp6X5T1u1l/vyEXg3DEPPmpNc99tfk1NiZcZBoWVUb2gsStXfaVQLEXCIOtScc B1z8nA14wDYz1GG/eG73S2IxiFSektponNFxHwBTWPywBAy5HJIbSS22WufH5ToMGnOv Y71jwNJwtwekpqCG/dGABiGVUqL+xi1HXLRJBqVvwiv3FBCyLHICYnhQRnyG3JtVNCJl 5n8M9n2cxkEbppfnY2YnMx0IZrT8yhY06dymWZ9zpr2YJ11++D5VSU4kNRt4yZCkPURl 4jDg== X-Gm-Message-State: AA+aEWbsc2EyLNOMg/cPpip4lKBOhrt41cVvJrSa7RdbaN91PzRSJuG1 7lj1SCa+yIXG+YOHD7FQCBtqnWRDGps= X-Google-Smtp-Source: AFSGD/U3Fn9GuQlHt7rEsH8RxCKNgaH5HzLb4jCbDHSaQFPFhrc00MbyoOQRnyRPJ4vLW4TClIwLiQ== X-Received: by 2002:adf:a14d:: with SMTP id r13mr293079wrr.169.1543271913145; Mon, 26 Nov 2018 14:38:33 -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.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 14:38:32 -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:53 +0100 Message-Id: <20181126223801.17121-6-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 05/13] 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: , X-List-Received-Date: Mon, 26 Nov 2018 22:38:35 -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 --- ArmPlatformPkg/PrePi/PeiMPCore.inf | 1 - ArmPlatformPkg/PrePi/PeiUniCore.inf | 1 - ArmPlatformPkg/PrePi/PrePi.c | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) 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 -- 2.19.1