From patchwork Mon Nov 26 22:37:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 152081 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp465434ljp; Mon, 26 Nov 2018 14:38:30 -0800 (PST) X-Google-Smtp-Source: AFSGD/UjH5tk6zQ8enbRPtMUkEU0Y74/57wsKkyuCIarm+uPHtwtX23DjaN7zgSp/4e65hCZnH+k X-Received: by 2002:a63:604f:: with SMTP id u76mr23794086pgb.401.1543271910706; Mon, 26 Nov 2018 14:38:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543271910; cv=none; d=google.com; s=arc-20160816; b=oOFct04AJzOj5mc2DaqPJM9g3jEe6QGHu/MQZ8TETB2bM5qntn57irHt9Pf1Y13lLP MlH7KhTqrK7/dgPs3G0FWxr/RCpA7Is5Rh/cnm6D5rWvUaSOSkVZMbYxzVY3MUlKM3Ts 4oMaXpPneVBmshTwBuZCeor6bQ15mHfcc0e/7znCxdfl242pjfemfL4tH37xCpySKr1I UhNn3aDogf4tAAGDM3A1jXY5pkLv55Lr7miyMS29EAFlI6mRkiruNhtZxX/EL4eN30lr WZiceYcyU0+lM/x7SEMejy1My38UH4tQ60mQNlfilZ8kh0DU0b1sjIiA+YOF1ZTcMyx1 Rt1w== 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=8irZ50mYeds35FmT9JsHhHu6J6jrvsvAOdMGA9/XU88=; b=h3DFCOu1vaMf04jDiT88jnoH98FauM/kFBnYBrNCnglhUPChGKw0QVjygC5+wu+Izq mWZwjR57px3Rx9F3xQtRgia9IoMFihyPGjLZvrBDndKAwhGL9WRCc7XJltflPPzvnCgH i9Xvnvo9GYotgn4X1oQiojeZ0fnu6h8ECMK6KaGMDkCLXrV/d8y2brEwin7Khmc8FpHZ GF0hHckGwhcSFfQ1z8j0X/unlrGqELRrJoYsRQn4qARsnbbmYwH6hd7CzXEHevFY0V9Y BGsB5WQ+JeD+ahyIzBwJ0666ge7aDm64qeEvNqmjUFx+FkfTQtYZSMZBGib2erbXkoN+ BJ0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=PVkigk1r; 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 b3si1638772pgc.587.2018.11.26.14.38.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 14:38:30 -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=PVkigk1r; 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 526E421195BC6; Mon, 26 Nov 2018 14:38:30 -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::342; helo=mail-wm1-x342.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) (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 BFF0A21B02822 for ; Mon, 26 Nov 2018 14:38:28 -0800 (PST) Received: by mail-wm1-x342.google.com with SMTP id j207so12811566wmj.1 for ; Mon, 26 Nov 2018 14:38:28 -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=aYnHk1FahDlTiadS/Wd3xqjc/XFbp1D+Z5OcvD3RCRQ=; b=PVkigk1rwGoQ9BiUfDbtjuW7yN+CI+fCtVzlh2kv0kH/Jcy7ENgKOzAPMJaGAI0MIp H3uvZ0eqqc9+2iOqOjpmSjuiseRbUmSzXYZHNr5TeazzRKQ7dDjpPagvuWadyLkXMyrl K0FE4A/vVir0Q/wnQrXuC8N99Be81TFrxTnMA= 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=aYnHk1FahDlTiadS/Wd3xqjc/XFbp1D+Z5OcvD3RCRQ=; b=unEzYXU2wzGUxUgOQMrM98zSNgPbsgYI8/SAP7tGO11WyUml0e2FHaBQq4DSeedY9u vanM1hQcLN3VxuNEAPeXgTGBjN+JkZp5Zc9pkW1uOmxAKOMh22DK174X4GMYXyy578Ys MahA4OnPIstxc0CBfxUpM+BmJSvaFBdg/aW+kAw69ZhwsuPI0Eb05VRyy/uUR3uxJvEM 9LrFM6N+/tIfink7/vPwnOxdmxdhQ8HRbQSwuI8Z8Nw+e44BrV8g+tbuQ5ugwiUW8ii+ Hr+Q7ExXLvXC4V/VOxbgDCZsrgCoBtE6GHc9nFE085H8ZdwIu4Is8kjyu70Px5Tg4HcG ImlA== X-Gm-Message-State: AA+aEWbejSqCybBjacC0R7uozbBGLg544AuPngpdNfAafoKWNcMJ3O4Y 3hR6zGDTc+6FEQotYC3X9ZkMxW+NREk= X-Received: by 2002:a1c:8484:: with SMTP id g126mr14028797wmd.117.1543271906932; Mon, 26 Nov 2018 14:38:26 -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.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 14:38:25 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Mon, 26 Nov 2018 23:37:49 +0100 Message-Id: <20181126223801.17121-2-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 01/13] ArmPkg/ArmLib: add support for reading the max physical address space size 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" Add a helper function that returns the maximum physical address space size as supported by the current CPU. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- ArmPkg/Include/Library/ArmLib.h | 17 +++++++++++++++++ ArmPkg/Library/ArmLib/AArch64/ArmLibSupport.S | 16 ++++++++++++++++ ArmPkg/Library/ArmLib/Arm/ArmLibSupport.S | 8 ++++++++ 3 files changed, 41 insertions(+) -- 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é diff --git a/ArmPkg/Include/Library/ArmLib.h b/ArmPkg/Include/Library/ArmLib.h index ffda50e9d767..b22879fe6e94 100644 --- a/ArmPkg/Include/Library/ArmLib.h +++ b/ArmPkg/Include/Library/ArmLib.h @@ -29,6 +29,17 @@ #define EFI_MEMORY_CACHETYPE_MASK (EFI_MEMORY_UC | EFI_MEMORY_WC | \ EFI_MEMORY_WT | EFI_MEMORY_WB | \ EFI_MEMORY_UCE) +// +// ARM_MMU_IDMAP_RANGE defines the maximum size of the identity mapping +// that covers the entire address space when running in UEFI. This is +// limited to what can architecturally be mapped using a 4 KB granule, +// even if the hardware is capable of mapping more using larger pages. +// +#ifdef MDE_CPU_ARM +#define ARM_MMU_IDMAP_RANGE (1ULL << 32) +#else +#define ARM_MMU_IDMAP_RANGE (1ULL << 48) +#endif /** * The UEFI firmware must not use the ARM_MEMORY_REGION_ATTRIBUTE_NONSECURE_* attributes. @@ -733,4 +744,10 @@ ArmWriteCntvOff ( UINT64 Val ); +UINTN +EFIAPI +ArmGetPhysicalAddressBits ( + VOID + ); + #endif // __ARM_LIB__ diff --git a/ArmPkg/Library/ArmLib/AArch64/ArmLibSupport.S b/ArmPkg/Library/ArmLib/AArch64/ArmLibSupport.S index 1ef2f61f5979..7332601241aa 100644 --- a/ArmPkg/Library/ArmLib/AArch64/ArmLibSupport.S +++ b/ArmPkg/Library/ArmLib/AArch64/ArmLibSupport.S @@ -196,4 +196,20 @@ ASM_FUNC(ArmWriteSctlr) 3:msr sctlr_el3, x0 4:ret +ASM_FUNC(ArmGetPhysicalAddressBits) + mrs x0, id_aa64mmfr0_el1 + adr x1, .LPARanges + and x0, x0, #7 + ldrb w0, [x1, x0] + ret + +// +// Bits 0..2 of the AA64MFR0_EL1 system register encode the size of the +// physical address space support on this CPU: +// 0 == 32 bits, 1 == 36 bits, etc etc +// 6 and 7 are reserved +// +.LPARanges: + .byte 32, 36, 40, 42, 44, 48, 52, -1 + ASM_FUNCTION_REMOVE_IF_UNREFERENCED diff --git a/ArmPkg/Library/ArmLib/Arm/ArmLibSupport.S b/ArmPkg/Library/ArmLib/Arm/ArmLibSupport.S index f2a517671f0a..f2f3c9a25991 100644 --- a/ArmPkg/Library/ArmLib/Arm/ArmLibSupport.S +++ b/ArmPkg/Library/ArmLib/Arm/ArmLibSupport.S @@ -165,4 +165,12 @@ ASM_FUNC(ArmWriteCpuActlr) isb bx lr +ASM_FUNC (ArmGetPhysicalAddressBits) + mrc p15, 0, r0, c0, c1, 4 // MMFR0 + and r0, r0, #0xf // VMSA [3:0] + cmp r0, #5 // >5 implies LPAE support + movlt r0, #32 // 32 bits if no LPAE + movge r0, #40 // 40 bits if LPAE + bx lr + ASM_FUNCTION_REMOVE_IF_UNREFERENCED From patchwork Mon Nov 26 22:37:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 152082 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp465477ljp; Mon, 26 Nov 2018 14:38:33 -0800 (PST) X-Google-Smtp-Source: AFSGD/VL6pe2Ns0UvIDQp4Ci8e5E3iD51xNoATCuK0/FYBf16Sig+yJmZSRcWCKAPAW6/iG+PMS4 X-Received: by 2002:a17:902:be0c:: with SMTP id r12mr16785540pls.299.1543271913056; Mon, 26 Nov 2018 14:38:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543271913; cv=none; d=google.com; s=arc-20160816; b=eVIVuSKdmAzMyWZDSWPjTzvMx2bm7ZsD2wkM+C1blO198BXhIwIPIEg7nzu4e21iBz CirM3PLR1+udU99+Z4oUPznq4v1jbUPygGhjLIdi0AQLZnnvrgiNCTPdS2Oku0nJ79Qk AkuXycHYWpREh/pU4+Y8ObbMEPSoZhRuf0Z7yi4pA1ZiINTueD9C+kyj+bjRVOLxAmle plRqzQ3qGBU+B+UQSHUFqIz9/422RjUGkULdmGk2Hr+1hlmnaMjOuIS64jz7OoZegSBo p+DWm2hjpRL5ZuI3mlV3chGUPOJ5bXLuzmCqtg7YtzenLAoqYF99NbRBfMft3gB+ga1R 1ejA== 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=CCt+f6QN9bqGLiPb/MCEHaI6QkwclJJNxcLlQri8ZV4=; b=A1VzvWc8hELZKNvx17Oj3Y9GwPWmruc880NMZv7K9HxflHfB8Dc+4XfFklNofcAknf FPFM6qtVoT0ptdFc3AwFf5SGeW0Y/OKiqYDzwU9CXh5mAcSYU9GI3wUq51WZRAAhD1c0 C/ajAAegs2T9uQ1Ek1XCvzcewNQBEd+zqJW4drH0m8MBxliNctIDX6c4y8f1vMP1BWpf Z4HWZ5DvZAyZwtwz6wb9c4Mlko8LT7V2NUuThQGJI1DrVXlAKACuKW25jF6sdGxqrNTA uakgNRu6ltMb1To2AzH7ba1T5PbIrvKXauLLdnB0gMILc5AvOfvETUIzRNk7akuzmP4L NVVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=VEFCRhE0; 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 k11si1606823pgg.430.2018.11.26.14.38.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 14:38:33 -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=VEFCRhE0; 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 858F521195BCC; Mon, 26 Nov 2018 14:38:32 -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::343; helo=mail-wm1-x343.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) (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 E7EA72119377F for ; Mon, 26 Nov 2018 14:38:30 -0800 (PST) Received: by mail-wm1-x343.google.com with SMTP id c126so20171642wmh.0 for ; Mon, 26 Nov 2018 14:38:30 -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=8eFcxXF0XgOS+G+mF3nhx0I+1koThYP2kjgeg3TYCGg=; b=VEFCRhE0RQZPVzLJtBB18CQTTApkFfxkQuFTh5nCnKEg+hc+gVYuqOufkz1cevXOef SL3zTlGMrUdTiaYmzvehYZO8diNwkzrWphNNJh4VRIkHHEKQrcp5G2zPSuihRePLhTHv L12tFiUIVtMDD3PYEI9zUahjfBW46kfZsTBSE= 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=8eFcxXF0XgOS+G+mF3nhx0I+1koThYP2kjgeg3TYCGg=; b=R88YRzcDwfNHp0o+TzFCgDWFpY+pFCMK5kJKKLusOTXhYbI3F2fX8ZiOyxCVKN6prw OoXZ70a0UhOu6YFmB3MJH0QqTKNRyzFWDg3aZCf0Q1lqJe3wkQQ/AXLLJb28v34lTfRt q2dZFFUNu8Gb4sDNzAM+r75hlNVKKerfnPBxVKDfqUeBsU1VqL+WIm56Y+F2L4zyfBfK oqj1DbbL38GQB4O4NvOkRNP/Y0UOGvAW0xAmh3LKr5UbfkF13rdIa1II9TZMUKGiCep2 PCGOTJBJt5npe3nmWaK3vQnbx2JqyYpR/XDkwShpGmKiUy/aLiha6HfwZTFImF9TEUgy RCww== X-Gm-Message-State: AA+aEWYkfE3leGcY4QiWXZ/KBKDY5+VynewpO7xA/EMDQqHNUq440K2s y5BenFXHLwf80l91RpmYGOj4IXKSPa4= X-Received: by 2002:a1c:8302:: with SMTP id f2mr4632765wmd.9.1543271908713; Mon, 26 Nov 2018 14:38:28 -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.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 14:38:27 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Mon, 26 Nov 2018 23:37:50 +0100 Message-Id: <20181126223801.17121-3-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 02/13] ArmVirtPkg: refactor reading of the physical address space size 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" In preparation of dropping the hardcoded 40-bit limit on the physical address space when running under virtualization, let's refactor the code a bit so we read the hardware limit in a single place. Note that the hardware capabilities may exceed what the architecture permits when using 4 KB pages, so we need to take ARM_MMU_IDMAP_RANGE into account as well. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.inf | 6 --- ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLib.inf | 6 --- ArmVirtPkg/Library/XenVirtMemInfoLib/XenVirtMemInfoLib.inf | 6 --- ArmVirtPkg/Include/Library/ArmVirtMemInfoLib.h | 1 + ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.c | 5 ++- ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.c | 8 +--- ArmVirtPkg/Library/XenVirtMemInfoLib/XenVirtMemInfoLib.c | 8 +--- ArmVirtPkg/Library/QemuVirtMemInfoLib/AArch64/PhysAddrTop.S | 39 -------------------- ArmVirtPkg/Library/QemuVirtMemInfoLib/Arm/PhysAddrTop.S | 24 ------------ ArmVirtPkg/Library/XenVirtMemInfoLib/AArch64/PhysAddrTop.S | 39 -------------------- ArmVirtPkg/Library/XenVirtMemInfoLib/Arm/PhysAddrTop.S | 24 ------------ 11 files changed, 9 insertions(+), 157 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/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.inf b/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.inf index c72a97f9e78a..f2c461e3b55a 100644 --- a/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.inf +++ b/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.inf @@ -24,12 +24,6 @@ [Defines] [Sources] QemuVirtMemInfoLib.c -[Sources.ARM] - Arm/PhysAddrTop.S - -[Sources.AARCH64] - AArch64/PhysAddrTop.S - [Packages] ArmPkg/ArmPkg.dec ArmVirtPkg/ArmVirtPkg.dec diff --git a/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLib.inf b/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLib.inf index e4032d3efb53..f54fb51ee1d4 100644 --- a/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLib.inf +++ b/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLib.inf @@ -26,12 +26,6 @@ [Sources] QemuVirtMemInfoLib.c QemuVirtMemInfoPeiLibConstructor.c -[Sources.ARM] - Arm/PhysAddrTop.S - -[Sources.AARCH64] - AArch64/PhysAddrTop.S - [Packages] ArmPkg/ArmPkg.dec ArmVirtPkg/ArmVirtPkg.dec diff --git a/ArmVirtPkg/Library/XenVirtMemInfoLib/XenVirtMemInfoLib.inf b/ArmVirtPkg/Library/XenVirtMemInfoLib/XenVirtMemInfoLib.inf index cd4c805a4db9..ae107810e927 100644 --- a/ArmVirtPkg/Library/XenVirtMemInfoLib/XenVirtMemInfoLib.inf +++ b/ArmVirtPkg/Library/XenVirtMemInfoLib/XenVirtMemInfoLib.inf @@ -24,12 +24,6 @@ [Defines] [Sources] XenVirtMemInfoLib.c -[Sources.ARM] - Arm/PhysAddrTop.S - -[Sources.AARCH64] - AArch64/PhysAddrTop.S - [Packages] ArmPkg/ArmPkg.dec ArmVirtPkg/ArmVirtPkg.dec diff --git a/ArmVirtPkg/Include/Library/ArmVirtMemInfoLib.h b/ArmVirtPkg/Include/Library/ArmVirtMemInfoLib.h index bdf1c513bc6d..15562b35c730 100644 --- a/ArmVirtPkg/Include/Library/ArmVirtMemInfoLib.h +++ b/ArmVirtPkg/Include/Library/ArmVirtMemInfoLib.h @@ -35,6 +35,7 @@ VOID EFIAPI ArmVirtGetMemoryMap ( + IN EFI_PHYSICAL_ADDRESS TopOfAddressSpace, OUT ARM_MEMORY_REGION_DESCRIPTOR **VirtualMemoryMap ); diff --git a/ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.c b/ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.c index 05afd1282422..f8c8af987d20 100644 --- a/ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.c +++ b/ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.c @@ -15,6 +15,7 @@ #include +#include #include #include #include @@ -39,7 +40,9 @@ InitMmu ( RETURN_STATUS Status; // Get Virtual Memory Map from the Platform Library - ArmVirtGetMemoryMap (&MemoryTable); + ArmVirtGetMemoryMap (MIN (LShiftU64 (1ULL, ArmGetPhysicalAddressBits ()), + ARM_MMU_IDMAP_RANGE), + &MemoryTable); //Note: Because we called PeiServicesInstallPeiMemory() before to call InitMmu() the MMU Page Table resides in // DRAM (even at the top of DRAM as it is the first permanent memory allocation) diff --git a/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.c b/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.c index 760bcc169cf4..a80454c4802e 100644 --- a/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.c +++ b/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.c @@ -21,11 +21,6 @@ // Number of Virtual Memory Map Descriptors #define MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS 5 -EFI_PHYSICAL_ADDRESS -ArmGetPhysAddrTop ( - VOID - ); - /** Return the Virtual Memory Map of your platform @@ -41,6 +36,7 @@ ArmGetPhysAddrTop ( **/ VOID ArmVirtGetMemoryMap ( + IN EFI_PHYSICAL_ADDRESS TopOfAddressSpace, OUT ARM_MEMORY_REGION_DESCRIPTOR **VirtualMemoryMap ) { @@ -80,7 +76,7 @@ ArmVirtGetMemoryMap ( // Peripheral space after DRAM TopOfMemory = MIN (1ULL << FixedPcdGet8 (PcdPrePiCpuMemorySize), - ArmGetPhysAddrTop ()); + TopOfAddressSpace); VirtualMemoryTable[2].PhysicalBase = VirtualMemoryTable[0].Length + VirtualMemoryTable[1].Length; VirtualMemoryTable[2].VirtualBase = VirtualMemoryTable[2].PhysicalBase; VirtualMemoryTable[2].Length = TopOfMemory - diff --git a/ArmVirtPkg/Library/XenVirtMemInfoLib/XenVirtMemInfoLib.c b/ArmVirtPkg/Library/XenVirtMemInfoLib/XenVirtMemInfoLib.c index 88ff3167cbfd..3d4e3e38c3f1 100644 --- a/ArmVirtPkg/Library/XenVirtMemInfoLib/XenVirtMemInfoLib.c +++ b/ArmVirtPkg/Library/XenVirtMemInfoLib/XenVirtMemInfoLib.c @@ -18,11 +18,6 @@ STATIC ARM_MEMORY_REGION_DESCRIPTOR mVirtualMemoryTable[2]; -EFI_PHYSICAL_ADDRESS -ArmGetPhysAddrTop ( - VOID - ); - /** Return the Virtual Memory Map of your platform @@ -39,6 +34,7 @@ ArmGetPhysAddrTop ( VOID EFIAPI ArmVirtGetMemoryMap ( + IN EFI_PHYSICAL_ADDRESS TopOfAddressSpace, OUT ARM_MEMORY_REGION_DESCRIPTOR **VirtualMemoryMap ) { @@ -51,7 +47,7 @@ ArmVirtGetMemoryMap ( // mVirtualMemoryTable[0].PhysicalBase = 0x0; mVirtualMemoryTable[0].VirtualBase = 0x0; - mVirtualMemoryTable[0].Length = ArmGetPhysAddrTop (); + mVirtualMemoryTable[0].Length = TopOfAddressSpace; mVirtualMemoryTable[0].Attributes = ARM_MEMORY_REGION_ATTRIBUTE_WRITE_BACK; mVirtualMemoryTable[1].PhysicalBase = 0x0; diff --git a/ArmVirtPkg/Library/QemuVirtMemInfoLib/AArch64/PhysAddrTop.S b/ArmVirtPkg/Library/QemuVirtMemInfoLib/AArch64/PhysAddrTop.S deleted file mode 100644 index a1f6a194d59b..000000000000 --- a/ArmVirtPkg/Library/QemuVirtMemInfoLib/AArch64/PhysAddrTop.S +++ /dev/null @@ -1,39 +0,0 @@ -# -# Copyright (c) 2011-2013, ARM Limited. All rights reserved. -# Copyright (c) 2016-2017, Linaro Limited. All rights reserved. -# -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# - -#include - -//EFI_PHYSICAL_ADDRESS -//GetPhysAddrTop ( -// VOID -// ); -ASM_FUNC(ArmGetPhysAddrTop) - mrs x0, id_aa64mmfr0_el1 - adr x1, .LPARanges - and x0, x0, #7 - ldrb w1, [x1, x0] - mov x0, #1 - lsl x0, x0, x1 - ret - -// -// Bits 0..2 of the AA64MFR0_EL1 system register encode the size of the -// physical address space support on this CPU: -// 0 == 32 bits, 1 == 36 bits, etc etc -// 6 and 7 are reserved -// -.LPARanges: - .byte 32, 36, 40, 42, 44, 48, -1, -1 - -ASM_FUNCTION_REMOVE_IF_UNREFERENCED diff --git a/ArmVirtPkg/Library/QemuVirtMemInfoLib/Arm/PhysAddrTop.S b/ArmVirtPkg/Library/QemuVirtMemInfoLib/Arm/PhysAddrTop.S deleted file mode 100644 index 9cd81529fb3d..000000000000 --- a/ArmVirtPkg/Library/QemuVirtMemInfoLib/Arm/PhysAddrTop.S +++ /dev/null @@ -1,24 +0,0 @@ -# -# Copyright (c) 2011-2013, ARM Limited. All rights reserved. -# Copyright (c) 2014-2017, Linaro Limited. All rights reserved. -# -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# - -#include - -//EFI_PHYSICAL_ADDRESS -//GetPhysAddrTop ( -// VOID -// ); -ASM_FUNC(ArmGetPhysAddrTop) - mov r0, #0x00000000 - mov r1, #0x10000 - bx lr diff --git a/ArmVirtPkg/Library/XenVirtMemInfoLib/AArch64/PhysAddrTop.S b/ArmVirtPkg/Library/XenVirtMemInfoLib/AArch64/PhysAddrTop.S deleted file mode 100644 index a1f6a194d59b..000000000000 --- a/ArmVirtPkg/Library/XenVirtMemInfoLib/AArch64/PhysAddrTop.S +++ /dev/null @@ -1,39 +0,0 @@ -# -# Copyright (c) 2011-2013, ARM Limited. All rights reserved. -# Copyright (c) 2016-2017, Linaro Limited. All rights reserved. -# -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# - -#include - -//EFI_PHYSICAL_ADDRESS -//GetPhysAddrTop ( -// VOID -// ); -ASM_FUNC(ArmGetPhysAddrTop) - mrs x0, id_aa64mmfr0_el1 - adr x1, .LPARanges - and x0, x0, #7 - ldrb w1, [x1, x0] - mov x0, #1 - lsl x0, x0, x1 - ret - -// -// Bits 0..2 of the AA64MFR0_EL1 system register encode the size of the -// physical address space support on this CPU: -// 0 == 32 bits, 1 == 36 bits, etc etc -// 6 and 7 are reserved -// -.LPARanges: - .byte 32, 36, 40, 42, 44, 48, -1, -1 - -ASM_FUNCTION_REMOVE_IF_UNREFERENCED diff --git a/ArmVirtPkg/Library/XenVirtMemInfoLib/Arm/PhysAddrTop.S b/ArmVirtPkg/Library/XenVirtMemInfoLib/Arm/PhysAddrTop.S deleted file mode 100644 index 9cd81529fb3d..000000000000 --- a/ArmVirtPkg/Library/XenVirtMemInfoLib/Arm/PhysAddrTop.S +++ /dev/null @@ -1,24 +0,0 @@ -# -# Copyright (c) 2011-2013, ARM Limited. All rights reserved. -# Copyright (c) 2014-2017, Linaro Limited. All rights reserved. -# -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# - -#include - -//EFI_PHYSICAL_ADDRESS -//GetPhysAddrTop ( -// VOID -// ); -ASM_FUNC(ArmGetPhysAddrTop) - mov r0, #0x00000000 - mov r1, #0x10000 - bx lr From patchwork Mon Nov 26 22:37:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 152083 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp465501ljp; Mon, 26 Nov 2018 14:38:35 -0800 (PST) X-Google-Smtp-Source: AFSGD/UNW7WgHLejbLOvgB5hlMhrSUyTCtIcN26rTbLmYTV/pzomO3mjYJUZZzn2FchtnbnQdLSy X-Received: by 2002:a63:bf0b:: with SMTP id v11mr27289584pgf.302.1543271915798; Mon, 26 Nov 2018 14:38:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543271915; cv=none; d=google.com; s=arc-20160816; b=SLfvMbvm5WmcCUGoky6vUUJR3lol7nLFLTNtNfti7NzkBRmlgNKzk3uo803GR2wX5G WPnGSRp5FXAwABhIeLft/AI1BrE+JBnSQsFxdsf8BJ9j75ipJndus1aFUUC5M+ZouaxZ ZxfbyRaEPRCnJf5j3XTd/iK/pJYS/YLN2++klszMzu2bia4lwXOuwE2tgkcgra+zfqQP +S6BNec+kmYBR8e84PtAuzO3KuPENJvZWgRHhYyCEc27hZtBoP2BnSnEbUjRYyRNRdJu QXrUn8QB5gGP8oS0P/1V9I/AUTdAtGV1nGK4XGPc2PV23YV2dO/0pp+LkTTk07KlSrs7 LckQ== 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=DvFWsefI+JnwwOxDdGDPbsmLoTFcv6Yx+qtYBNgG7Bo=; b=ZQbboS9PQWc94fR1C/I/u3rSiAj3+I+9bis1BtkHfejk5Xs8EmYZGVSAdTnWMai4pO yDEAo1mAUKtJtqn1bZe6U4ogq2393gIGmrOr046mLNu1ShDJB+fZ2s9ZabqTGZngjsGt g+H/Zqy5mLHyIM/VAFCvynAOQJFLI0/zmAWb1HgZkmavvlWkXrabq1BIei+wty79NoaO WlVrYrIuxhg0uMiiFRCKWGpUhOvlb6s0GRC8kdguwzdIMWHdvPQeWmxIb9rHlqRFUJbI Quj7Lewc0rgWt4ushTDM27jfC6KQrS8XRN9bZCpEQEwEO3kGrHZ7j3odVKLwwxzpx9HP AthQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=MOW9FB23; 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 f4si1581783plf.370.2018.11.26.14.38.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 14:38:35 -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=MOW9FB23; 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 B745A21195BC1; Mon, 26 Nov 2018 14:38:33 -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::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 4905921195BC9 for ; Mon, 26 Nov 2018 14:38:32 -0800 (PST) Received: by mail-wr1-x441.google.com with SMTP id v13so17200752wrw.5 for ; Mon, 26 Nov 2018 14:38:32 -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=U1egfUx3wEWaThtxyV8AThFJr6LCRN0RWUmzwpQcVPM=; b=MOW9FB23KpCTTku1lhvtpBqsZxLqH797+zfQlbR4e7AKONMQO0lXiThUnztaPNiIxA LScvr7Tu79GtuK8d1D4qp6hEVZkMp4yxd1Ra3nrCiUF1yJ9kLcZeGww0ZXY9TM7LZAoI FYOm3o5iOuybZAtQlTJWXVx//WMmafYYUFSQM= 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=U1egfUx3wEWaThtxyV8AThFJr6LCRN0RWUmzwpQcVPM=; b=mGyk7pi1R2xx912QUiMb7Bch8u4AqKmEI4+sYQLZZgzAAU3f1XQUV4mEQNNSGMxJOx SSGkpe/UhNpT/5yrwidT4kI6LyCHyydq+6HFgPOOwZIYFQFi2li2D10uUGPFjQMHL2Mw CInUD820FzBaERhTG8lfIezx6d9G74YgBgqaFD4/TOcg5KxqPeFWioAHcshncs8choI7 HV28a4uNTmX2D57Oi/LAhgjBkQ7S7JJ+MQjqgKEJSWrw5wEc3/83EF8Ihag1RyfSXcg3 TuvoL7N3Z37igGH+4HB5rCV/CEUkWxqIOuucBbElvD/99fax4h7LP+2XlRwbLlOYz6yX wJTw== X-Gm-Message-State: AA+aEWaznodR/DQSIuazY2O+cRcd1Ofyrlvyel221dpwyagUWODgecPd bbpKslsomennw3WJdwhEz3Y61mhHUds= X-Received: by 2002:adf:ec50:: with SMTP id w16mr25927372wrn.171.1543271910456; Mon, 26 Nov 2018 14:38:30 -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.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 14:38:29 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Mon, 26 Nov 2018 23:37:51 +0100 Message-Id: <20181126223801.17121-4-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 03/13] ArmPkg/ArmMmuLib: take the CPU supported maximum PA space into account 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" In preparation of dropping PcdPrePiCpuMemorySize entirely, base the maximum size of the identity map on the capabilities of the CPU. Since that may exceed what is architecturally permitted when using 4 KB pages, take ARM_MMU_IDMAP_RANGE into account as well. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf | 3 --- ArmPkg/Library/ArmMmuLib/ArmMmuPeiLib.inf | 3 --- ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c | 11 +++++++++-- 3 files changed, 9 insertions(+), 8 deletions(-) -- 2.19.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf b/ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf index b9f264de8d26..246963361e45 100644 --- a/ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf +++ b/ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf @@ -40,8 +40,5 @@ [LibraryClasses] CacheMaintenanceLib MemoryAllocationLib -[Pcd.AARCH64] - gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize - [Pcd.ARM] gArmTokenSpaceGuid.PcdNormalMemoryNonshareableOverride diff --git a/ArmPkg/Library/ArmMmuLib/ArmMmuPeiLib.inf b/ArmPkg/Library/ArmMmuLib/ArmMmuPeiLib.inf index ecf13f790734..f689c193b862 100644 --- a/ArmPkg/Library/ArmMmuLib/ArmMmuPeiLib.inf +++ b/ArmPkg/Library/ArmMmuLib/ArmMmuPeiLib.inf @@ -35,6 +35,3 @@ [LibraryClasses] ArmLib CacheMaintenanceLib MemoryAllocationLib - -[Pcd.AARCH64] - gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize diff --git a/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c b/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c index 4b62ecb6a476..c1c72358ec8d 100644 --- a/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c +++ b/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c @@ -604,8 +604,15 @@ ArmConfigureMmu ( return EFI_INVALID_PARAMETER; } - // Cover the entire GCD memory space - MaxAddress = (1UL << PcdGet8 (PcdPrePiCpuMemorySize)) - 1; + // + // Limit the virtual address space to what we can actually use: UEFI + // mandates a 1:1 mapping, so no point in making the virtual address + // space larger than the physical address space. We also have to take + // into account the architectural limitations that result from UEFI's + // use of 4 KB pages. + // + MaxAddress = MIN (LShiftU64 (1ULL, ArmGetPhysicalAddressBits ()), + ARM_MMU_IDMAP_RANGE) - 1; // Lookup the Table Level to get the information LookupAddresstoRootTable (MaxAddress, &T0SZ, &RootTableEntryCount); From patchwork Mon Nov 26 22:37:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 152084 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp465552ljp; Mon, 26 Nov 2018 14:38:39 -0800 (PST) X-Google-Smtp-Source: AFSGD/VjB/c9COYo/Q5PjFUw7V+IiqXg48CxegMApTSNusey8r/Of9+fYGO7tjt8hf+GCDskli2G X-Received: by 2002:a63:6302:: with SMTP id x2mr26635950pgb.183.1543271919324; Mon, 26 Nov 2018 14:38:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543271919; cv=none; d=google.com; s=arc-20160816; b=HAU7p9ZpUqtU5k0RydtZdKZ9kDwNYbJISOws7DB6qEsH7VaIFqZSaGJfnMW+YI669f 6CNpDIoyQv5jW4xg6qix72ffzEr1ePeLaNUhcET8L19n/F6IXTP/S26rbjZ5l9BO3YJm 7QHTvXHqIdPkKPJxmmwRQgnRs2wrayFmlbqXcFwsotYSfmguT3qhormJyZ/o4v1x4sBT RhwAgsNDoaO92aixouD3IjK7fem5L2D+HbsV8FNQGv8rgX7HcSBn6yKAYU/63QsiWNBe fAnlPMbF3WNRUZfP/FFu9UCf6hPmavNdNZyHIazDzg8No1xPf8OoR/tSIwKqOfe1VS20 i+uw== 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=t2FxStij5TI28I/D82lmvFk8RJvFxp5GuRpDpqPjEw4=; b=yiJDxfasKznEOc/AHtiCpMLsanJ2ON267Ws1bUcy9UrCie6zTTHDIBEyv0M9sX0k0E Ou6t0YUPWlAl2E1+If0W4NA8C45KbvtcaBaD8HGBP6Lsl6JAhvvadrfKVpzhsHXfvEzL 4RUMBcD8ikMKEMJS49PjprVm+5m95VcOBz8DHjTvNTqEwSX2OTQTUahJjU2nJuebfUve wP8zU81eZa4ZLa8xPYFiMRwb/bpJZlnnylKy9uQhCfXTe2ON2vehXWkQQbM2oDp9d3a9 25wzdU2ATKAMmBMcqDDywcxeArpetpLUktlNfm30AcDSzOHC4xHMRE/P/jFA1Nt/kNCV YGrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="hh51/T1N"; 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 p2si1614989pgr.133.2018.11.26.14.38.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 14:38:39 -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="hh51/T1N"; 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 E5D0421195BD1; Mon, 26 Nov 2018 14:38:36 -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::442; helo=mail-wr1-x442.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) (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 852102194D3AE for ; Mon, 26 Nov 2018 14:38:33 -0800 (PST) Received: by mail-wr1-x442.google.com with SMTP id p4so20665903wrt.7 for ; Mon, 26 Nov 2018 14:38:33 -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=ynicutrS9BlDWKykqGtt6Amc2Qylqt/36mhMiGAjv0g=; b=hh51/T1NJfq85DaJSLU1fgIsukyga/apVbUI/AsyXHGAy7KE/DBmuaVGLPDW1W31/7 41+KHtWNGeG5oc8qRvYLIcpGiSOrfrGGOITzuLj2EpJ8IoMoswFmv8qYZNu6TPNjyztf W4f2iSqK9cnxnv9YGXjKOnJHl6xChfgLDQTXo= 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=ynicutrS9BlDWKykqGtt6Amc2Qylqt/36mhMiGAjv0g=; b=b4jXT3fIOsT88xxH3FAf9lUW8XkEeYiRRx0ViqQGDvSafHUhCqOZ8wSSIbk2QcuKcc VeNla0HUPH4pyY9peMH/1rIIg6UgmOiEaM4VLTTJu/injDwbXi9oEO0Ucfj+R7UJHTFX UZG4K18Pv1LG9/Ly7Ur1Et5kSkhhfVEjabVkkdgy6tXzbOxsIk+feHNrSaMPes4F59CA p3E3B2iUTbP0ci7iPVh6rAck4QzY3ZIVd8LT5HE7uiZ0uHAuEr0thm5coh/U6F6Q+C4O iDkP5WZZ22Li4Cc/JaKzDN/hYNMizZKKmKzugFTmu4XANHwVaePMxgAw/F9yPoczT20e z9aQ== X-Gm-Message-State: AA+aEWbC4M2wN3d88qRSDJymFttHjrHRPTFOutKpWVJWgFnHO14GTTzV 1iIR6gAbX3d5GxwzjcjIJ5+VlBvtVFI= X-Received: by 2002:adf:8143:: with SMTP id 61mr3691302wrm.47.1543271911866; Mon, 26 Nov 2018 14:38:31 -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.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 14:38:30 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Mon, 26 Nov 2018 23:37:52 +0100 Message-Id: <20181126223801.17121-5-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 04/13] ArmPkg/CpuPei: 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 --- ArmPkg/Drivers/CpuPei/CpuPei.inf | 1 - ArmPkg/Drivers/CpuPei/CpuPei.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/ArmPkg/Drivers/CpuPei/CpuPei.inf b/ArmPkg/Drivers/CpuPei/CpuPei.inf index eafccd600983..dcea012fd8f9 100644 --- a/ArmPkg/Drivers/CpuPei/CpuPei.inf +++ b/ArmPkg/Drivers/CpuPei/CpuPei.inf @@ -50,7 +50,6 @@ [Guids] gArmMpCoreInfoGuid [FixedPcd] - gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize [Depex] diff --git a/ArmPkg/Drivers/CpuPei/CpuPei.c b/ArmPkg/Drivers/CpuPei/CpuPei.c index d54f42acfcc8..e63519ff6481 100644 --- a/ArmPkg/Drivers/CpuPei/CpuPei.c +++ b/ArmPkg/Drivers/CpuPei/CpuPei.c @@ -73,7 +73,7 @@ InitializeCpuPeim ( ArmEnableBranchPrediction (); // Publish the CPU memory and io spaces sizes - BuildCpuHob (PcdGet8 (PcdPrePiCpuMemorySize), PcdGet8 (PcdPrePiCpuIoSize)); + BuildCpuHob (ArmGetPhysicalAddressBits (), PcdGet8 (PcdPrePiCpuIoSize)); // Only MP Core platform need to produce gArmMpCoreInfoPpiGuid Status = PeiServicesLocatePpi (&gArmMpCoreInfoPpiGuid, 0, NULL, (VOID**)&ArmMpCoreInfoPpi); From patchwork Mon Nov 26 22:37:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 152085 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp465612ljp; Mon, 26 Nov 2018 14:38:42 -0800 (PST) X-Google-Smtp-Source: AFSGD/W/O/a3XztU6f4cQbiMrxcdR5wj/OUAADMkCELi/gj3m2PvVkRHxOEP1A8tf45p0xyqfSmK X-Received: by 2002:a17:902:6946:: with SMTP id k6mr30268047plt.101.1543271922360; Mon, 26 Nov 2018 14:38:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543271922; cv=none; d=google.com; s=arc-20160816; b=jPDzCH1Kncx9HT+7FubtbmjKmNtKHyWHmMqud6gkl6Efc8w6lv3/utlF+JpgEJd0D5 lEmbJqcvS4e86ANUGlTBojhkuFNxVD75+ooOU9YQKTXdq8o126zKtEdi5qmMl9coAVs+ mSbxfciUH2Df9IpCYtOp43Hg2i0W9rbzHh0hL/WMw2G13u7KkS8xvdQ/oRWpjOUbshXo auM0129t3jsley3HQZDufW6D8MNdJgBmVaVCw3j3itIifGXTvD60qvVC0+3vzFYxPcFn xFeaJPkkeKRduKL/zHhikjJI5XHIJVDCtIieRhRPAOBe28P9sg1z7wbOMWWbEkawX6Lq gVbA== 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=hnTIu7hL0CoAAWbapazUfel7hVXhlBp8x0GbrIeCBPrw8x+3GR6T/Ac4jrkmOHYpIO xQ1hR60bYhWEhj2gNN0HtDAz4Fphb6YqeVGmV3GDtkP8YO9SnUXMBgfvZkaQFRqFXWuJ ytV6k75CcWTOVE9JB6IvDSiZ+d/gw7g3oEqhuI7OhG2PEUjzIkkezClgxRu0TFnzRJft 83nc6co81TvTBjyKXO66u1VHhqgSquwS0MZ8vJ9M5jTDMQOzeW+LNBWvxZApQTGF5Td4 sGSIoJuVncVposwPwRRlEA54sn54bmbhHOKrFoBLPU76Qgrojm2DN8at8mI8b9jGjgOC QIvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=aOfyM45+; 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 r12si1568020pgk.520.2018.11.26.14.38.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 14:38:42 -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=aOfyM45+; 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 207BF2194D3B8; Mon, 26 Nov 2018 14:38:37 -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::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-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 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: [edk2] [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: , 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 --- 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 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 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); From patchwork Mon Nov 26 22:37:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 152087 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp465694ljp; Mon, 26 Nov 2018 14:38:49 -0800 (PST) X-Google-Smtp-Source: AFSGD/XuwQVMOKr+OWiE8XEw+ztQGXXKLrieMoetwY6bWTQcbJpQtihqyw2gulty16tLdFd9P9jn X-Received: by 2002:a17:902:76ca:: with SMTP id j10mr28854713plt.144.1543271928799; Mon, 26 Nov 2018 14:38:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543271928; cv=none; d=google.com; s=arc-20160816; b=ldIDM3szOXNSwQAo7rIj1TeL4ZF/3ERHTG/H/XPKrgNv7kL6Am3fCQGtCo25mIznEX jwVtwDEoqILhnv5zkBYZiMLaBfXG3s0MByHJC+gW79SHQ+s5QlAzBIrFPAGW9COC+W2K h02DQkKOrivgY/9KVvkhXtaONO/qN2qyLMLMyNLMOEomP3ZleTTJV8QMAtqwqgb7f323 BjkE5VRkSKpo9sk0w1nLg2NcX2OqZ9LaGhnVgEyxHHZYGOOdTMM8bUAJbkNVdp5ctZCa hxnQ3nIUNzJqkeWUTWO6F+M/kyI6u7ZBH3BhTmtwpQ4Xbx5lrgpSMwErzjXfQmDxEabL nE6A== 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=2yrJb1ywv28RrJZEDPoQaSpRKlS8Qtu1Ouo0u1wzUJ0=; b=hdslpWWO546GPMf/eUDj4iv8n+BsaDgvW522OyHV/rS/wwMpMqkDcyKg2uwNKasnJ2 3wBKGvRJDFJGkRMq4Lyz7MBnYIQGhrLi2puafAbL1sq/cdDOHzIxc5iR/intbX6hcSj1 h8wRMNrsbioO9ZtzgkSfS66LywaAb2fB1e99piastnurU5OZKNltOHOQ4teipEJ204gt 3JyMu7JrqarlMZphqGIWaPH3WlNUpMPgTuW7lc6ALAA1tLP4LwSVT3kzs1/YmtsiDsPM vk+TmymFT5By4pJ1MLf1BbHL/+xLJOLPuA91Q2fH6q05gxhKUgJRm+s6H/p56YJlWf2P HR/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=MZY3mh93; 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 q20si1637073pgl.268.2018.11.26.14.38.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 14:38:48 -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=MZY3mh93; 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 7DA032194D3AE; 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::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 D153521195BCB for ; Mon, 26 Nov 2018 14:38:37 -0800 (PST) Received: by mail-wr1-x444.google.com with SMTP id c14so15021148wrr.0 for ; Mon, 26 Nov 2018 14:38:37 -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=URUyurxf667iFbDXbP2kN6XPe58zIYvx3JM7hp6HbeI=; b=MZY3mh93/+rHlojdNFVMDSnxn4SXQY8bflxz9wQk8ZsbblE2RrAl5ndBdj5mIcSMDk djSS9Poy9Sdc8wvjLRSvpnNl94zKvS9HMz9Fg/kX0RRmHOxuA4XvCJsi7SLC/LfI4Yly D2pLsSePDxbF7VXp4fxS8YtwCwYNK9qi6eYpE= 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=URUyurxf667iFbDXbP2kN6XPe58zIYvx3JM7hp6HbeI=; b=aOTmorXKyEKMarmIRFZKA9sGAAcLJgbg8mp88SqrUJveuHBRCZ3/NjHRHh6IFT5v9k enRcBznl+UuyC8QqbO3jrhFfBFx3sGj9rJWLRYLYKw86+JjqngBgviOPyd1qs6uVnM0h tYx3LQ0UgooS+ZeJaK3RBynsGh6KfmlYB28DG01ZkOcE4U+JeMtzZGF1Z1CP7fGaGT2s 1lxK/DcJlprxCYM3hQKEFkySYwMnGG+/IhFC1ruIIYO6RYo2CALrZCJQ1/jlCgnyi8We oSc9HpY62QwOEtnzfNr9ixPAxDzwYHgD9W/+ICX1DxnLk4u/oLsiXcJEXZtmwa9RikHx sGDg== X-Gm-Message-State: AA+aEWakXSvUqx7fP21W00xGBRqR3OJArg6iRDH0UEIOrvGUvTDRtP5v VvKlOBF3XyBzg4Mw9P1EFmvO3bvThcw= X-Received: by 2002:adf:be8d:: with SMTP id i13mr26078150wrh.235.1543271916078; Mon, 26 Nov 2018 14:38:36 -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.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 14:38:35 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Mon, 26 Nov 2018 23:37:55 +0100 Message-Id: <20181126223801.17121-8-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 07/13] BeagleBoardPkg/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 --- BeagleBoardPkg/PrePi/PeiUniCore.inf | 1 - BeagleBoardPkg/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/BeagleBoardPkg/PrePi/PeiUniCore.inf b/BeagleBoardPkg/PrePi/PeiUniCore.inf index 3d72bc5b46e1..53c71d8eafc2 100644 --- a/BeagleBoardPkg/PrePi/PeiUniCore.inf +++ b/BeagleBoardPkg/PrePi/PeiUniCore.inf @@ -86,7 +86,6 @@ [FixedPcd] gArmPlatformTokenSpaceGuid.PcdCoreCount - gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory diff --git a/BeagleBoardPkg/PrePi/PrePi.c b/BeagleBoardPkg/PrePi/PrePi.c index 46f63f40c46e..bc9b0c80b84c 100644 --- a/BeagleBoardPkg/PrePi/PrePi.c +++ b/BeagleBoardPkg/PrePi/PrePi.c @@ -110,7 +110,7 @@ PrePiMain ( BuildStackHob (StacksBase, StacksSize); //TODO: Call CpuPei as a library - BuildCpuHob (PcdGet8 (PcdPrePiCpuMemorySize), PcdGet8 (PcdPrePiCpuIoSize)); + BuildCpuHob (ArmGetPhysicalAddressBits (), PcdGet8 (PcdPrePiCpuIoSize)); // Store timer value logged at the beginning of firmware image execution Performance.ResetEnd = GetTimeInNanoSecond (StartTimeStamp); From patchwork Mon Nov 26 22:37:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 152088 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp465753ljp; Mon, 26 Nov 2018 14:38:52 -0800 (PST) X-Google-Smtp-Source: AFSGD/Vooob4jh+L3+kK9hVGFJrkkhR/WLggmXpNScLAz/dV/u7NmdwMy2SP4jCv9BJh8HCg+RGm X-Received: by 2002:a63:4044:: with SMTP id n65mr25935028pga.90.1543271932016; Mon, 26 Nov 2018 14:38:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543271932; cv=none; d=google.com; s=arc-20160816; b=SCjjgm+pF7MZ1g2LhP9noNcqrl8jWBayK6WjVyujvXi6g7yuAl5Qydf9NmRYDhCIIB t+tmzfftnborhZqnOrQca7vne6HiAKS5AhvdgaMmxnH2lIcC1T4asAcSdJUWOLNNBjTv 122dTOK9zv30TOFdy6Zw4Vg+QGZ0EXI8aOyyiNxnZrQgOEk6W5Vq+tlQrGRJvuZxHiyj LuoiL19nGLMD3VSFH21HeVoxun5fwP8KWVfX311pyko0Fo7iv58R12JU6uLAQgvSN/xW AhM/HjvW8abVXdgH1EhkAiZi4X0a6pjCzfXDUGwF1fMoUmr7494BFB+XK0ktYv2XHG/h QAhA== 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=BueAZVja70Uf00sRpXrdGTQ6v2YDgHhjR870Y5HQcQ4=; b=brxcDuRgUprmdMZ6l+scb1dFNPdeu79HZq1SSmNNysDpXny4WQh26rRa9CH5OYGqZG PqXQRzp5XKNYRT9M7zwiQzw3mvxBjc2KHB2PadsYdkZ4jnVeh83CQ5N3E0y3nEQ0J82A M93zh/fM6AjJiFlzs1ZaU5BofSdwNxymEB/Hu9cYnAwNqSX81QA42V79xDetYrojslo2 tlRa+mc2uNEpkLZfIc6nbOuF7mqDILJVzRA6zAf+K8I8UuCIGWVizDI8WolH879Scupg nWOweuC7q4vV9Re21NSOzWfLRJuBIovSOaqMb6SDqCfAJu2XPRXBJIO2w3qurC97bILV EFHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="fuZ/X0xF"; 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 z6si1532615pln.66.2018.11.26.14.38.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 14:38:52 -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="fuZ/X0xF"; 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 AFC9421195BDF; Mon, 26 Nov 2018 14:38:41 -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 3852B211944A7 for ; Mon, 26 Nov 2018 14:38:39 -0800 (PST) Received: by mail-wm1-x341.google.com with SMTP id z18so5199621wmc.4 for ; Mon, 26 Nov 2018 14:38:39 -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=X6KZu55ZZa5rydhjCMQqGd/5R9brir3k9jqm5YJ/AoQ=; b=fuZ/X0xFvE76QCabKZPmTIItqYIS8XWRUQaytKUlgYMmipSHCZ/decU2MF214hyaps Dh/YyDU/RdsO0ZBDMTtAb7ijMmDQqyDp479IV9nmX24OJNAJXDq7m9MhE5AQH3QM6FyP Y5RwGwmlZhtzanAuSVfNYKcojfOPjZslrWe3s= 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=X6KZu55ZZa5rydhjCMQqGd/5R9brir3k9jqm5YJ/AoQ=; b=ef3fsI2/sW5dtCVBpYbaJSIHUxlFGDpvl1R6m3LXvx9YHpxEwNmW5nuenlDiwpain0 YDQ5xW7lwBuaSsGOnwOEmuYKvKaKMYWMJ+cidq9dyiOMqvnZhykTUNd4Fx05c6Q/fM9Q U5dLzplcVQXS0OEh2QRXt90PTrbR8HnSjk7j3z8VkFwaFUdME2F0hGJqn2N5z1WQcFt3 qSMPoFrhEUNeUUK9NWcvGwvnDBn3+8X2Fd5aaWHf1iWC5pnbV1ujny7G47+OtnX9R8PB 1VEs4pDdC0CUdyrRUn4BIrC2yvpXBlyKPQileXO+t6XzSsBnECRV04n8EKj4SjWqr19U WI2A== X-Gm-Message-State: AA+aEWZ58dtZWCGekGNMmTS9BhDGYLazjfPqPppJ7AU9zElEy4sLLzvC OMdKXaV37AfOMt86ltoWkKffrJgaa1s= X-Received: by 2002:a1c:a5c8:: with SMTP id o191mr26584013wme.150.1543271917366; Mon, 26 Nov 2018 14:38:37 -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.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 14:38:36 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Mon, 26 Nov 2018 23:37:56 +0100 Message-Id: <20181126223801.17121-9-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 08/13] EmbeddedPkg/PrePiHobLib: 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 --- EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf | 1 - EmbeddedPkg/Library/PrePiHobLib/Hob.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/EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf b/EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf index 526db4c0d8f9..1ce3546d007d 100644 --- a/EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf +++ b/EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf @@ -47,7 +47,6 @@ [Guids] gEfiHobMemoryAllocStackGuid [FixedPcd.common] - gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory diff --git a/EmbeddedPkg/Library/PrePiHobLib/Hob.c b/EmbeddedPkg/Library/PrePiHobLib/Hob.c index aff8ea05797b..e3d70ae0f9fe 100644 --- a/EmbeddedPkg/Library/PrePiHobLib/Hob.c +++ b/EmbeddedPkg/Library/PrePiHobLib/Hob.c @@ -193,7 +193,7 @@ CreateHobList ( Hob = HobConstructor (MemoryBegin,MemoryLength,HobBase,StackBase); SetHobList (Hob); - BuildCpuHob (PcdGet8 (PcdPrePiCpuMemorySize), PcdGet8 (PcdPrePiCpuIoSize)); + BuildCpuHob (ArmGetPhysicalAddressBits (), PcdGet8 (PcdPrePiCpuIoSize)); Attributes =( EFI_RESOURCE_ATTRIBUTE_PRESENT | From patchwork Mon Nov 26 22:37:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 152089 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp465810ljp; Mon, 26 Nov 2018 14:38:55 -0800 (PST) X-Google-Smtp-Source: AFSGD/Uq7bhJt73r/Jb/wGpz3uE11fUuTkkKiwFldn9Cl0idQd4xlM22loWUP1NqAEprF5rkbpu/ X-Received: by 2002:a62:5884:: with SMTP id m126mr10835038pfb.177.1543271935490; Mon, 26 Nov 2018 14:38:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543271935; cv=none; d=google.com; s=arc-20160816; b=nvs7UP9h2LAp+zp0rX+7RJwuyJ/D+0TO6f59QXFxaJ/dRWMXhqp3Zvxo8eZOPEdlGq ImkkUpy9x1f1v8u1neyCKF5zkmcHwLpeOcpcY3GrRhsU5K7GCLVaWvCtYEv+JEtVUun/ 56bH79u5VINMzOz93b9qsDFXJMpOPEeTXY9yS2xcm2ebP4MiocAw2ked3G6F9QPpqkXs KWwdgQnYyj0YzGe7s0kNHu6vfsO3jZIH5iAeQ4BKn8+p4ZErm29nkaRGXwPwT6yrhLqG Rku3ht7GLyiEgsTflV6CrNjyD4f0BnLlFfMXkveUROlST0CAEc4XFU06j2wsaeOlIv+M GzcA== 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=gnHmu7jng63GyKAc/x2vdabmAOR/+7d7eudZ/OrncNE=; b=wNguTF3kD6W18E9bvQoog8tMYSwg1WZFdBcE2fmGXE0jVt/FolvXvCuX1YKsnsJggF GwBMhiAE/AfUPTZ0mq9bw4FPfDwZeeC9oZkjKlnoxiGu5JHh8sdLno9DN61+8Y5od5mF qiBuwVeriBpRK0mK9Qw8UvASffTpB8Hpu1mGZZuP2qqN87TvtPQdoUv+ETpREhIqc2HA mnc+NE7zTofFDA0mPTCOK2NiNSHiXVCPO/VuP4wEldrwigIW2fzx9PXMiaAcjcmdn61s 7q0oVSBPY2dB4jOKyToQxuHY2g8k8H7QOTUJmXA3cHkuBWZIys63wEtDrtEttDSwWQ+Q W5og== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=RpooLXpm; 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 f23si1503252pgv.431.2018.11.26.14.38.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 14:38:55 -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=RpooLXpm; 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 E2C3421BADAB6; Mon, 26 Nov 2018 14:38:41 -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 65F8021BADAB3 for ; Mon, 26 Nov 2018 14:38:40 -0800 (PST) Received: by mail-wm1-x341.google.com with SMTP id s11so20291359wmh.1 for ; Mon, 26 Nov 2018 14:38:40 -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=ApOBnBxIBKYfzHatDR5QEYDMU7Y72qSs9yPe8ZYkwiE=; b=RpooLXpmivqvD6xpO8Ae+3KdOOLa2Bq4uFjG/CWwKvHEyWOvOl4m/U2W/z216VMeRc f43nxC+UUUQc8H535WNGmxaTAmdhbVrArGOb9LDDM2EpHMZJuiOAbZZEFydWUcAfBgTL BHFmc0EIJuOBpCm837djs5c1ptzXDKrhzSRT8= 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=ApOBnBxIBKYfzHatDR5QEYDMU7Y72qSs9yPe8ZYkwiE=; b=mqXDCHhOAVnCihhH7GhVH1D9wLGYWMjpD59bCjJxZdQB6as9mUCOdKsInjdCNlBoja TR61IO1cBZCGt0QkiAJL53g60WfWulhpYdMVNLRywsN4BWE1DwF1hCnfKnzTez1h4v8Y BjPUqxgnhtSNezy79OnF3pP1B+clEO6PJszvUe7Z14M6cH6ydb/K1pSGVr0OGdMQAc1m mt4/vNcvyz05EsXfkQd2VgV+C3OG3gCIrarNUhOjx0SaZtFc8iRECVfKQH1s3PDlwRJc 6343RXXxv/tu5QWRoWkS8SEJSnadADkAyV4lTP7zbKRf/i50+14XFgMUQ/cip4Fn6mXW y1sQ== X-Gm-Message-State: AA+aEWZCqPoX5e7H0HxHg2qGvamDIQfFYWZRY4yOOCKcCgO+AduCUiOA Z8xUszzerp/WTIdNfBk7hgGI3Jnve8E= X-Received: by 2002:a1c:bb85:: with SMTP id l127mr24842094wmf.98.1543271918590; Mon, 26 Nov 2018 14:38:38 -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.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 14:38:37 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Mon, 26 Nov 2018 23:37:57 +0100 Message-Id: <20181126223801.17121-10-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 09/13] ArmPlatformPkg/PlatformPei: drop unused PCD references 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" Drop some PCD references that are not actually referenced from the PlatformPei code. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- ArmPlatformPkg/PlatformPei/PlatformPeiLib.inf | 3 --- ArmPlatformPkg/PlatformPei/PlatformPeim.inf | 3 --- 2 files changed, 6 deletions(-) -- 2.19.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/ArmPlatformPkg/PlatformPei/PlatformPeiLib.inf b/ArmPlatformPkg/PlatformPei/PlatformPeiLib.inf index 314789d0a990..23bb3f37e766 100644 --- a/ArmPlatformPkg/PlatformPei/PlatformPeiLib.inf +++ b/ArmPlatformPkg/PlatformPei/PlatformPeiLib.inf @@ -46,8 +46,5 @@ [FixedPcd] gArmTokenSpaceGuid.PcdFvBaseAddress gArmTokenSpaceGuid.PcdFvSize - gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize - gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize - [depex] TRUE diff --git a/ArmPlatformPkg/PlatformPei/PlatformPeim.inf b/ArmPlatformPkg/PlatformPei/PlatformPeim.inf index 423b9ab858d1..4934baa838e1 100644 --- a/ArmPlatformPkg/PlatformPei/PlatformPeim.inf +++ b/ArmPlatformPkg/PlatformPei/PlatformPeim.inf @@ -57,9 +57,6 @@ [FixedPcd] gArmTokenSpaceGuid.PcdFvBaseAddress gArmTokenSpaceGuid.PcdFvSize - gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize - gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize - [Depex] TRUE From patchwork Mon Nov 26 22:37:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 152090 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp465855ljp; Mon, 26 Nov 2018 14:38:58 -0800 (PST) X-Google-Smtp-Source: AFSGD/Woe0NlBz7yIgkSIjRRu4uTAkHJmEqMjQ9Ul4ZqQaOEhIMGpuvJq2FIZZ0rwiTWmIzVds2W X-Received: by 2002:a17:902:541:: with SMTP id 59mr21891397plf.88.1543271938851; Mon, 26 Nov 2018 14:38:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543271938; cv=none; d=google.com; s=arc-20160816; b=UbuY69TCi6xfMaSFjcmunnLoLKbS9hs/IPuH20MzNpTBtVT2THgRACQROayWDJGwFG tu3/zWr30wFQu0c63E5yiKOOrM8yYECFGaYJ+QOsN6FGBGkSu12MB26rASdv4nsuMGlW VuRRYG6630YvQdnRDLjqeVWU/kYgg6jP32LDOsMt/lcu08REz2Bwq+0il4coczoEvLM6 V7xNPPLM/GX37pXAPNtbpg/Cr6cGmAwQWezb3/WimxTkD3AsSgtTx+X8TqjmO9qOFzZQ BiymxHXOp58yNry1hCC9pimBGTca4XF++ajGvPAC+HyBywJjrzxwQ6WwuWmuHnkE3UGS Zd2A== 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=tXWQDsJL2apF73TLtJFhRvgnrSQfrtmoEjNNCj6jdY0=; b=LBcgZ8IQYf++zi3QUejXDTEBzVKty2DHjefKr8u0iJbfkIn2R0wqwgAAS0tV/Fi3m7 e64JhdT6cWwrwUPzR0XBhJmo8WKcx3QTqdh80Yuv6izL4rSWrdoJDRKfVxnJInvzI0LX yV4WC1gLjQ0bjeQm1Ws1KZYvUSTAEvpsWZtNIwqPsc5b7LpiYkmIl78kxMJS33YiOBdB MRrzmq8b30RXkL/70IoUpYMygho0HV2YNJRy0yu91xYjyGwQWXuXR4M132AftG9qr4ug 61Z0WibcEnQVT8OAMmwuhrO0Wz2JBFKLsaXX3Ywtx6+qkq9UAERvY758WRLxWLM8JyuY kC8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=c2+tMnfU; 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 x141si1545576pgx.266.2018.11.26.14.38.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 14:38:58 -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=c2+tMnfU; 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 1CAF621195BDB; Mon, 26 Nov 2018 14:38:44 -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::342; helo=mail-wm1-x342.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) (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 8CA6E21195BDB for ; Mon, 26 Nov 2018 14:38:41 -0800 (PST) Received: by mail-wm1-x342.google.com with SMTP id c126so20171914wmh.0 for ; Mon, 26 Nov 2018 14:38:41 -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=YH7bVCfMD5koTByUpYo/XRh7PETOcqqP/Xbau7IJQLI=; b=c2+tMnfUBeUJ/MLOYCHm5Je6v9RrtWHOVNQKwHlAHF/yzZZWwjudgFeh2RZiilNv26 dJ6eUi6Yn0oeNEpMfWjdoGvV9/6qeIcaAYcYrF/1w57E/t5cX9TN8+P7HEb07/hzfBaO 95t4qk6OJBWpJNOKXImmiiypXAax8GNFbO7LE= 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=YH7bVCfMD5koTByUpYo/XRh7PETOcqqP/Xbau7IJQLI=; b=C3eGrApaHAAQeKPIzINaz9YAfruchcEtAuV0ZMnLu5nxrhXoKZ1SJkUpFGfUOak1T/ iGhBLRb9u6SvxyR2uw8cCj1NERJYdtO2g8XXFagyLh351Mp8IQGbWcly/l66OvwjqjBI qKb6hqTut8bIT6YbgKGUKpn/mGLzITLC4t5FQPevUA+LqIFv0oIj4AQdGbanD4JCenFq 1AF4D4xbOGEWNrUA3IQYArTZ0mxsaaVuCXzB8Y5RCFlmKyyQ/SQxuKPyFxoWBgr5L9oe 5qtgVitVbI7t8SOEznjMwxZ94TDERRNRx+1OYJUCrEveV4CSfBf3MPHNL/J8KzI9n6ut PQvA== X-Gm-Message-State: AA+aEWZC7fAVfKL4hOM6AD3lGxjhiNn5HUOkwFLzypbwBOcsx1NGGxY7 tflJVT/gVxSZ+MauiiANt7jfVULW8n8= X-Received: by 2002:a1c:9081:: with SMTP id s123mr25707250wmd.126.1543271919852; Mon, 26 Nov 2018 14:38:39 -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.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 14:38:39 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Mon, 26 Nov 2018 23:37:58 +0100 Message-Id: <20181126223801.17121-11-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 10/13] EmbeddedPkg/PrePiLib: drop unused PCD reference 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" Drop the reference to gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize which is never used. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- EmbeddedPkg/Library/PrePiLib/PrePiLib.inf | 1 - 1 file changed, 1 deletion(-) -- 2.19.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/EmbeddedPkg/Library/PrePiLib/PrePiLib.inf b/EmbeddedPkg/Library/PrePiLib/PrePiLib.inf index de68405098c0..3dba884b1f31 100644 --- a/EmbeddedPkg/Library/PrePiLib/PrePiLib.inf +++ b/EmbeddedPkg/Library/PrePiLib/PrePiLib.inf @@ -69,7 +69,6 @@ [Protocols] [FixedPcd.common] - gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory From patchwork Mon Nov 26 22:37:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 152091 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp465905ljp; Mon, 26 Nov 2018 14:39:02 -0800 (PST) X-Google-Smtp-Source: AFSGD/VmeiazqY1QDA1RPJ3/3V7uS9UfWKDlDPHMvFq1hMSJ0cxqaa21xDxheYQQzNmI+YsHLAZ8 X-Received: by 2002:a63:e84c:: with SMTP id a12mr26462445pgk.241.1543271942443; Mon, 26 Nov 2018 14:39:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543271942; cv=none; d=google.com; s=arc-20160816; b=Lpu0EzC6xuSN2SnJloTuA2M5/w6VYQMy1xSRgXz1KPO26LhK19otWCd9jGjT16roII RX9jFjjKcroV5yoCCuZvjJdJbwuztawMb+uHnMlRIo7cwB7nmxYxfibGUqBjjXYHb5Y+ mKS4X1mczAokMdPsE8XIjjnVPZWxxd0tC4Jaoj0aDLVZ97E8gPFGstUuXR1XN3o1meeX QmFnwBqzQPzf4RBnzENUCgnKISJ6d6stWtbXwDEGqXDf80OwK7QbFJ3rXdPjsIP6eIVz s3/kAPgzHHrbq/LSyTZfh8v1ljyx3JA/uD5MWyiyOmwm40eGSfddpgXkIKaF7PUo1xcx fcxA== 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=TNOsVjDpQUpDXuYTjHcW8HPmgZ0W050N04Gzt5Ep+Qs=; b=pKuGSM9ZHTVZ+c78NPj09P3mG5NgqZpLMHsHihb/8zguWFj4/4N0+7wgFW4R9M2S+m Gxf52bhU+omxOXiyhJC4MCGsGMvSU7ILOeKjqgXWWueP2HFkPIfLsrEI1g/6WRf8ugnA KH14p6BSRxvVyLk6TBCzT7P9+nsbOIiJet1q0T56/H1Zn124I/yMp+m4IeSkb+DR0/Eu vnxKBWEcZeXvagKZwt9iJRu0XDNaEUknInJH4y9mbaXLxEIHPUVbRARvYhvAkhDZ4O07 Y4rOyZ3ueFxOOs/B8ViwQdwqVyH9gGrFGvWKGP9u/ptca9sFYxQCt+fUYJTNPM26oDZt VQdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=U8ZmdlxP; 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 o127si1847137pfo.251.2018.11.26.14.39.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 14:39:02 -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=U8ZmdlxP; 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 4E5F5211944A7; Mon, 26 Nov 2018 14:38:44 -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::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 C35F4211944A7 for ; Mon, 26 Nov 2018 14:38:42 -0800 (PST) Received: by mail-wr1-x444.google.com with SMTP id t3so20666375wrr.3 for ; Mon, 26 Nov 2018 14:38:42 -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=CV2IjsGCFbM79DiKtBeafG1Ak96/I/J0iqDkRTBuT6A=; b=U8ZmdlxPVSNLr7VcmNsMhCAZt5MriwEHWVE3yKCHB2TaGkG658Tisacq40M7Fyn9If N/N0hFQCnq9jBre8B2cbkxW/6lfFExqjz7ejpurKGrM0U09FDUhZbCsKNlSBgiWqgi3W VfgxFXmD8eLJok8vCPUpmMycQF5M+NbWRpJS4= 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=CV2IjsGCFbM79DiKtBeafG1Ak96/I/J0iqDkRTBuT6A=; b=phqCcKXGNuxbF++KRvVFb+TrgOL4ndWZO3uxS9BLUYl6ybQio60g/XaZIowilqBuhN yUddOMGAdBZaGAkNWNLzm+2LWlZC08VZzA1+Z8CNnq629R77MjLPoz9vnHuukh88nnya YpRojtU9mMHr61wcR/vkUd7r8GjmVdHV7H46cZXG68skbeJnOIHBFHMLBjGVeuoJMkhk XyH5M+uSd09OylDoTnq7QANzi08x3DxUvG8/nS+zBgmYn9Lww8cl/xKoGnGAb2l0XsCk 22kwd5acCgCCd2iB9wTWs9Bchg8Gdjv83ghusWnbr8VJl3X6HWNMF4VcigiT0dRG76Tn SahA== X-Gm-Message-State: AA+aEWZlkCL2o+bG1lZkDJ35vd9VRtTTJmU0UL5t977H01VZtCeCr3gC jtmXJyQAJPFNCKWv7SuwIzDmH04W5iE= X-Received: by 2002:a5d:6b81:: with SMTP id n1mr27270194wrx.149.1543271921094; Mon, 26 Nov 2018 14:38:41 -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.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 14:38:40 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Mon, 26 Nov 2018 23:37:59 +0100 Message-Id: <20181126223801.17121-12-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 11/13] ArmVirtPkg/QemuVirtMemInfoLib: ignore PcdPrePiCpuMemorySize 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" Now that the size of the GCD memory map is based directly on the CPU's capabilities, we no longer have a need for PcdPrePiCpuMemorySize and so it will be removed. So drop it from QemuVirtMemInfoLib as well. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.inf | 1 - ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLib.inf | 1 - ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.c | 5 +---- 3 files changed, 1 insertion(+), 6 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/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.inf b/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.inf index f2c461e3b55a..5c5b841051ad 100644 --- a/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.inf +++ b/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.inf @@ -45,4 +45,3 @@ [Pcd] [FixedPcd] gArmTokenSpaceGuid.PcdFdSize - gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize diff --git a/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLib.inf b/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLib.inf index f54fb51ee1d4..d12089760b22 100644 --- a/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLib.inf +++ b/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLib.inf @@ -49,4 +49,3 @@ [Pcd] [FixedPcd] gArmTokenSpaceGuid.PcdFdSize gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress - gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize diff --git a/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.c b/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.c index a80454c4802e..815ca145b644 100644 --- a/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.c +++ b/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.c @@ -41,7 +41,6 @@ ArmVirtGetMemoryMap ( ) { ARM_MEMORY_REGION_DESCRIPTOR *VirtualMemoryTable; - UINT64 TopOfMemory; ASSERT (VirtualMemoryMap != NULL); @@ -75,11 +74,9 @@ ArmVirtGetMemoryMap ( VirtualMemoryTable[1].Attributes = ARM_MEMORY_REGION_ATTRIBUTE_DEVICE; // Peripheral space after DRAM - TopOfMemory = MIN (1ULL << FixedPcdGet8 (PcdPrePiCpuMemorySize), - TopOfAddressSpace); VirtualMemoryTable[2].PhysicalBase = VirtualMemoryTable[0].Length + VirtualMemoryTable[1].Length; VirtualMemoryTable[2].VirtualBase = VirtualMemoryTable[2].PhysicalBase; - VirtualMemoryTable[2].Length = TopOfMemory - + VirtualMemoryTable[2].Length = TopOfAddressSpace - VirtualMemoryTable[2].PhysicalBase; VirtualMemoryTable[2].Attributes = ARM_MEMORY_REGION_ATTRIBUTE_DEVICE; From patchwork Mon Nov 26 22:38:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 152092 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp465974ljp; Mon, 26 Nov 2018 14:39:06 -0800 (PST) X-Google-Smtp-Source: AFSGD/V54Iigvd64DQHRs13zNjm1IDuiZ8fCmVGVWiHc10CylOFnk25AIFiaMET1j+McpyFSBFwc X-Received: by 2002:a63:594d:: with SMTP id j13mr26682347pgm.210.1543271946072; Mon, 26 Nov 2018 14:39:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543271946; cv=none; d=google.com; s=arc-20160816; b=ezxWgYkJbavfKiqlX2tOxUCPhEpSuXjRHtZZBx/6wiqN83UxHZPPhWz78DZoC8u/NC jrR+Ib+U97F1K1ROi4KnVdVfaUO840vVpc79/YW3AEk2A773Tjqrr62nsNoOVNFGysVH P+sUlNTv8HflLvmqbahwYCJHNOILt8H9qBI0wrw5dpma1fYTWuck+N4Glpkpf55HuhDQ AqXFFoekWLwbBcSLoJW/bmNXAk8+jZFrQd6qgEuJhz0AvUid6mAPBzZvEj4qUGB86A2M 1sfOnUEpJz5I1rxN2zE/PNRzohRXCThfhYJ4WC8RIzEtR1Y0XsgvQOOEBjPB74G71sBk eECg== 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=NVhJFQkIGbPh/vcyC1syFYfnQ8tgYrRLxFOROUtn3TQ=; b=u4XLYU2Vqv0jtTTLrOx121sg8z4lLnK48snpZsaTX/ioTfYp58k62rmPfYTGE9q0w8 6LrrBoYIfZnJHNIKH9ZCyBNbqMmgU5FSYoKyXzud2/ZzYNFuFO5oV9P4AAeVXMFSukpx BCUiEfoOTVgqYnyMJP9hT08I1/h9UW+2yPlLWKQl8bbX8+V9O9t4+Nh6zOc8rIY4wMik WrshcvpioaV5dgdOBcW8FCxJJehFWIondLrYJsAXkfCQNiPzcc3/osztA2h8AMV34dZy zO4ni11b3QT2JEbEcaCYMO767rzdcV8XrPw9NEsN/CSiQfsA7lT3a8++Z9xBZ3pulBNo QpSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=gtmzGz8W; 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 f9si1550870pgc.85.2018.11.26.14.39.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 14:39:06 -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=gtmzGz8W; 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 7F6ED21195BE3; Mon, 26 Nov 2018 14:38:45 -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::442; helo=mail-wr1-x442.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) (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 2117D21195BDD for ; Mon, 26 Nov 2018 14:38:44 -0800 (PST) Received: by mail-wr1-x442.google.com with SMTP id r10so20638033wrs.10 for ; Mon, 26 Nov 2018 14:38:44 -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=Lt39KwAiezuMfuyOFO+nkoKdSLDDovio3bWzmfY0Zg0=; b=gtmzGz8WNupTsHEIDwitKpsjQqgWhljbnoCmDexyffBsTjkDaAWEPOm8cfMHVt6N6m pV/byOA8/92ZcRL+Ttvmxuo9tkymSkHlgnbdzw+qpP7j7DXZANBz4Kktq6TUnV3rk4jy Vn2KXJ42oN3GLpwcYeUH9h28xPBuJH656qQtk= 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=Lt39KwAiezuMfuyOFO+nkoKdSLDDovio3bWzmfY0Zg0=; b=pypTBo+kP4ZpvIK8X+2Ti4XpN8tiuKnlGK4SjWOY8JOBsutoFrWWs+ep5NJw0uJi1b 3jUpC993tB1ZshboQbbNw3PnLcIpsRsqCkzCx817kN/PDIjn7J8gdwn4VTGAlO7pgOyI sZF5N5qLgSHO3mUsSZJZoofz4fsgAjI1oOmUcKzYd9/N6s5stggW9rcHm5OrCeu3uhYK zT3IMC95oWLr3D1NBt3AlMARkZK1Q/BJwYxEym9e4FU5ybLwhxeCmAOZEAVA/UYdvyS7 TDToVb1p1KlrwXWPNTqXwoGoTNHN4ZjYXiZJpff4Br/94NLNvCyVrfSLFk/cLJRp3bI3 k2LA== X-Gm-Message-State: AA+aEWZZyDYKKYrMruSc6dcfxsxuLb0INgjTMERFcWhxh3qkAOKZVHw6 B8lLl5Zm56X7+9NbTdoAB5ieggXIEzk= X-Received: by 2002:adf:e64d:: with SMTP id b13mr25988173wrn.276.1543271922349; Mon, 26 Nov 2018 14:38:42 -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.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 14:38:41 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Mon, 26 Nov 2018 23:38:00 +0100 Message-Id: <20181126223801.17121-13-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 12/13] ArmVirtPkg: drop PcdPrePiCpuMemorySize assignments from all platforms 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" PcdPrePiCpuMemorySize is no longer used so drop the PCD overrides from all platform descriptions in ArmVirtPkg. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- ArmVirtPkg/ArmVirt.dsc.inc | 3 --- ArmVirtPkg/ArmVirtQemu.dsc | 4 ---- ArmVirtPkg/ArmVirtQemuKernel.dsc | 4 ---- 3 files changed, 11 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/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc index 70a0ac4d786c..fbdb5c982604 100644 --- a/ArmVirtPkg/ArmVirt.dsc.inc +++ b/ArmVirtPkg/ArmVirt.dsc.inc @@ -388,9 +388,6 @@ [PcdsFixedAtBuild.common] # gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack|TRUE -[PcdsFixedAtBuild.ARM] - gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize|40 - [Components.common] # # Ramdisk support diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index 885c6b14b844..a107b6bb5104 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -143,10 +143,6 @@ [PcdsFixedAtBuild.common] gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize|16 [PcdsFixedAtBuild.AARCH64] - # KVM limits it IPA space to 40 bits (1 TB), so there is no need to - # support anything bigger, even if the host hardware does - gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize|40 - # Clearing BIT0 in this PCD prevents installing a 32-bit SMBIOS entry point, # if the entry point version is >= 3.0. AARCH64 OSes cannot assume the # presence of the 32-bit entry point anyway (because many AARCH64 systems diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc index 434d6861a56f..d8fbf14e8f4e 100644 --- a/ArmVirtPkg/ArmVirtQemuKernel.dsc +++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc @@ -157,10 +157,6 @@ [PcdsFixedAtBuild.AARCH64] # gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize|16 - # KVM limits it IPA space to 40 bits (1 TB), so there is no need to - # support anything bigger, even if the host hardware does - gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize|40 - [PcdsDynamicDefault.common] gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|3 From patchwork Mon Nov 26 22:38:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 152093 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp466028ljp; Mon, 26 Nov 2018 14:39:09 -0800 (PST) X-Google-Smtp-Source: AFSGD/UnQxPmYckUXUvimzaREnSXGdPlV1Jsza9WCKhONj53Y5dwoscq9E5cgSa660pnU9udSY5K X-Received: by 2002:a63:4d:: with SMTP id 74mr27484904pga.248.1543271949699; Mon, 26 Nov 2018 14:39:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543271949; cv=none; d=google.com; s=arc-20160816; b=YCmjIji357Aj7UroCXnYRqx2f0cfcMpJVjbUW9VUDFdgppiTwlun+cTKwzpRpQIuVf HhWuvbhkM15aXoFpljBK72oea1UBKWsHKnK+LxQdJVFZPyalLkaPy84za6WfTCi4q2ES 8CV4QwEp6C1ORKXeWyi9SeGt2mu9sHt8f1KJhY8tIsGqIAw1shy9mKIVwzV9DmhaG/Ad np/r1Ph1dlX5W6M4rcRJgO2C3WwqmUhJTaBNA4wEFvz5g2U153KRL6/M6y9iCdmJhnv/ xkanj5yCukgNZXTa5m68KgOiy9PeWFn2ug7qY5CuBqa6mnknKh1jlmOW2kQCVmILa4xY Z9vA== 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=QUIxHdMiPaTt7ZBde2OmMXxVzDi1Crz/1XDiIrYKdT4=; b=RxLaev1P3VKAJaoOEebl/wu1KL3OJ/KRInSfKIh4r01XLIcQlh5eTki8MPbClnAqIC cS3bSsFHCOM4iUGQQqzDAJ4GG2kbXFPXOalqBpaXs5BcqPcdtZOZaKBA/H+nr5HQBI1K be/NRaAydHigRWTikBJUYXDWbz/N+4UK6iMI78fGCUvvpaG28Y+CZeAp+88x7l4pyNI1 OiFE65feJKWtHR06P8mcoHawdqlgqJIKBD/1MBiQ2y5SMJAat8X4hjkCa/hI6yugI7Bc eOSapPdGiS8ykBMhGt/ZZC0I2unyagLL6PTDUDJxo/Kaitk4lSlbdi23K7toXlKhMJPr Fn2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="g2z8/Qfs"; 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 v83si1763948pfk.264.2018.11.26.14.39.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 14:39:09 -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="g2z8/Qfs"; 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 B25A921195BE5; Mon, 26 Nov 2018 14:38:47 -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::442; helo=mail-wr1-x442.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) (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 B729321195BD4 for ; Mon, 26 Nov 2018 14:38:46 -0800 (PST) Received: by mail-wr1-x442.google.com with SMTP id 96so20687259wrb.2 for ; Mon, 26 Nov 2018 14:38:46 -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=ENMkNP6TEOpANgPsv8Dx2Tp/JLt7k0puq/46dEJ1P1k=; b=g2z8/QfsY80YweCcFbnj9JtESiuUIIJ4sq/T7Am5pB25H1hP1Xz+DDfEtf5tPZoCAl zHDMT+Vnk7cUXAYqPBpIU+OAxq6vYFODAJYUxVQO/mtPs3SDY9HewJ+N0W8g4zXq48KO +DUi1yMO5bmoomn+i10q6hc8Wkpz1FTkN9EVk= 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=ENMkNP6TEOpANgPsv8Dx2Tp/JLt7k0puq/46dEJ1P1k=; b=b5GWrq0JQ7YnCKwnh9tKudu8mu0Mlh0+0pRAKsWfZTTyKpZgkzkl4ME4EJMFGOb9ML 7XgbEd1AP+ptcUaX0ZfSrRr8B7aI1+xdpLQjRZys379AEbnOmFB4DmlpS4H+F7Vi9Csi CdhGY1n1ZzCNGcHi2Hyk+U4UlJpRWfO+YejhVXMsLyvrDHPreSr/RWbC12OBgoXXXSOa vA/hU83ySJOJkZdFwQ+l54Y+oMyOOaWvSrIlMbAPzmttyZCS18bD3VDlLxgIqJY3+zqh GpR7M18vLPj2PIE1B0YXYr6FyWlVTRUkHPx/7GMVPRandPcLmd5UA1hmS6iFkCCxt3KJ dpdA== X-Gm-Message-State: AA+aEWad7RYd2TJqu3V6vWgceK26wkAc8HRKFejvnBBigJc1UhOWXZHs aTfRoaHXh2K6RZCzNBWsf+yyAXlkg+E= X-Received: by 2002:adf:a4d9:: with SMTP id h25mr23841856wrb.167.1543271924397; Mon, 26 Nov 2018 14:38:44 -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.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 14:38:42 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Mon, 26 Nov 2018 23:38:01 +0100 Message-Id: <20181126223801.17121-14-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 13/13] EmbeddedPkg/EmbeddedPkg.dec: drop PcdPrePiCpuMemorySize declarations 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" PcdPrePiCpuMemorySize is no longer used so drop the declarations from the package DEC file. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- EmbeddedPkg/EmbeddedPkg.dec | 4 ---- 1 file changed, 4 deletions(-) -- 2.19.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/EmbeddedPkg/EmbeddedPkg.dec b/EmbeddedPkg/EmbeddedPkg.dec index 28a143865d0e..ff5aab07d745 100644 --- a/EmbeddedPkg/EmbeddedPkg.dec +++ b/EmbeddedPkg/EmbeddedPkg.dec @@ -170,22 +170,18 @@ [PcdsFixedAtBuild.common] gEmbeddedTokenSpaceGuid.PcdAndroidBootDevicePath|L""|VOID*|0x00000057 [PcdsFixedAtBuild.ARM] - gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize|32|UINT8|0x00000010 gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize|0|UINT8|0x00000011 # ISP1761 USB OTG Controller gEmbeddedTokenSpaceGuid.PcdIsp1761BaseAddress|0|UINT32|0x00000021 [PcdsFixedAtBuild.AARCH64] - gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize|48|UINT8|0x00000010 gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize|0|UINT8|0x00000011 [PcdsFixedAtBuild.IA32] - gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize|36|UINT8|0x00000010 gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize|16|UINT8|0x00000011 [PcdsFixedAtBuild.X64] - gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize|52|UINT8|0x00000010 gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize|16|UINT8|0x00000011 [PcdsFixedAtBuild.common, PcdsDynamic.common]