From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::52e; helo=mail-ed1-x52e.google.com; envelope-from=perry.prem@gmail.com; receiver=edk2-devel@lists.01.org Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) (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 6F6E921173C7D for ; Sat, 3 Nov 2018 13:55:31 -0700 (PDT) Received: by mail-ed1-x52e.google.com with SMTP id n19-v6so4426162edq.11 for ; Sat, 03 Nov 2018 13:55:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=pbWYMWr/mNrvEvqjSnTI8E3IckzNel7s+PLqFFLlrEs=; b=B802oEsYDR7TjX0lFFqgJU/zJYeLuq4P2+S6OSEWefh4yJs8mCpsWVCjP8d2Z0EHxN Gj0MFqVQB0JMKM8eBjOzC0YBb/mlp7JLJZ+7yxFKCExH8vifLsS/vejJSq0gDCSe4UwZ 0BTIPEb/XV/Jx+mnBYmFwiewl5OfUI7DWQz3/jfrPJrXJj29qZnjyddrk9rH26PX7zXX NZezksosiBA/uhssXD4Zuy6TpQk8oB7S8e3e6Iear5jHqc94XM0OXZZhfX4LQVtXkDSe Iuo3V3uGghszJ/hwSLUkvVhuQCbJEN5ISoMwbPnuNroQFQIgK3tNEs1z5h2YRXUKCcub WIeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=pbWYMWr/mNrvEvqjSnTI8E3IckzNel7s+PLqFFLlrEs=; b=na50e9AVmk2GVdYfIosheqilgYgq7UyPn8Yc2Gz4wttKZV95QGzjgNrBqayc4QXLX5 /kZLFlM3w5m1PzYs5O/O0d8b2XCzLf8qMDIcxs8YMe1MPk7Jq0pBLh/KUJQI62+nTsTl chuyWTjhxyTt5q6yLp2QSPTi3HvS5HslVSN/xRnihpJTKEgHc16sVsDGEawxMXKP+Q2B FfJ4NYFE8plyEhOdcxgEgdn0aY1uSS0VN8YFkygu3CXRnYiwKCQIlKzMoCbVaIdOxaue mxcbLxGvjGUnfu+tYay6flj4MCKd5lsxtm/Lq3LJClGOxVJDtUmhkAIT3MwTGbDQQ6Oi XvEQ== X-Gm-Message-State: AGRZ1gLnFnIeYNt9u2O2669G7d+MmXgN7lmYBrPckAisQtYc7AOxNMSZ ddNpFhRl40Co/r906kyNppWPYfOwzzBOUtPPaJQIds/q X-Google-Smtp-Source: AJdET5foIqmYB9T9LoLaa/qEr44dS2TMbQhOR304zVEczwjLKfeBiRgWSc20F4FF7gtO7R25ksnnpuVa6KOBpWXbjVI= X-Received: by 2002:aa7:c607:: with SMTP id h7-v6mr13133994edq.9.1541278529838; Sat, 03 Nov 2018 13:55:29 -0700 (PDT) MIME-Version: 1.0 References: <4A89E2EF3DFEDB4C8BFDE51014F606A14E362114@SHSMSX104.ccr.corp.intel.com> <93E95713-95E9-442B-9AA2-2B2C46EFCA20@apple.com> <6AA7E964-7A49-4C24-84EF-F291D615EC3C@apple.com> In-Reply-To: <6AA7E964-7A49-4C24-84EF-F291D615EC3C@apple.com> From: Prem Kumar Date: Sun, 4 Nov 2018 02:25:01 +0530 Message-ID: To: afish@apple.com Cc: liming.gao@intel.com, edk2-devel@lists.01.org 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:55:31 -0000 Content-Type: text/plain; charset="UTF-8" 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 : Can 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 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. > > >