[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] multiboot on EFI

From: Robert Millan
Subject: Re: [PATCH] multiboot on EFI
Date: Fri, 7 Aug 2009 12:53:56 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

On Wed, Aug 05, 2009 at 12:33:56PM +0200, Vladimir 'phcoder' Serbinenko wrote:
> >>  static grub_err_t
> >>  grub_multiboot_boot (void)
> >>  {
> >> +#ifdef GRUB_MACHINE_EFI
> >> +  if (! grub_efi_finish_boot_services ())
> >> +     grub_fatal ("cannot exit boot services");
> >> +#endif
> >
> > grub_fatal() terminates GRUB.  I suggest you just error out instead, so that
> > user can try other things.
> >
> It's how it's done in efi/linux.c and according to EFI spec it can't
> fail in this code. But I agree with you that both instances should be
> changed

What does the spec say?  If after grub_efi_finish_boot_services() exits with
error EFI is inoperative, we wouldn't be able to print this message.

OTOH, sometimes specs are overzealous about what implementations can and can't
do.  If this requirement is gratuitous, we don't have to follow it.

> >> -  grub_loader_set (grub_multiboot_boot, grub_multiboot_unload, 1);
> >> +  grub_loader_set (grub_multiboot_boot, grub_multiboot_unload, 0);
> >
> > This breaks text-mode payloads when they're loaded from gfxterm.
> >
> Ok I will make it use the modesetting as linux.c does. text-mode only
> payloads are broken on EFI anyway

I was concerned with text-mode payloads on BIOS, coreboot, etc.  When you pass
0, grub_machine_fini()/grub_console_fini() is not reached, so GRUB won't switch
to text mode when loading them.

(Btw this API is so awkward because of the way it has evolved.  I think it'd be
a good idea to simply call grub_console_fini() from loaders when they have to)

> since AFAIK no real EFI machine has
> VGA console available

Does Tianocore/QEMU have VGA?  I assume it is not forbidden to provide it
in EFI systems, as it can be found in e.g. coreboot.

> unless we find a way to load one without loading
> BIOS emulation. Bean may know more.

VGA doesn't need BIOS calls.  BIOS provides disk and keyboard, which the
VGA ROM doesn't need, so the VGA ROM can be run standalone.  This
is already done by coreboot, and by GRUB in the i386-qemu port (it
can be done by switching to real mode and call $0xc000, $0x3).

Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."

reply via email to

[Prev in Thread] Current Thread [Next in Thread]