mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
Improved initrd support for mips.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2574 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
4f14e88c59
commit
74287114c9
8 changed files with 74 additions and 33 deletions
8
loader.c
8
loader.c
|
@ -196,7 +196,7 @@ static void *load_at(int fd, int offset, int size)
|
|||
|
||||
/* return < 0 if error, otherwise the number of bytes loaded in memory */
|
||||
int load_elf(const char *filename, int64_t virt_to_phys_addend,
|
||||
uint64_t *pentry)
|
||||
uint64_t *pentry, uint64_t *lowaddr, uint64_t *highaddr)
|
||||
{
|
||||
int fd, data_order, host_data_order, must_swab, ret;
|
||||
uint8_t e_ident[EI_NIDENT];
|
||||
|
@ -230,9 +230,11 @@ int load_elf(const char *filename, int64_t virt_to_phys_addend,
|
|||
|
||||
lseek(fd, 0, SEEK_SET);
|
||||
if (e_ident[EI_CLASS] == ELFCLASS64) {
|
||||
ret = load_elf64(fd, virt_to_phys_addend, must_swab, pentry);
|
||||
ret = load_elf64(fd, virt_to_phys_addend, must_swab, pentry,
|
||||
lowaddr, highaddr);
|
||||
} else {
|
||||
ret = load_elf32(fd, virt_to_phys_addend, must_swab, pentry);
|
||||
ret = load_elf32(fd, virt_to_phys_addend, must_swab, pentry,
|
||||
lowaddr, highaddr);
|
||||
}
|
||||
|
||||
close(fd);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue