Commit f7bcd4e373193fd3d78d7ee24c0a1bcca9dcc3a3

Authored by ths
1 parent 43c1b7e4

Different MIPS BIOS binary names per endianness, and more relaxed size

rules for the binaries, by Alec Voropay.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2302 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 7 additions and 3 deletions
hw/mips_r4k.c
... ... @@ -9,7 +9,11 @@
9 9 */
10 10 #include "vl.h"
11 11  
  12 +#ifdef TARGET_BIG_ENDIAN
12 13 #define BIOS_FILENAME "mips_bios.bin"
  14 +#else
  15 +#define BIOS_FILENAME "mipsel_bios.bin"
  16 +#endif
13 17 //#define BIOS_FILENAME "system.bin"
14 18 #ifdef MIPS_HAS_MIPS64
15 19 #define INITRD_LOAD_ADDR (int64_t)(int32_t)0x80800000
... ... @@ -136,7 +140,7 @@ void mips_r4k_init (int ram_size, int vga_ram_size, int boot_device,
136 140 {
137 141 char buf[1024];
138 142 unsigned long bios_offset;
139   - int ret;
  143 + int bios_size;
140 144 CPUState *env;
141 145 static RTCState *rtc_state;
142 146 int i;
... ... @@ -160,8 +164,8 @@ void mips_r4k_init (int ram_size, int vga_ram_size, int boot_device,
160 164 run. */
161 165 bios_offset = ram_size + vga_ram_size;
162 166 snprintf(buf, sizeof(buf), "%s/%s", bios_dir, BIOS_FILENAME);
163   - ret = load_image(buf, phys_ram_base + bios_offset);
164   - if (ret == BIOS_SIZE) {
  167 + bios_size = load_image(buf, phys_ram_base + bios_offset);
  168 + if (bios_size > 0 & bios_size <= BIOS_SIZE) {
165 169 cpu_register_physical_memory((uint32_t)(0x1fc00000),
166 170 BIOS_SIZE, bios_offset | IO_MEM_ROM);
167 171 } else {
... ...