From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=17.171.2.60; helo=ma1-aaemail-dr-lapp01.apple.com; envelope-from=afish@apple.com; receiver=edk2-devel@lists.01.org Received: from ma1-aaemail-dr-lapp01.apple.com (ma1-aaemail-dr-lapp01.apple.com [17.171.2.60]) (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 32F9D21173C7D for ; Sat, 3 Nov 2018 13:27:00 -0700 (PDT) Received: from pps.filterd (ma1-aaemail-dr-lapp01.apple.com [127.0.0.1]) by ma1-aaemail-dr-lapp01.apple.com (8.16.0.22/8.16.0.22) with SMTP id wA3KLsCw048138; Sat, 3 Nov 2018 13:26:57 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=mime-version : content-type : sender : from : message-id : subject : date : in-reply-to : cc : to : references; s=20180706; bh=WsKmd1gOl1m6phTzFUb+mLkB55iXFirUf4fjuwo6gmw=; b=JuRc7ZXZwe4p1ia71T9RYLZOyQzI8NERYMgHx27T27X82KV6NPVOfhAXRBUyGlrhnKCH m17IY4luAV0uUoC1o9v6+4XV/vImL8YbsQj5lJJZVRKSZ14fZwgUyqjQZNj677nW0t0l RtdLpcq0mJC9+TyFVhRwLm5HrDfnCm3SgIqQ2Dta07R8AJIIktka3g+Ha/7iBUVqmKNO ztbO+1so+HsuhC3M3DG+dM2/4iTqJ5XgIAh1RVISF3Tz+7Xx+q7r2ToZFHH3+xvuRAJy a9oH1Iz0sEZo/gjpkiUdk4sz8dyJj0pKTV0yPtuMj1HdaHW0CNZ7EmT5K9+C9sxF+4jv sw== Received: from ma1-mtap-s01.corp.apple.com (ma1-mtap-s01.corp.apple.com [17.40.76.5]) by ma1-aaemail-dr-lapp01.apple.com with ESMTP id 2nhab5qbhs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Sat, 03 Nov 2018 13:26:57 -0700 MIME-version: 1.0 Received: from ma1-mmpp-sz09.apple.com (ma1-mmpp-sz09.apple.com [17.171.128.183]) by ma1-mtap-s01.corp.apple.com (Oracle Communications Messaging Server 8.0.2.3.20180614 64bit (built Jun 14 2018)) with ESMTPS id <0PHM0017IWSX5170@ma1-mtap-s01.corp.apple.com>; Sat, 03 Nov 2018 13:26:57 -0700 (PDT) Received: from process_viserion-daemon.ma1-mmpp-sz09.apple.com by ma1-mmpp-sz09.apple.com (Oracle Communications Messaging Server 8.0.2.3.20180614 64bit (built Jun 14 2018)) id <0PHM00K00W8FPI00@ma1-mmpp-sz09.apple.com>; Sat, 03 Nov 2018 13:26:57 -0700 (PDT) X-Va-A: X-Va-T-CD: 4fafd5b5912966ac9494a9ce418e6367 X-Va-E-CD: 3dcd49a262554cd29ae98418a224c1ad X-Va-R-CD: 271156246fd3f0ab27fcb6797b2db959 X-Va-CD: 0 X-Va-ID: d7129f0c-6842-4d7e-a151-7948074d8481 X-V-A: X-V-T-CD: fbe447b60d40f260936e300fd54beff5 X-V-E-CD: 3dcd49a262554cd29ae98418a224c1ad X-V-R-CD: 271156246fd3f0ab27fcb6797b2db959 X-V-CD: 0 X-V-ID: b5164422-cc3e-46d0-9578-b7e608d8e6ea Received: from process_milters-daemon.ma1-mmpp-sz09.apple.com by ma1-mmpp-sz09.apple.com (Oracle Communications Messaging Server 8.0.2.3.20180614 64bit (built Jun 14 2018)) id <0PHM00900VK0C700@ma1-mmpp-sz09.apple.com>; Sat, 03 Nov 2018 13:26:56 -0700 (PDT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-11-03_12:,, signatures=0 Received: from [17.234.233.216] (unknown [17.234.233.216]) by ma1-mmpp-sz09.apple.com (Oracle Communications Messaging Server 8.0.2.3.20180614 64bit (built Jun 14 2018)) with ESMTPSA id <0PHM00JBVWSTE540@ma1-mmpp-sz09.apple.com>; Sat, 03 Nov 2018 13:26:56 -0700 (PDT) Sender: afish@apple.com From: Andrew Fish Message-id: <6AA7E964-7A49-4C24-84EF-F291D615EC3C@apple.com> Date: Sat, 03 Nov 2018 13:26:51 -0700 In-reply-to: Cc: liming.gao@intel.com, edk2-devel@lists.01.org To: Prem Kumar References: <4A89E2EF3DFEDB4C8BFDE51014F606A14E362114@SHSMSX104.ccr.corp.intel.com> <93E95713-95E9-442B-9AA2-2B2C46EFCA20@apple.com> X-Mailer: Apple Mail (2.3445.6.18) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-11-03_12:, , signatures=0 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: Building EmulatorPkg and EDK2 project issue. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Nov 2018 20:27:01 -0000 Content-Type: text/plain; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT Prem, I've not run the emulator on Windows in a very very long time. But lets take a look at your error message. /Volumes/Case/UDK2018(vUDK2018)>git grep "Could not allocate PeiServicesTablePage" EmulatorPkg/Unix/Host/Host.c:508: printf ("MapFd0(): Could not allocate PeiServicesTablePage @ %lx\n", (long unsigned int)EmuMagicPage); That seems to point to PcdPeiServicesTablePage /Volumes/Case/UDK2018(vUDK2018)>git grep PcdPeiServicesTablePage -- *.dec EmulatorPkg/EmulatorPkg.dec:73: gEmulatorPkgTokenSpaceGuid.PcdPeiServicesTablePage|0x1003000000|UINT64|0x0000101b Which has a default value of 0x1003000000. But since you built for IA32 it gets truncated to 0x03000000 Do you need 32-bit IA32? Can do a 64-bit build and use X64. Something like: build -p EmulatorPkg\EmulatorPkg.dsc -t VS2015x86 -D WIN_SEC_BUILD -a X64 -m EmulatorPkg/Win/Host/WinHost.inf It looks like that is hard coded address that needs to get allocated in the emulator, and in your case that allocation is failing. Thanks, Andrew Fish PS I'm not sure the printf is correct: printf ("MapFd0(): Could not allocate PeiServicesTablePage @ %lx\n", (long unsigned int)EmuMagicPage); Given the width of long is different on different platforms. UINT64 uses long long to make sure things are 64-bits. Not to mention EmuMagicPage is a pointer, not an long unsigned int. > On Nov 3, 2018, at 12:26 PM, Prem Kumar wrote: > > Hi Andrew, > Thanks for your reply. > > Below is the error when trying to launch Emulator after successful build, > > 1.Launching Emulator using below command: > C:\UEFIWorkspace\edk2-master_2018_Latest>cd Build\EmulatorIA32\DEBUG_VS2015x86\IA32\ && WinHost.exe > > EDK II WIN Host Emulation Environment from http://www.tianocore.org/edk2/ > BootMode 0x00 > OS Emulator passing in 128 KB of temp RAM at 0x04400000 to SEC > ERROR : Could not allocate PeiServicesTablePage @ 03000000 > > 2. Launching WinHose.exe directly: > C:\UEFIWorkspace\edk2-master_2018_Latest\Build\EmulatorIA32\DEBUG_VS2015x86\IA32>WinHost.exe > > EDK II WIN Host Emulation Environment from http://www.tianocore.org/edk2/ > BootMode 0x00 > OS Emulator passing in 128 KB of temp RAM at 0x04ab0000 to SEC > ERROR : Could not allocate PeiServicesTablePage @ 03000000 > > > > -- > Regards, > Prem.