public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Saqib Khan <saqib.khan2011@gmail.com>
To: Laszlo Ersek <lersek@redhat.com>
Cc: edk2-devel@lists.01.org
Subject: Re: Help Required legacy booting from an EFI
Date: Tue, 20 Sep 2016 23:38:11 +0500	[thread overview]
Message-ID: <CAF=YJJ-022aX7QnwOB3f1Yo_VZUXa44OHbDyJY59aps=+2Bz1A@mail.gmail.com> (raw)
In-Reply-To: <2c8f7b31-7cc5-38cf-a56f-d60229ace8e9@redhat.com>

On Mon, Sep 19, 2016 at 10:49 PM, Laszlo Ersek <lersek@redhat.com> 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


  reply	other threads:[~2016-09-20 18:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-19 15:00 Help Required legacy booting from an EFI Saqib Khan
2016-09-19 17:49 ` Laszlo Ersek
2016-09-20 18:38   ` Saqib Khan [this message]
2016-09-20 19:13     ` Laszlo Ersek
2016-09-22 11:25       ` Saqib Khan
2016-09-23  3:33         ` Laszlo Ersek
2016-09-20 19:41     ` Rod Smith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAF=YJJ-022aX7QnwOB3f1Yo_VZUXa44OHbDyJY59aps=+2Bz1A@mail.gmail.com' \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox