Statistics
| Branch: | Revision:

root / hw / loader.c @ ea3bd56f

History | View | Annotate | Download (19.7 kB)

# Date Author Comment
2e55e842 12/11/2010 11:32 pm Gleb Natapov

Add bootindex for option roms.

Extend -option-rom command to have additional parameter ,bootindex=.

Signed-off-by: Gleb Natapov <>
Signed-off-by: Blue Swirl <>

de1f34cb 12/11/2010 11:32 pm Gleb Natapov

Change fw_cfg_add_file() to get full file path as a parameter.

Change fw_cfg_add_file() to get full file path as a parameter instead
of building one internally. Two reasons for that. First caller may need
to know how file is named. Second this moves policy of file naming out...

61bca294 07/31/2010 12:05 am Joel Schopp

remove dead code from hw/loader.c

Removing dead code. Above we already continued when
rom->addr + valuegreaterthan0 < addr so this condition is always false.

Signed-off-by: Joel Schopp <>
Signed-off-by: Aurelien Jarno <>

409dbce5 03/16/2010 09:38 am Aurelien Jarno

load_elf: replace the address addend by a translation function

A few machines need to translate the ELF header addresses into physical
addresses. Currently the only possibility is to add a value to the
addresses.

This patch replaces the addend argument by and a translation function...

bc798c77 02/14/2010 09:24 am Blue Swirl

Remove conditional rom loading support

Commit c2039bd0ffce8807e0eaac55254fde790825fa92 made rom loading
automatic for non-PC architectures. Remove now mostly unused
conditional rom loading support.

Signed-off-by: Blue Swirl <>

bdb5ee30 01/11/2010 09:41 pm Gerd Hoffmann

roms: minor fixes and cleanups.

Changes:
- Drop extra file argument from rom_add_file().
- Drop fw_dir check in do_info_roms, we allways have a dir name.
- code style fixes.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

8832cb80 01/11/2010 09:41 pm Gerd Hoffmann

roms: rework rom loading via fw

This patch changes the way rom loading via fw_cfg is handled.
Instead of having pc_init1() call a function which passed all
roms to the firmware config we simply pass a pointer to fw_cfg
to the rom loader.

Advantage: loading roms via firmware works also for devices which...

f21a59c2 12/24/2009 08:30 pm Aurelien Jarno

loader: more ignores for rom intended to be loaded by the bios

Similarly to what has been done in e405a2ba91b68817cae2a428de55fe9616a4cf37,
ignore rom intended to be loaded by the bios in find_rom() and rom_copy().

Signed-off-by: Aurelien Jarno <>

e405a2ba 12/24/2009 09:33 am Avi Kivity

Don't load options roms intended to be loaded by the bios in qemu

The first such option rom will load at address 0, which isn't very nice,
and the second will report a conflict and abort, which is horrible.

Signed-off-by: Avi Kivity <>
Signed-off-by: Aurelien Jarno <>

935effc2 12/19/2009 10:49 pm Kevin Wolf

Multiboot support: Fix rom_copy

ROMs need to be loaded if they are anywhere in the requested area, not
only at the very beginning. This fixes Multiboot with ELF kernels that
have more than one program header.

Signed-off-by: Kevin Wolf <>...

f9e69bd9 12/19/2009 08:45 pm Aurelien Jarno

roms: allow roms to be loaded at address 0

It was possible to load roms at address 0, but commit
632cf034b401cdd01dae253a8b577fe518e37654 started to forbid that, which
broke at least ARM versatile.

Signed-off-by: Aurelien Jarno <>

379526a4 12/18/2009 07:26 pm Gerd Hoffmann

roms: use new fw_cfg file xfer support.

roms: use fw_cfg for vgabios and option rom loading, additionally to
deploying them the traditional way (copy to 0xc0000 -> 0xe0000 range).

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

632cf034 12/18/2009 07:26 pm Gerd Hoffmann

roms: remove option rom packing logic

Now that we load the option roms via fw_cfg, we can stop copying
them to the 0xc000 -> 0xe000. The patch does just that.

Also the rom loader gets simplified as all remaining users of the
rom loader load the bits at a fixed address so the packing and...

15ff7705 12/18/2009 07:26 pm Gerd Hoffmann

Check rom_load_all() return value.

Check rom_load_all() return value.
Also don't make option rom loading failure fatal.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

092493be 12/18/2009 07:26 pm Kevin Wolf

Fix loading of ELF multiboot kernels

The multiboot implementation assumed that there is only one program header
(which contains the entry point) and that the entry point is at the start of
the code. This doesn't hold true generally and caused too little data to be...

235f86ef 11/17/2009 06:38 pm Alexander Graf

Introduce rom_copy

We have several rom helpers currently, but none of them can get us
code that spans several roms into a pointer.

This patch introduces a function that copies over rom contents.

Signed-off-by: Alexander Graf <>
Signed-off-by: Anthony Liguori <>

97fe84f5 11/11/2009 08:21 pm Paul Brook

Reject late rom loading

rom_+add_file/rom_add_blob only work correctly if called before
load_all_roms. Enforce this rather than silently accepting and putting
the rom in the wrong place at reset.

Signed-off-by: Paul Brook <>

a01d6ef4 11/07/2009 10:55 am Blue Swirl

sparc32 (mostly): remove unneeded calls to device reset

Signed-off-by: Blue Swirl <>

14a3f32d 10/30/2009 03:39 pm Gerd Hoffmann

rom loader: use qemu_strdup.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

de2aff17 10/30/2009 03:39 pm Gerd Hoffmann

rom loader: make vga+rom loading configurable.

The rom_add_vga() and rom_add_option() macros are transformed into
functions. They look at the new rom_enable_driver_roms variable
and only do something if it is set to non-zero, making vga+option rom
loading runtime option. pc_init() sets rom_enable_driver_roms to 1....

b96bf493 10/12/2009 05:42 pm Gerd Hoffmann

rom loader: also try filename as-is.

In case qemu_find_file fails try to open the file as-is.

Patchworks-ID: 35263
Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

3c178e72 10/12/2009 05:42 pm Gerd Hoffmann

rom loader: fix sparc -kernel boot.

Changes:
(1) register pstrcpy_targphys() in rom list, it is used for kernel
command lines by a number of architectures.
(2) add rom_ptr() function to get a pointer for applying changes
to loaded images. Needed for example to tell the linux kernel...

cef290b8 10/10/2009 06:02 pm malc

Fix Windows host breakage by 45a50b1668822c23afc2a89f724654e176518bc4 (TeLeMan)

Signed-off-by: malc <>

45a50b16 10/06/2009 10:36 pm Gerd Hoffmann

Reorganize option rom (+linux kernel) loading.

This patch adds infrastructure to maintain memory regions which must be
restored on reset. That includes roms (vga bios and option roms on pc),
but is also used when loading linux kernels directly. Features:...

c227f099 10/02/2009 12:12 am Anthony Liguori

Revert "Get rid of _t suffix"

In the very least, a change like this requires discussion on the list.

The naming convention is goofy and it causes a massive merge problem. Something
like this must be presented on the list first so people can provide input...

99a0949b 10/01/2009 09:45 pm malc

Get rid of _t suffix

Some not so obvious bits, slirp and Xen were left alone for the time
being.

Signed-off-by: malc <>

ca20cf32 09/20/2009 05:58 pm Blue Swirl

Compile loader only once

Callers must pass ELF machine, byte swapping and symbol LSB clearing
information to ELF loader. A.out loader needs page size information, pass
that too as a parameter.

Extract prototypes to a separate file. Move loader.[ch] and elf_ops.h under hw....