Statistics
| Branch: | Revision:

root / pc-bios / optionrom @ 2a2af967

# Date Author Comment
2a2af967 02/18/2012 12:15 pm Jan Kiszka

kvmvapic: Add option ROM

This imports and builds the original VAPIC option ROM of qemu-kvm.
Its interaction with QEMU is described in the commit that introduces the
corresponding device model.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Avi Kivity <>

6fbcef29 02/01/2012 10:45 pm Jan Kiszka

optionroms: Silence intermediate file removal

The build process of optionroms spits out an "rm ..." line. Moreover, it
removes all .o files that can be handy for debugging purposes. So
disable automatic intermediate removal.

Signed-off-by: Jan Kiszka <>...

e7d81004 12/14/2011 01:09 pm Stefan Weil

Fix spelling in comments, documentation and messages

accidently->accidentally
annother->another
choosen->chosen
consideres->considers
decriptor->descriptor
developement->development
paramter->parameter
preceed->precede
preceeding->preceding
priviledge->privilege...

75b9f690 03/22/2011 08:00 am Gleb Natapov

fix linuxboot.bin and multiboot.bin to not hijack int19

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...

4c3b5a48 01/20/2011 10:54 pm Blue Swirl

Add scripts directory

Move build and user scripts into scripts directory.

Signed-off-by: Blue Swirl <>

33bbd1de 11/21/2010 05:16 pm Avi Kivity

optionrom: fix bugs in signrom.sh

signrom.sh has multiple bugs:

- the last byte is considered when calculating the existing checksum, but not
when computing the correction
- apprently the 'expr' expression overflows and produces incorrect results with...

590bf491 06/09/2010 01:35 pm Alexander Graf

Fix multiboot compilation

Commit dd4239d6574ca41c94fc0d0f77ddc728510ffc57 broke multiboot. It replaced the
instruction "rep insb (%dx), %es:(%edi)" by the binary output of
"addr32 rep insb (%dx), %es:(%di)".

Linuxboot calls the respective helper function in a code16 section. So the...

d0652aa8 01/08/2010 05:58 pm Avi Kivity

linuxboot: fix gdt address calculation

The gdt address calculation in linuxboot.bin is broken in two ways: first
it loads %cs into %eax, but that instruction leaves the high bits of %eax
undefined and we did not clear them. Secondly, we completely ignore the...

076d2471 01/08/2010 05:58 pm Paolo Bonzini

Use vpath directive

The vpath directive has two advantages over the VPATH variable:
1) it allows to skip searching of .o files; 2) the default semantics
are to append to the vpath, so there is no confusion between "VPATH=xyz"
and "VPATH+=xyz".

Since "vpath %.c %.h PATH" is not valid, I'm introducing a wrapper...

36ecd7c0 12/18/2009 07:26 pm Paolo Bonzini

Fix thinko in linuxboot.S

The %gs segment that was used was not matching the comments.
I just moved the GDT descriptor on the stack instead.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

dc61b0dc 12/03/2009 11:25 pm Alexander Graf

Make -kernel for linux work with bochsbios

While trying to run -kernel with -bios pc-bios/pcbios.bin, I realized
that I was actually writing data to %es, but only set up %ds to a 32-bit
segment we want to write to.

So at the end of the day the data hasn't actually been copied. Oops....

53ea95de 12/03/2009 11:25 pm Adam Lackorzynski

multiboot: Fix module loading and setting of mmap.

Signed-off-by: Adam Lackorzynski <>
Acked-by: Alexander Graf <>
Signed-off-by: Anthony Liguori <>

dd4239d6 11/21/2009 11:32 am Juergen Lock

Allow build of linuxboot.S with old assemblers

In the spirit of ff56954baf9cfab5cbbe18d10b4a09e4a17f39a8, fix the
build of linuxboot.S with old as(1) (as found in some BSD base systems)
by emitting the bytes of the insn it doesn't like instead.

Signed-off-by: Juergen Lock <>...

dd4b2659 11/17/2009 06:39 pm Alexander Graf

Move common option rom code to header file

We will have a linux boot option rom soon, so let's take all functionality
that might be useful for both to a header file that both roms can include.

That way we only have to write fw_cfg access code once.

Signed-off-by: Alexander Graf <>...

57a46d05 11/17/2009 06:39 pm Alexander Graf

Convert linux bootrom to external rom and fw_cfg

We already have a working multiboot implementation that uses fw_cfg to get
its kernel module etc. data in int19 runtime now.

So what's missing is a working linux boot option rom. While at it I figured it
would be a good idea to take the opcode generator out of pc.c and instead use...

77873196 11/17/2009 06:39 pm Alexander Graf

Convert multiboot to fw_cfg backed data storage

Right now we load the guest kernel to RAM, fire off the BIOS, hope it
doesn't clobber memory and run an option rom that jumps into the kernel.

That breaks with SeaBIOS, as that clears memory. So let's read all...

ff56954b 10/27/2009 07:28 pm Juergen Lock

