From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.136; helo=mga12.intel.com; envelope-from=star.zeng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (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 7F6252034860B for ; Tue, 22 May 2018 19:03:25 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 May 2018 19:03:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,431,1520924400"; d="scan'208";a="57647720" Received: from shzintpr01.sh.intel.com (HELO [10.253.24.23]) ([10.239.4.80]) by fmsmga001.fm.intel.com with ESMTP; 22 May 2018 19:03:23 -0700 To: Laszlo Ersek , Ard Biesheuvel , "Kinney, Michael D" Cc: "Dong, Eric" , "edk2-devel@lists.01.org" , "Gao, Liming" , "Bi, Dandan" , Leif Lindholm , star.zeng@intel.com References: <20180522140850.30369-1-ard.biesheuvel@linaro.org> <20180522140850.30369-4-ard.biesheuvel@linaro.org> From: "Zeng, Star" Message-ID: <87161287-2d33-ed8f-d9d3-c2fead7189df@intel.com> Date: Wed, 23 May 2018 10:02:52 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Subject: Re: [PATCH 3/6] MdePkg/UefiLib: introduce EfiAllocatePeiAccessiblePages routine X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 02:03:25 -0000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit On 2018/5/23 3:11, Laszlo Ersek wrote: > On 05/22/18 19:47, Ard Biesheuvel wrote: > >> OK, to summarize: >> - move the implementation of EfiAllocatePeiAccessiblePages() to >> DxeServicesLib (and perhaps rename it to something more appropriate >> for its new home) >> - only restrict the X64 version to below 4 GB if EfiMemoryTop and >> EfiFreeMemoryTop are both below 4 GB. Just checking EfiFreeMemoryTop should be enough as EfiFreeMemoryTop means the capable TOP to be allocated. And seemingly, there is an assumption here that next boot PEI S3 has same situation with current boot PEI. Thanks, Star > > If this works with pure X64 OVMF (including S3 without SMM), I'd be very > happy with it. > > Also we should regression test whether IA32X64 OVMF continues working > (including S3 without SMM, and S3 with SMM). > > I'm glad to help with the testing once patches are posted. > > OVMF installs the permanent PEI RAM in PublishPeiMemory() > [OvmfPkg/PlatformPei/MemDetect.c]. It keeps things under 4GB, so I think > this approach should work. > > Thanks Ard & Mike! > Laszlo >