On 31.01.2011, at 10:02, Gleb Natapov wrote: > Currently linuxboot.bin and multiboot.bin option roms override int19 > vector to intercept boot process. No sane option rom should do that. > Provide bev entry instead that will be called by BIOS if option rom > is selected for booting. > > Signed-off-by: Gleb Natapov <g...@redhat.com> > --- > > Note that this patch should be applied after qemu will upgrade to Seabios > that supports boot order. Otherwise there will be change in behavior > since option rom will not be selected for booting by default. > > diff --git a/pc-bios/optionrom/linuxboot.S b/pc-bios/optionrom/linuxboot.S > index c109363..79b3ae8 100644 > --- a/pc-bios/optionrom/linuxboot.S > +++ b/pc-bios/optionrom/linuxboot.S > @@ -22,6 +22,8 @@ > > #include "optionrom.h" > > +#define PRODUCT "Linux loader" > + > BOOT_ROM_START > > run_linuxboot: > diff --git a/pc-bios/optionrom/multiboot.S b/pc-bios/optionrom/multiboot.S > index 9131837..069c4e8 100644 > --- a/pc-bios/optionrom/multiboot.S > +++ b/pc-bios/optionrom/multiboot.S > @@ -20,6 +20,8 @@ > > #include "optionrom.h" > > +#define PRODUCT "multiboot loader" > + > #define MULTIBOOT_MAGIC 0x2badb002 > > #define GS_PROT_JUMP 0 > diff --git a/pc-bios/optionrom/optionrom.h b/pc-bios/optionrom/optionrom.h > index fbdd48a..95dbdda 100644 > --- a/pc-bios/optionrom/optionrom.h > +++ b/pc-bios/optionrom/optionrom.h > @@ -93,31 +93,41 @@ > .global _start; \ > _start:; \ > .short 0xaa55; \ > - .byte (_end - _start) / 512; > + .byte (_end - _start) / 512; \ > + lret; \ > + .org 0x18; \ > + .short 0; \ > + .short _pnph; \ > + _pnph: \ > + .ascii "$PnP"; \
The idea behind the OPTION_ROM and BOOT_ROM split was to have a generic header that can be used as template for random option roms or boot roms alike. Your patch munges those two use-cases together by providing bev logic in the generic option rom part. Please split it out into the BOOT_ROM macro, or - if necessary - create a new macro. Alex