From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-x22b.google.com (mail-io0-x22b.google.com [IPv6:2607:f8b0:4001:c06::22b]) (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 99E1E1A1DF1 for ; Tue, 20 Sep 2016 11:38:12 -0700 (PDT) Received: by mail-io0-x22b.google.com with SMTP id m79so29135119ioo.3 for ; Tue, 20 Sep 2016 11:38:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=vc0V1m2OvLFJVe35s4D5jFPyd1uRX7RATsTNeQwIgEY=; b=i79vsVWx/YH9R/eTxyNruzDUw6sWgtKBUMuro1B9jPW+eqJOK4ahFBPjLh/cLCpQ3m KVmSWqVgGKopO9ts9bzA5Uc4WuEVkxKUmUYpW5Yx26+1W8z8okMbIP5bIQdToZOyNKpK AoAS+tx6sNzaRFNt69xF8SWSdJUb9bODIO+RGk5EHICNnkeadM4XLIoY/iY9M9F3d/BF QBMb88Rix9P/1oEgEzUrD833hOrY7vaiM7qMeWd9r2vz97ndcNWSvQU/RM4uyjrYtdLj v+9/t+MBdqptJtZretParGq3628c1gdPEYRWylGvrJ0wttol4Ya5SGNyQvLUMzc0yeK0 kBmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=vc0V1m2OvLFJVe35s4D5jFPyd1uRX7RATsTNeQwIgEY=; b=EyALVylJ4/AReC/GKlqX149UQYwjqO0xgDPtJ0+MHDW3f9wJP6t7HRqDkb39p+cmBr j6v+WY/yRf6mLPZZRrWsptrcIfv8hakcK+8xrpF39bb/TUU3cV7pb6J+KtLp6nLQrUDN cBv/WmRE2adIp+N6IOrj89TDmw+wq6QmKCQFu2czK1tU7NtGxlMhBMHRbh+L1fxmH/gU xM0LkrByzRZYYsf1S6zwXWAnrsWVl15UOYheforxJ/3t+A+ry8X4BzvVPdwO9aK8xUeD 5ae5zTPUTFWRySh15avaXs8fhjvmTCXn73XkQyYmDT/6NMt1vHvEgR2XsdeLNUVSJp3Y rAPg== X-Gm-Message-State: AE9vXwOAcvmNjy2fwdrIAmOwX4gkRJhu3VKb2/B3nQOW23wwPMHQHuhJPA7ZNBPAFZExddwDWYZ8f6pkdhSLlQ== X-Received: by 10.107.35.73 with SMTP id j70mr45898852ioj.9.1474396691842; Tue, 20 Sep 2016 11:38:11 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.196.214 with HTTP; Tue, 20 Sep 2016 11:38:11 -0700 (PDT) In-Reply-To: <2c8f7b31-7cc5-38cf-a56f-d60229ace8e9@redhat.com> References: <2c8f7b31-7cc5-38cf-a56f-d60229ace8e9@redhat.com> From: Saqib Khan Date: Tue, 20 Sep 2016 23:38:11 +0500 Message-ID: To: Laszlo Ersek Cc: edk2-devel@lists.01.org X-Content-Filtered-By: Mailman/MimeDel 2.1.21 Subject: Re: Help Required legacy booting from an EFI X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 18:38:12 -0000 Content-Type: text/plain; charset=UTF-8 On Mon, Sep 19, 2016 at 10:49 PM, Laszlo Ersek wrote: > On 09/19/16 17:00, Saqib Khan wrote: > > Hello all, this is my first post to this list and i am very new to edk2 > > development. > > > > I started by building BootManagerMenuApp with following functionality > > > > - Boot from BootManagerManueApp > > - Run an Helloworld EFI > > - Run windows 7 EFI to boot windows 7 > > > > Now i want to develop an EFI which will first run Helloworld EFI then it > > will boot windows 7 which is installed on legacy boot (NOT EFI). > > > > I have looked through http://bluestop.org/edk2/docs/trunk/ documentation > > thoroughly but i am not able to get any thing for legacy boot from an > EFI. > > > > > > It will be helpful if someone guide me the flow for legacy booting from > an > > EFI . > > You can add your EFI application to a SysPrep#### load option, then the > legacy-booted Windows OS to a normal Boot#### load option. > Sysprep is not my option . :-( > > > See "3.1.7 Required System Preparation Applications" in the UEFI-2.6 > spec, about the ordering between SysPrep#### and Boot####. > > Furthermore, legacy boot can be triggered by using a BBS (BIOS Boot > Specification) device path in the Boot#### option. This devpath node > type is documented in UEFI-2.6 "Table 98. Device Node Table", and in the > Compatibility Support Module Specification, rev 0.98, "3.2.1 Legacy BIOS > Protocol", near BBS_BBS_DEVICE_PATH. > Booting using BBS is my option,i was already looking for this and I have attempted to modify EFIBootManagerMenuApp to work with legacy boot used (). I have system with CSM support so essentially i will be doing all my work on physical system not on virtual machine. The detail you provided about BBS device path and then adding it to boot menu is abstract for me .if you can detail this procedure a bit it will be helpful, if required I can share the code snippet with you Apart from this I am facing another issue, i created a boot-able USB with EFI 2.0 shell in it . I have gabby motherboard(gigabyte h97- hd3) , I am not able to launch EFI shell with any configuration it directly boots windows no matter what I do, I attempted all USB port, and all configuration like "boot from UEFI only" disabling secure boot. when I plug US B in another system which support UEFI but not CSM it works fine after adding shell entry from USB. what might I be missing here?can you guide in this case? > > For legacy boot to work, your platform firmware must of course include a > Compatibility Support Module. > > As an example platform, SeaBIOS can be built as a CSM, then embedded > into OVMF with the -D CSM_ENABLE build switch. (Grep > OvmfPkg/OvmfPkg*.{dsc,fdf} for CSM_ENABLE.) > > Specifically for Windows 7 though, you don't need a full CSM in order to > boot it under UEFI. You can boot it in UEFI mode just fine, as long as > you have some VBE services installed in the C segment. Windows 7 will > run those functions in its internal real-mode emulator, for setting up > the display: > > https://en.wikipedia.org/wiki/Virtual_DOS_machine > > That is, the VBE functions will not be executed natively, they will be > interpreted / emulated. > > We utilized this fact for booting UEFI Windows 7 without a CSM on QEMU, > on the virtual QXL video card; see OvmfPkg/QemuVideoDxe/VbeShim.*. > > Thanks > Laszlo > > -- Regards Saqib