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.43; helo=mga05.intel.com; envelope-from=hot.tian@intel.com; receiver=edk2-devel@lists.01.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (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 C436E21163DDF for ; Sat, 3 Nov 2018 16:45:55 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Nov 2018 16:45:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,461,1534834800"; d="scan'208";a="88377465" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga006.jf.intel.com with ESMTP; 03 Nov 2018 16:45:54 -0700 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sat, 3 Nov 2018 16:45:54 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sat, 3 Nov 2018 16:45:53 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.117]) by shsmsx102.ccr.corp.intel.com ([169.254.2.84]) with mapi id 14.03.0415.000; Sun, 4 Nov 2018 07:45:51 +0800 From: "Tian, Hot" To: Prem Kumar , "afish@apple.com" CC: "edk2-devel@lists.01.org" , "Gao, Liming" , "Ni, Ruiyu" Thread-Topic: [edk2] Building EmulatorPkg and EDK2 project issue. Thread-Index: AQHUcFmDGTKJ23g4XUqxJ5FKO4TUUaU38fQAgADO/oCABHqAAIAAjiyAgAAl0QCAABDcgIAAB9+AgAC0yeA= Date: Sat, 3 Nov 2018 23:45:50 +0000 Message-ID: <97159AD15C0F454180C255F8DA66135535E90D4B@SHSMSX104.ccr.corp.intel.com> References: <4A89E2EF3DFEDB4C8BFDE51014F606A14E362114@SHSMSX104.ccr.corp.intel.com> <93E95713-95E9-442B-9AA2-2B2C46EFCA20@apple.com> <6AA7E964-7A49-4C24-84EF-F291D615EC3C@apple.com> In-Reply-To: Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMDljOTRjOGQtZDcyNS00MmJjLWJhZjMtYzA1Y2RmZTI1MmFiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiQ1o3cjdwTEFPSGlXKzZXNnlxUVZUTmtyMFwvT0VBT1RUY1wvOVgxajhiODF5OXNUbmRQR0s2aXFwVHlIZmxrWWNHIn0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 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 23:45:56 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Are you using the latest EDKII master code? Windows support is added recent= ly by https://bugzilla.tianocore.org/show_bug.cgi?id=3D1112. + Ruiyu Ni. Thanks, Hot -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Prem= Kumar Sent: Sunday, November 04, 2018 4:55 To: afish@apple.com Cc: edk2-devel@lists.01.org; Gao, Liming Subject: Re: [edk2] Building EmulatorPkg and EDK2 project issue. Hi Andrew, Thanks for your explanation. After building for x64 I could see below error. C:\UEFIWorkspace\edk2-master_2018_Latest\Build\EmulatorX64\DEBUG_VS2015x86\= X64>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 0x65e70000 to SEC ERROR : Ca= n not open Firmware Device File ../FV/FV_RECOVERY.fd (0xE). Exiting. *I've searched for FV_RECOVERY.fd in entire project and found no such file = generated after built.* -- Thanks & Regards, Prem. On Sun, Nov 4, 2018 at 1:56 AM Andrew Fish wrote: > Prem, > > I've not run the emulator on Windows in a very very long time. But=20 > lets take a look at your error message. > > /Volumes/Case/UDK2018(vUDK2018)>git grep "Could not allocate=20 > PeiServicesTablePage" > EmulatorPkg/Unix/Host/Host.c:508: printf ("MapFd0(): *Could not > allocate PeiServicesTablePage* @ %lx\n", (long unsigned=20 > int)EmuMagicPage); > > That seems to point to PcdPeiServicesTablePage=20 > /Volumes/Case/UDK2018(vUDK2018)>git grep PcdPeiServicesTablePage --=20 > *.dec > EmulatorPkg/EmulatorPkg.dec:73: gEmulatorPkgTokenSpaceGuid. > *PcdPeiServicesTablePage*|0x1003000000|UINT64|0x0000101b > > Which has a default value of 0x1003000000. But since you built for=20 > IA32 it gets truncated to 0x03000000 > > Do you need 32-bit IA32? Can do a 64-bit build and use X64. Something lik= e: > > 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=20 > 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=20 > int)EmuMagicPage); Given the width of long is different on different=20 > platforms. UINT64 uses long long to make sure things are 64-bits. Not=20 > 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=20 > build, > > *1.Launching Emulator using below command:*=20 > 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=20 > : Could not allocate PeiServicesTablePage @ 03000000 > > *2. Launching WinHose.exe directly:* > > C:\UEFIWorkspace\edk2-master_2018_Latest\Build\EmulatorIA32\DEBUG_VS20 > 15x86\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=20 > : Could not allocate PeiServicesTablePage @ 03000000 > > > > -- > Regards, > Prem. > > > _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel