22.01.2016 22:06, Vladimir 'φ-coder/phcoder' Serbinenko пишет:
> On 18.08.2015 21:17, Ben Hildred wrote:
>> Let's assume for a minute that I have compiled grub as a multiboot image
>> and have called it from another bootloader, say iPXE.Now iPXE assumes
>> that any false return is an error. What happens when grub returns with
>> exit next, does iPXE get a true or false? What about exit fred where
>> fred is not defined by any platform? What if I do an exit config which
>> is only defined for coreboot?
> Neither multiboot nor coreboot have any return semantics. The situation
> with current platforms is as follows:
> No return/exit semantics at all or machine shutdown:
> i386_coreboot, i386_qemu, i386_multiboot, mips_qemu_mips, mips_loongson
> no-args exit:
> *-ieee1275, i386-pc, mips-arc
> Xen semantics (crash vs poweroff):
> *-xen
> EFI semantics:
> *-efi
> Unix-like semantics:
> arm-uboot, emu
> 
> Emu is of no real interest and I have no idea what Uboot does with
> return code but I suppose nothing.
> 
> This leaves us only with xen and EFI semantics. Xen is enough of outlier
> to handle it separately. So only EFI is remaining.
> 
> On i386-pc the default behaviour of exit is to try next boot entry. EFI
> should probably do the same. What is the current behaviour of grub_exit
> and what is the value in returning EFI_SUCCESS ?

Currently it returns EFI_SUCCESS that tells firmware boot manager to
return to menu and stop attempting to load further boot options. I.e.
this is directly opposite to what i386-pc.

OTOH I still find it useful to be able to explicitly return to boot menu
from GRUB (or EFI Shell for that matter).

> Can we have returncode-aware command to be EFI-specific?
> 

I'm fine with changing default EFI exit code to be not EFI_SUCCESS (but
this should be commented in sources) and to have fwmenu (similar to
fwsetup) that explicitly returns EFI_SUCCESS.

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to