From patchwork Fri Nov 23 12:14:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 151853 Delivered-To: patch@linaro.org Received: by 2002:aa7:da0f:0:0:0:0:0 with SMTP id r15csp2050692eds; Fri, 23 Nov 2018 04:14:47 -0800 (PST) X-Google-Smtp-Source: AJdET5ckFnYMCNi1ERi50sKfpZBeS2QjpvRHFC4WLHmp/uLq5hOnwVoxsujNiADreDMJ29l1/Dm+ X-Received: by 2002:a62:a511:: with SMTP id v17-v6mr15589291pfm.18.1542975287340; Fri, 23 Nov 2018 04:14:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542975287; cv=none; d=google.com; s=arc-20160816; b=wyvl/VdKXYmYTynvNLzFiWf++IX1HF736CaZjZHeuEobbYW71/VTweT25/mSG7u72O XcmH3oYJDzVPYpoGgc1n1eqdDXiSUk47sSTjj1Ct1AVLjf2m1rZ3LHfe/4YT7J7KZkMu H2cXp1gN3pnGxrcdaUoXGu7LPBUA+bFMTrP+juR7/415/qFc+Zu7R83YHafOKsnZ42oG OkN+56lNinVpBt/PyOx9njUlMswZxJoUPL6RXJPv52ggHadVEAW/viTRPuY2/BNpb1XI Q4ocLIrDv8qDsDMRZuTH1aPzllOAS9jMOqFOtt/F2tub0Z5KKCv5nfsLJcrPfgzwn3Wb 5PUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to; bh=vDfdpwZbFkgZ4WYORKAeF9uf8GEaFjkuk00ASKMLsVE=; b=Bv1QlYAt+IDPkJ1sQ7TK8Hin0jZJRWWOr6XFkQCnFHcDz/Y+ScWYX96Ok4Xb/8H/Nw pRAPQBk6Ou8pnfJM3JiIRGPQQhepKvyPUcTsBjfzkShwqg+IRyt3eLEsJROT3Lp9gCpa pVeGLtLz+txJmmWpqwM1EA0EWe/NcU8TRage313hh5g/rE2cC5kD+dK95fyRqoLH3PHj vZb8izcKN0EizotwlhAHAqtlA97yxtK2c/+NqZlznp4CHurmjeIG1OKlT89j2Z1hAgVv eF7Hf+5/LR+cyKOmo0tToQan3qUzC+sJ8z0gWX3rr125TOdrkef8aExH0HGdqzhHKOa9 Pl2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=TKAgx80e; 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 y1si52393484pgy.174.2018.11.23.04.14.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Nov 2018 04:14:47 -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=TKAgx80e; 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 B61D521A09130; Fri, 23 Nov 2018 04:14:46 -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 B05712119489A for ; Fri, 23 Nov 2018 04:14:45 -0800 (PST) Received: by mail-wr1-x441.google.com with SMTP id j2so12163024wrw.1 for ; Fri, 23 Nov 2018 04:14:45 -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; bh=Da7a/3z7QQDjJjgH8T5oH0XsH39r1Qg/EdsgOLfTJpk=; b=TKAgx80erRyTyZ1kX0o2bSJcjfMtUIF/ekhrVP8Ta5iwh2urgc2Qhdo3UeipoGaWGA SY3nUtUeZIMbd9/znLYqQhzG8XlpCkjdrSCjfvF4XWLb1u6xQ7snW872hPGG1FwVxYCZ 4f4/sZSk87cu3DZ7rahW3TaaSVoE2czMOhRrA= 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; bh=Da7a/3z7QQDjJjgH8T5oH0XsH39r1Qg/EdsgOLfTJpk=; b=ByIgtF5DJma6+LWOXeuSzBqa9BR3ntxOcHB5P6po5o3mmBVu6qe+yDNg3zypQcfhlr FznuQaTi58LVawtWCw25CbYmoRJG3aZD/DIXt+SS7Fbwb20aL/xcpp9CzSoR3Cs9kzRm ox/Et4nNvkykrgybTEPJg+GpxbonAKrFeKApNeSXuFKNeP7Ha2YpQSsHOCIOlcHOnjWN A4tb4gwzG/Bfjx4W/wlGQqUJ13lQ9H6AWxRDJmcA9RYW7zBErC+HViobrxlZbZMBhkUL 3vX5v3sonog4MIlldkDSPKXs190WG4a9NCDoxBVH8t9RNpL9BzN+BEaMqJ2HgRqY5PTI BB5w== X-Gm-Message-State: AA+aEWaEzTx8FkNx0GgqQNPzWTurTOlBeuhGPaHIOvxQ0iLxUb1ZlEjl eRkPHVMuLXdHtjfoWGzWq8//45AsxmYOHg== X-Received: by 2002:adf:b201:: with SMTP id u1mr5569326wra.165.1542975283505; Fri, 23 Nov 2018 04:14:43 -0800 (PST) Received: from mba13.wifi.ns.nl (33.153.69.91.rev.sfr.net. [91.69.153.33]) by smtp.gmail.com with ESMTPSA id x79sm16469106wmd.42.2018.11.23.04.14.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Nov 2018 04:14:42 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Fri, 23 Nov 2018 13:14:26 +0100 Message-Id: <20181123121431.22353-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.1 Subject: [edk2] [PATCH 0/5] ArmPkg, ArmVirtPkg: lift 40-bit IPA space limit 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 MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" The ArmVirtQemu targets currently limit the size of the IPA space to 40 bits because that is all what KVM supports. However, this is about to change, and so we need to update the code if we want to ensure that our UEFI firmware builds can keep running on systems that set values other than 40 (which could be > 40 or < 40) So add a helper to ArmLib to read the number of supported address bits (#1) and take this into account in the page table code (#2), which allows PcdPrePiCpuMemorySize to assume a value that exceeds the capabilities of the CPU. Patch #3 is mostly a cleanup patch, to switch to the new helper added in patch #1. No functional changes intended. Patch #4 builds the CPU hob (and thus declares the size of the GCD memory space) based on the CPU capabilities rather than the value of PcdPrePiCpuMemorySize, to prevent any potential regressions in memory utilization when we bump PcdPrePiCpuMemorySize back to 48. Patch #5 drops the definitions of PcdPrePiCpuMemorySize, reverting its value back to the default 48. Cc: Laszlo Ersek Cc: Leif Lindholm Cc: Eric Auger Cc: Andrew Jones Cc: Philippe Mathieu-Daude Cc: Julien Grall Ard Biesheuvel (5): ArmPkg/ArmLib: add support for reading the max physical address space size ArmPkg/ArmMmuLib: take the CPU supported maximum PA space into account ArmVirtPkg: refactor reading of the physical address space size ArmVirtPkg: disregard PcdPrePiCpuMemorySize PCD when sizing the GCD space ArmVirtPkg: revert PcdPrePiCpuMemorySize to is default value of 48 ArmPkg/Include/Library/ArmLib.h | 6 +++ ArmPkg/Library/ArmLib/AArch64/ArmLibSupport.S | 16 ++++++++ ArmPkg/Library/ArmLib/Arm/ArmLibSupport.S | 8 ++++ .../Library/ArmMmuLib/AArch64/ArmMmuLibCore.c | 5 ++- ArmVirtPkg/ArmVirtQemu.dsc | 5 --- ArmVirtPkg/ArmVirtQemu.fdf | 1 - ArmVirtPkg/ArmVirtQemuKernel.dsc | 4 -- .../Include/Library/ArmVirtMemInfoLib.h | 1 + .../ArmVirtMemoryInitPeiLib.c | 7 +++- .../ArmVirtMemoryInitPeiLib.inf | 1 + .../QemuVirtMemInfoLib/AArch64/PhysAddrTop.S | 39 ------------------- .../QemuVirtMemInfoLib/Arm/PhysAddrTop.S | 24 ------------ .../QemuVirtMemInfoLib/QemuVirtMemInfoLib.c | 6 +-- .../QemuVirtMemInfoLib/QemuVirtMemInfoLib.inf | 7 ---- .../QemuVirtMemInfoPeiLib.inf | 7 ---- .../XenVirtMemInfoLib/AArch64/PhysAddrTop.S | 39 ------------------- .../XenVirtMemInfoLib/Arm/PhysAddrTop.S | 24 ------------ .../XenVirtMemInfoLib/XenVirtMemInfoLib.c | 8 +--- .../XenVirtMemInfoLib/XenVirtMemInfoLib.inf | 6 --- .../PrePi/ArmVirtPrePiUniCoreRelocatable.inf | 3 -- ArmVirtPkg/PrePi/PrePi.c | 3 -- 21 files changed, 46 insertions(+), 174 deletions(-) delete mode 100644 ArmVirtPkg/Library/QemuVirtMemInfoLib/AArch64/PhysAddrTop.S delete mode 100644 ArmVirtPkg/Library/QemuVirtMemInfoLib/Arm/PhysAddrTop.S delete mode 100644 ArmVirtPkg/Library/XenVirtMemInfoLib/AArch64/PhysAddrTop.S delete mode 100644 ArmVirtPkg/Library/XenVirtMemInfoLib/Arm/PhysAddrTop.S -- 2.17.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel