Commit 8ab944444ad8dab8d78cb6256fe199417a21750d
1 parent
b2fa1797
ETRAX-FS: Correct booting of elf linux images from ram.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5515 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
2 additions
and
3 deletions
hw/etraxfs.c
... | ... | @@ -122,17 +122,16 @@ void bareetraxfs_init (ram_addr_t ram_size, int vga_ram_size, |
122 | 122 | uint64_t entry; |
123 | 123 | /* Boots a kernel elf binary, os/linux-2.6/vmlinux from the axis |
124 | 124 | devboard SDK. */ |
125 | - kernel_size = load_elf(kernel_filename, 0, | |
125 | + kernel_size = load_elf(kernel_filename, -0x80000000LL, | |
126 | 126 | &entry, NULL, NULL); |
127 | 127 | bootstrap_pc = entry; |
128 | 128 | if (kernel_size < 0) { |
129 | 129 | /* Takes a kimage from the axis devboard SDK. */ |
130 | 130 | kernel_size = load_image(kernel_filename, phys_ram_base + 0x4000); |
131 | 131 | bootstrap_pc = 0x40004000; |
132 | - /* magic for boot. */ | |
133 | - env->regs[8] = 0x56902387; | |
134 | 132 | env->regs[9] = 0x40004000 + kernel_size; |
135 | 133 | } |
134 | + env->regs[8] = 0x56902387; /* RAM init magic. */ | |
136 | 135 | } |
137 | 136 | env->pc = bootstrap_pc; |
138 | 137 | ... | ... |