From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from muon.cran.org.uk (muon.bluestop.org [IPv6:2605:7700:0:8:1:0:4a32:3323]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 7A11721E11D16 for ; Mon, 28 Aug 2017 16:50:47 -0700 (PDT) Received: from muon.bluestop.org (localhost [127.0.0.1]) by muon.cran.org.uk (Postfix) with ESMTP id 44F5894E98; Mon, 28 Aug 2017 23:53:25 +0000 (UTC) Received: from muon.cran.org.uk ([127.0.0.1]) by muon.bluestop.org (muon.bluestop.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id U1nbLHZncyTg; Mon, 28 Aug 2017 23:53:24 +0000 (UTC) Received: from [10.50.2.106] (63-158-132-10.dia.static.qwest.net [63.158.132.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by muon.cran.org.uk (Postfix) with ESMTPSA; Mon, 28 Aug 2017 23:53:23 +0000 (UTC) To: Andrew Fish , Laszlo Ersek Cc: Mike Kinney , edk2-devel-01 , "Gao, Liming" , Ard Biesheuvel References: <1714bf60-83a1-ce07-1d71-ac729d8e9dc8@redhat.com> <06C8AB66E78EE34A949939824ABE2B313B57604E@shsmsx102.ccr.corp.intel.com> <37998be6-89f9-23a7-b1f5-a4527651d708@redhat.com> <06C8AB66E78EE34A949939824ABE2B313B57610E@shsmsx102.ccr.corp.intel.com> From: Rebecca Cran Message-ID: <890e9eaf-8c68-4b52-dbba-9938c0315732@bluestop.org> Date: Mon, 28 Aug 2017 17:53:23 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Subject: Re: "practical" memory allocation limit? X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Aug 2017 23:50:47 -0000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit On 08/28/2017 10:23 AM, Andrew Fish wrote: > For X64 (x86-64) systems it is common for PEI to run in 32-bit mode with paging disabled. This means the DXE Core gets loaded under 4GB and and the HOBs and such are < 4GB. So having the initial memory map < 4GB helps with preventing fragmentation. This is something I ran into with a driver I was working on: when being Load'd from a PCIe optrom only 4GB RAM could be seen; later, in the Start function, all 32GB or however much could be accessed. Then there was still the problem of certain machines limiting AllocatePool calls to 4GB, which since our driver at times needed many times that amount required us to iterate over the memory map and call AllocatePages. -- Rebecca Cran