[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Add MIPS ELF loader

From: Dirk Behme
Subject: Re: [Qemu-devel] [PATCH] Add MIPS ELF loader
Date: Thu, 30 Mar 2006 19:34:59 +0200
User-agent: Mozilla Thunderbird 1.0.7 (X11/20050923)

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

Best regards


reply via email to

[Prev in Thread] Current Thread [Next in Thread]