History | View | Annotate | Download (1.9 kB)
use an uint64_t for the max_sz parameter in load_image_targphys
Allow load_image_targphys to load files on systems with more than 2G ofemulated memory by changing the max_sz parameter from an int to anuint64_t.
Reviewed-by: Andreas F=E4rber <afaerber@suse.de>...
loader: Fix read_targphys() to behave when read() fails
Happily passes (size_t)-1 to rom_add_blob_fixed(), which promptly diesattempting to malloc that much. Spotted by Coverity.
Bonus fix for ROMs larger than INT_MAX bytes: return ssize_t insteadof int. Bug can't bite, because the only user load_aout() limits ROM...
Add bootindex for option roms.
Extend -option-rom command to have additional parameter ,bootindex=.
Signed-off-by: Gleb Natapov <gleb@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
load_elf: replace the address addend by a translation function
A few machines need to translate the ELF header addresses into physicaladdresses. Currently the only possibility is to add a value to theaddresses.
This patch replaces the addend argument by and a translation function...
Remove conditional rom loading support
Commit c2039bd0ffce8807e0eaac55254fde790825fa92 made rom loadingautomatic for non-PC architectures. Remove now mostly unusedconditional rom loading support.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
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 <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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 allroms to the firmware config we simply pass a pointer to fw_cfgto the rom loader.
Advantage: loading roms via firmware works also for devices which...
roms: use new fw_cfg file xfer support.
roms: use fw_cfg for vgabios and option rom loading, additionally todeploying them the traditional way (copy to 0xc0000 -> 0xe0000 range).
roms: remove option rom packing logic
Now that we load the option roms via fw_cfg, we can stop copyingthem to the 0xc000 -> 0xe000. The patch does just that.
Also the rom loader gets simplified as all remaining users of therom loader load the bits at a fixed address so the packing and...
Introduce rom_copy
We have several rom helpers currently, but none of them can get uscode that spans several roms into a pointer.
This patch introduces a function that copies over rom contents.
Signed-off-by: Alexander Graf <agraf@suse.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
rom loader: make vga+rom loading configurable.
The rom_add_vga() and rom_add_option() macros are transformed intofunctions. They look at the new rom_enable_driver_roms variableand only do something if it is set to non-zero, making vga+option romloading runtime option. pc_init() sets rom_enable_driver_roms to 1....
rom loader: fix sparc -kernel boot.
Changes:(1) register pstrcpy_targphys() in rom list, it is used for kernelcommand lines by a number of architectures.(2) add rom_ptr() function to get a pointer for applying changesto loaded images. Needed for example to tell the linux kernel...
Reorganize option rom (+linux kernel) loading.
This patch adds infrastructure to maintain memory regions which must berestored on reset. That includes roms (vga bios and option roms on pc),but is also used when loading linux kernels directly. Features:...
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. Somethinglike this must be presented on the list first so people can provide input...
Get rid of _t suffix
Some not so obvious bits, slirp and Xen were left alone for the timebeing.
Signed-off-by: malc <av1474@comtv.ru>
Compile loader only once
Callers must pass ELF machine, byte swapping and symbol LSB clearinginformation to ELF loader. A.out loader needs page size information, passthat too as a parameter.
Extract prototypes to a separate file. Move loader.[ch] and elf_ops.h under hw....