Revision ca20cf32 hw/mips_r4k.c
b/hw/mips_r4k.c | ||
---|---|---|
18 | 18 |
#include "qemu-log.h" |
19 | 19 |
#include "mips-bios.h" |
20 | 20 |
#include "ide.h" |
21 |
#include "loader.h" |
|
22 |
#include "elf.h" |
|
21 | 23 |
|
22 | 24 |
#define PHYS_TO_VIRT(x) ((x) | ~(target_ulong)0x7fffffff) |
23 | 25 |
|
... | ... | |
77 | 79 |
long kernel_size, initrd_size; |
78 | 80 |
ram_addr_t initrd_offset; |
79 | 81 |
int ret; |
82 |
int big_endian; |
|
80 | 83 |
|
84 |
#ifdef TARGET_WORDS_BIGENDIAN |
|
85 |
big_endian = 1; |
|
86 |
#else |
|
87 |
big_endian = 0; |
|
88 |
#endif |
|
81 | 89 |
kernel_size = load_elf(loaderparams.kernel_filename, VIRT_TO_PHYS_ADDEND, |
82 | 90 |
(uint64_t *)&entry, (uint64_t *)&kernel_low, |
83 |
(uint64_t *)&kernel_high); |
|
91 |
(uint64_t *)&kernel_high, big_endian, ELF_MACHINE, 1);
|
|
84 | 92 |
if (kernel_size >= 0) { |
85 | 93 |
if ((entry & ~0x7fffffffULL) == 0x80000000) |
86 | 94 |
entry = (int32_t)entry; |
Also available in: Unified diff