multiboot.S patch for old as(1) (was: Re: [Qemu-devel] Some OpenBSD/amd64 build fixes)

On Wed, Sep 23, 2009 at 10:55:02PM +0200, Juergen Lock wrote:

On Wed, Sep 23, 2009 at 09:31:16PM +0100, Laurence Tratt wrote:
[...]

then the above error doesn't occur, but...

3e4e4646 10/06/2009 10:46 pm Juan Quintela

optionrom: remove use of implicit RM variable

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

4888ec26 10/06/2009 10:46 pm Juan Quintela

optionrom: create .PHONY variable

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

fc3baad7 10/05/2009 05:32 pm Thomas Monjalon

restore CFLAGS check for conflict and fix recursive CFLAGS issue

cc-option uses more make-syntax to replace the shell "if/else".

Issue with recursive += is fixed by doing the first assignment
simply-expanded, as explained in
http://www.gnu.org/software/make/manual/html_node/Appending.html...

9b083b62 09/10/2009 01:31 am Juan Quintela

otionrom: Use local CFLAGS no global one

It is needed by %.o : %.c rule.

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

ae20c622 09/10/2009 01:31 am Juan Quintela

optionrom: make clean should remove raw and .d

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

8a2e6ab5 09/10/2009 01:31 am Juan Quintela

Remove CFLAGS parameter in cc-option

With cc-option we are testing if gcc just accept a particular option, we don't need CFLAGS at all. And this fixes the recursive problem with CFLAGS

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

a558ee17 08/10/2009 09:05 pm Juan Quintela

Rename CPPFLAGS to QEMU_CFLAGS

Now we have to variables: QEMU_CFLAGS: flags without which we can't compile
CFLAGS: "-g -O2"

We can now run:

make CFLAGS="-fbar" foo.o
make CFLAGS="" foo.o
make CFLAGS="-O3" foo.o

And it all should work.

Signed-off-by: Juan Quintela <>...

c66b57fc 08/10/2009 09:05 pm Alexander Graf

Fix checksum writing in signboot.sh

The printf command takes an octal value after \, so we have to convert
our decimal representation to octal first and then write it.

This unbreaks extboot signing. Multiboot wasn't affected yet because
the checksum was < 8....

0ff6697d 08/10/2009 02:41 am malc

Do not try to invoke shebang scripts directly (NFS issues)

Signed-off-by: malc <>

c05ac895 07/31/2009 03:19 pm Paul Brook

Option rom makefile fixes

Fix toplevel option rom makefile rules.

Signed-off-by: Paul Brook <>

925ce05f 07/27/2009 10:59 pm Blue Swirl

Fix out of tree build broken by 791e08c753a9f9be3c3880b4ea83b6dfa4b6ccad

Signed-off-by: Blue Swirl <>

791e08c7 07/27/2009 10:10 pm Juan Quintela

Use quiet-command for building optionrom

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

3c87f43b 07/27/2009 10:10 pm Juan Quintela

use cc-option for optionrom

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

99772ae2 07/22/2009 06:58 pm Christoph Egger

signrom.sh: portability fix

Attached patch makes signrom.sh working on NetBSD.
The output of the 'od' command leads to a syntax error
which breaks the build.

Signed-off-by: Christoph Egger <>
Signed-off-by: Anthony Liguori <>

8167ee88 07/16/2009 11:47 pm Blue Swirl

Update to a hopefully more future proof FSF address

Signed-off-by: Blue Swirl <>

7aa486fe 07/16/2009 04:28 pm Anthony Liguori

Fix multiboot.bin build on mingw32

This combination of ld/object was suggested by Bartlomiej Celary

Signed-off-by: Anthony Liguori <>

24d904ea 07/16/2009 04:28 pm Anthony Liguori

Don't copy multiboot.bin into pc-bios after built

That dirties the working directory of the tree.

Signed-off-by: Anthony Liguori <>

89e671e3 07/10/2009 12:06 am Alexander Graf

Replace signrom with shell script v3

In order to not execute code we just compiled, let's replace signrom
with a shell script that does the same thing while staying compatible
to pretty much every system available.

This should make cross-compilation for windows easier....

8676188b 07/03/2009 10:25 pm Blue Swirl

Work around Solaris gas problem

Signed-off-by: Blue Swirl <>

253d0942 06/29/2009 10:17 pm Alexander Graf

Multiboot build system v4

In order to build the multiboot option rom, we need a Makefile and a tool
to sign the rom with.

Both are provided by this patch and mostly taken from the extboot source,
written by Anthony Liguori.

Once built, the resulting binary gets copied to pc-bios automatically....

f16408df 06/29/2009 09:52 pm Alexander Graf

Multiboot support v5

This patch implements support for Multiboot on x86 for -kernel.
Multiboot is a "new" approach to get rid of different bootloaders, providing
a unified interface for the kernel. It supports command line options and
kernel modules.

The two probably best known projects using multiboot are Xen and GNU Hurd....