Alexander Voropay wrote:
I'm trying to implement a mips_bios, unfortunately, quemu seems can't
run a code at the 0xbfc00000 region.

See a http://pastebin.com/628591

The conventional 'move k0,zero' instruction (line 35) causes an general
exceprion to 0xbfc00380, see line 70

Try to change the following lines in hw/mips_r4k.c:

//#define KERNEL_LOAD_ADDR 0x80010000
#define KERNEL_LOAD_ADDR 0xBFC00000

//cpu_register_physical_memory(0, ram_size, IO_MEM_RAM);
cpu_register_physical_memory(0x1fc00000, ram_size, IO_MEM_RAM);

//kernel_size = load_image(kernel_filename,
//                            phys_ram_base + (kernel_base - 0x80000000));
kernel_size = load_image(kernel_filename, phys_ram_base);

Works for me:

(gdb) p/x $pc
$1 = 0xbfc00000
(gdb) x/2i $pc
0xbfc00000 <_start>:    b       0xbfc00400 <reset>
0xbfc00004 <_start+4>:  nop
(gdb) x/2i 0x1fc00000
0x1fc00000:     b       0x1fc00400
0x1fc00004:     nop
(gdb)

Best regards

Dirk


_______________________________________________
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel

Reply via email to