* [Qemu-devel] u-boot on 'qemu-system-mips64 -M mips'
@ 2010-06-21 23:26 KAWAKATSU Noritaka
2010-06-22 0:38 ` [Qemu-devel] (buiding info)u-boot " KAWAKATSU Noritaka
2010-06-22 9:09 ` [Qemu-devel] u-boot " Arnaud Patard
0 siblings, 2 replies; 5+ messages in thread
From: KAWAKATSU Noritaka @ 2010-06-21 23:26 UTC (permalink / raw)
To: qemu-devel
Hi,
I have built u-boot binary for 'qemu-system-mips -M mips'.
It is fine to run ths u-boot binary.
But the same u-boot binary does not run on 'qemu-system-mips64 -M mips'.
I do not understand what happends on the qemu-mips64 execution.
Is this a bug for qemu-system-mips64 ?
Or should I build u-boot binary by another configuration?
------
* u-boot building steps
(1) build the gcc 4.5 cross-compiler for mips from the source.
(2) build u-boot(2010.03) by the (1)compiler.
(3) copy the u-boot.bin to /usr/share/qemu/mips_bios.bin
* qemu(mips) execution command
$ qemu-system-mips -L /usr/share/qemu -d in_asm -nographic
* get /tmp/qemu.log
the execution seems fine.
* qemu(mips64) execution command
$ qemu-system-mips64 -L /usr/share/qemu -d in_asm -nographic
* get /tmp/qemu.log
the execution seems not fine. Something is wrong?
----- /tmp/qemu.log (last 10-20 lines) [qemu-system-mips64]
IN:
0xffffffffbfc0ee8c: xori v0,v0,0x3d
0xffffffffbfc0ee90: li v1,-1
0xffffffffbfc0ee94: movn s1,v1,v0
0xffffffffbfc0ee98: lw ra,52(sp)
0xffffffffbfc0ee9c: move v0,s1
0xffffffffbfc0eea0: lw s3,48(sp)
0xffffffffbfc0eea4: lw s2,44(sp)
0xffffffffbfc0eea8: lw s1,40(sp)
0xffffffffbfc0eeac: lw s0,36(sp)
0xffffffffbfc0eeb0: jr ra
0xffffffffbfc0eeb4: addiu sp,sp,56
helper_raise_exception_err: 20 0
do_interrupt enter: PC ffffffffbfc0ee94 EPC 0000000000000000 reserved instruction exception
do_interrupt: PC ffffffffbfc00380 EPC ffffffffbfc0ee94 cause 10
S 00400002 C 00808428 A 0000000000000000 D 0000000000000000
IN:
0xffffffffbfc00380: b 0xffffffffbfc00584
0xffffffffbfc00384: li k0,896
IN:
0xffffffffbfc00584: b 0xffffffffbfc00584
0xffffffffbfc00588: nop
-----
----- /tmp/qemu.log (last 10-20 lines) [qemu-system-mips](coresponding part)
IN:
0xbfc0ee8c: xori v0,v0,0x3d
0xbfc0ee90: li v1,-1
0xbfc0ee94: movn s1,v1,v0
0xbfc0ee98: lw ra,52(sp)
0xbfc0ee9c: move v0,s1
0xbfc0eea0: lw s3,48(sp)
0xbfc0eea4: lw s2,44(sp)
0xbfc0eea8: lw s1,40(sp)
0xbfc0eeac: lw s0,36(sp)
0xbfc0eeb0: jr ra
0xbfc0eeb4: addiu sp,sp,56
-----
--
Noritaka KAWAKATSU
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Qemu-devel] (buiding info)u-boot on 'qemu-system-mips64 -M mips'
2010-06-21 23:26 [Qemu-devel] u-boot on 'qemu-system-mips64 -M mips' KAWAKATSU Noritaka
@ 2010-06-22 0:38 ` KAWAKATSU Noritaka
2010-06-22 9:09 ` [Qemu-devel] u-boot " Arnaud Patard
1 sibling, 0 replies; 5+ messages in thread
From: KAWAKATSU Noritaka @ 2010-06-22 0:38 UTC (permalink / raw)
To: qemu-devel
Hi,
I should have written the infomation for u-boot's board configuration.
> (2) build u-boot(2010.03) by the (1)compiler.
I rewrite configuration file for 'qemu-mips':
u-boot-2010.03/board/qemu-mips/u-bool.lds
--[original]
/*
OUTPUT_FORMAT("elf32-bigmips", "elf32-bigmips", "elf32-bigmips")
*/
OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradbigmips")
--[new]
OUTPUT_FORMAT("elf32-bigmips", "elf32-bigmips", "elf32-bigmips")
/*
OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradbigmips")
*/
---
And I use 'qemu-mips' board configuration for building u-boot.
$ cd u-boot-2010.03
$ make qemu_mips_config
$ make all
( I get 'u-boot.bin' )
Regards,
Noritaka KAWAKATSU.
(2010/06/22 8:26), KAWAKATSU Noritaka wrote:
> Hi,
>
> I have built u-boot binary for 'qemu-system-mips -M mips'.
> It is fine to run ths u-boot binary.
> But the same u-boot binary does not run on 'qemu-system-mips64 -M mips'.
>
> I do not understand what happends on the qemu-mips64 execution.
> Is this a bug for qemu-system-mips64 ?
> Or should I build u-boot binary by another configuration?
>
> ------
> * u-boot building steps
> (1) build the gcc 4.5 cross-compiler for mips from the source.
> (2) build u-boot(2010.03) by the (1)compiler.
> (3) copy the u-boot.bin to /usr/share/qemu/mips_bios.bin
> * qemu(mips) execution command
> $ qemu-system-mips -L /usr/share/qemu -d in_asm -nographic
> * get /tmp/qemu.log
> the execution seems fine.
>
> * qemu(mips64) execution command
> $ qemu-system-mips64 -L /usr/share/qemu -d in_asm -nographic
> * get /tmp/qemu.log
> the execution seems not fine. Something is wrong?
>
>
>
> ----- /tmp/qemu.log (last 10-20 lines) [qemu-system-mips64]
> IN:
> 0xffffffffbfc0ee8c: xori v0,v0,0x3d
> 0xffffffffbfc0ee90: li v1,-1
> 0xffffffffbfc0ee94: movn s1,v1,v0
> 0xffffffffbfc0ee98: lw ra,52(sp)
> 0xffffffffbfc0ee9c: move v0,s1
> 0xffffffffbfc0eea0: lw s3,48(sp)
> 0xffffffffbfc0eea4: lw s2,44(sp)
> 0xffffffffbfc0eea8: lw s1,40(sp)
> 0xffffffffbfc0eeac: lw s0,36(sp)
> 0xffffffffbfc0eeb0: jr ra
> 0xffffffffbfc0eeb4: addiu sp,sp,56
>
> helper_raise_exception_err: 20 0
> do_interrupt enter: PC ffffffffbfc0ee94 EPC 0000000000000000 reserved instruction exception
> do_interrupt: PC ffffffffbfc00380 EPC ffffffffbfc0ee94 cause 10
> S 00400002 C 00808428 A 0000000000000000 D 0000000000000000
> IN:
> 0xffffffffbfc00380: b 0xffffffffbfc00584
> 0xffffffffbfc00384: li k0,896
>
> IN:
> 0xffffffffbfc00584: b 0xffffffffbfc00584
> 0xffffffffbfc00588: nop
> -----
>
> ----- /tmp/qemu.log (last 10-20 lines) [qemu-system-mips](coresponding part)
> IN:
> 0xbfc0ee8c: xori v0,v0,0x3d
> 0xbfc0ee90: li v1,-1
> 0xbfc0ee94: movn s1,v1,v0
> 0xbfc0ee98: lw ra,52(sp)
> 0xbfc0ee9c: move v0,s1
> 0xbfc0eea0: lw s3,48(sp)
> 0xbfc0eea4: lw s2,44(sp)
> 0xbfc0eea8: lw s1,40(sp)
> 0xbfc0eeac: lw s0,36(sp)
> 0xbfc0eeb0: jr ra
> 0xbfc0eeb4: addiu sp,sp,56
> -----
>
> --
> Noritaka KAWAKATSU
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] u-boot on 'qemu-system-mips64 -M mips'
2010-06-21 23:26 [Qemu-devel] u-boot on 'qemu-system-mips64 -M mips' KAWAKATSU Noritaka
2010-06-22 0:38 ` [Qemu-devel] (buiding info)u-boot " KAWAKATSU Noritaka
@ 2010-06-22 9:09 ` Arnaud Patard
2010-06-22 9:48 ` KAWAKATSU Noritaka
1 sibling, 1 reply; 5+ messages in thread
From: Arnaud Patard @ 2010-06-22 9:09 UTC (permalink / raw)
To: KAWAKATSU Noritaka; +Cc: qemu-devel
KAWAKATSU Noritaka <kawakatsu.noritaka@interdesigntech.co.jp> writes:
> Hi,
Hi,
>
> I have built u-boot binary for 'qemu-system-mips -M mips'.
> It is fine to run ths u-boot binary.
> But the same u-boot binary does not run on 'qemu-system-mips64 -M mips'.
>
> I do not understand what happends on the qemu-mips64 execution.
> Is this a bug for qemu-system-mips64 ?
> Or should I build u-boot binary by another configuration?
>
> ------
> * u-boot building steps
> (1) build the gcc 4.5 cross-compiler for mips from the source.
> (2) build u-boot(2010.03) by the (1)compiler.
> (3) copy the u-boot.bin to /usr/share/qemu/mips_bios.bin
> * qemu(mips) execution command
> $ qemu-system-mips -L /usr/share/qemu -d in_asm -nographic
> * get /tmp/qemu.log
> the execution seems fine.
>
> * qemu(mips64) execution command
> $ qemu-system-mips64 -L /usr/share/qemu -d in_asm -nographic
> * get /tmp/qemu.log
> the execution seems not fine. Something is wrong?
>
>
>
> ----- /tmp/qemu.log (last 10-20 lines) [qemu-system-mips64]
> IN:
> 0xffffffffbfc0ee8c: xori v0,v0,0x3d
> 0xffffffffbfc0ee90: li v1,-1
> 0xffffffffbfc0ee94: movn s1,v1,v0
> 0xffffffffbfc0ee98: lw ra,52(sp)
> 0xffffffffbfc0ee9c: move v0,s1
> 0xffffffffbfc0eea0: lw s3,48(sp)
> 0xffffffffbfc0eea4: lw s2,44(sp)
> 0xffffffffbfc0eea8: lw s1,40(sp)
> 0xffffffffbfc0eeac: lw s0,36(sp)
> 0xffffffffbfc0eeb0: jr ra
> 0xffffffffbfc0eeb4: addiu sp,sp,56
>
> helper_raise_exception_err: 20 0
> do_interrupt enter: PC ffffffffbfc0ee94 EPC 0000000000000000 reserved instruction exception
> do_interrupt: PC ffffffffbfc00380 EPC ffffffffbfc0ee94 cause 10
> S 00400002 C 00808428 A 0000000000000000 D 0000000000000000
so EPC is set to ffffffffbfc0ee94 which is :
movn s1,v1,v0
>From what I understand when reading the mips IV manual, the movn ins is
only for mips IV / 32bit and not 64bit. Looks like the qemu code has
been written following this. (This also explains why qemu-system-mips is
fine and not qemu-system-mips64).
Arnaud
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] u-boot on 'qemu-system-mips64 -M mips'
2010-06-22 9:09 ` [Qemu-devel] u-boot " Arnaud Patard
@ 2010-06-22 9:48 ` KAWAKATSU Noritaka
2010-06-23 7:19 ` KAWAKATSU, Noritaka
0 siblings, 1 reply; 5+ messages in thread
From: KAWAKATSU Noritaka @ 2010-06-22 9:48 UTC (permalink / raw)
To: qemu-devel
Thank you for your reply.
> so EPC is set to ffffffffbfc0ee94 which is :
> movn s1,v1,v0
>
>> From what I understand when reading the mips IV manual, the movn ins is
> only for mips IV / 32bit and not 64bit. Looks like the qemu code has
> been written following this. (This also explains why qemu-system-mips is
> fine and not qemu-system-mips64).
>
> Arnaud
I understand that the relaation between MIPS32/MIPS64 arch is upper compatible
(from MIPS32 to MIPS64).
I wonder if this fact (the movn ins is only for mips IV / 32bit and not 64bit)
be true, umm.
Please let me know the list of instructions like this (32/64 not compatible)
if you know, or give me a hint to investigate?
Noritata KAWAKATSU.
(2010/06/22 18:09), Arnaud Patard (Rtp) wrote:
> KAWAKATSU Noritaka<kawakatsu.noritaka@interdesigntech.co.jp> writes:
>
>> Hi,
>
>
> Hi,
>>
>> I have built u-boot binary for 'qemu-system-mips -M mips'.
>> It is fine to run ths u-boot binary.
>> But the same u-boot binary does not run on 'qemu-system-mips64 -M mips'.
>>
>> I do not understand what happends on the qemu-mips64 execution.
>> Is this a bug for qemu-system-mips64 ?
>> Or should I build u-boot binary by another configuration?
>>
>> ------
>> * u-boot building steps
>> (1) build the gcc 4.5 cross-compiler for mips from the source.
>> (2) build u-boot(2010.03) by the (1)compiler.
>> (3) copy the u-boot.bin to /usr/share/qemu/mips_bios.bin
>> * qemu(mips) execution command
>> $ qemu-system-mips -L /usr/share/qemu -d in_asm -nographic
>> * get /tmp/qemu.log
>> the execution seems fine.
>>
>> * qemu(mips64) execution command
>> $ qemu-system-mips64 -L /usr/share/qemu -d in_asm -nographic
>> * get /tmp/qemu.log
>> the execution seems not fine. Something is wrong?
>>
>>
>>
>> ----- /tmp/qemu.log (last 10-20 lines) [qemu-system-mips64]
>> IN:
>> 0xffffffffbfc0ee8c: xori v0,v0,0x3d
>> 0xffffffffbfc0ee90: li v1,-1
>> 0xffffffffbfc0ee94: movn s1,v1,v0
>> 0xffffffffbfc0ee98: lw ra,52(sp)
>> 0xffffffffbfc0ee9c: move v0,s1
>> 0xffffffffbfc0eea0: lw s3,48(sp)
>> 0xffffffffbfc0eea4: lw s2,44(sp)
>> 0xffffffffbfc0eea8: lw s1,40(sp)
>> 0xffffffffbfc0eeac: lw s0,36(sp)
>> 0xffffffffbfc0eeb0: jr ra
>> 0xffffffffbfc0eeb4: addiu sp,sp,56
>>
>> helper_raise_exception_err: 20 0
>> do_interrupt enter: PC ffffffffbfc0ee94 EPC 0000000000000000 reserved instruction exception
>> do_interrupt: PC ffffffffbfc00380 EPC ffffffffbfc0ee94 cause 10
>> S 00400002 C 00808428 A 0000000000000000 D 0000000000000000
>
> so EPC is set to ffffffffbfc0ee94 which is :
> movn s1,v1,v0
>
>> From what I understand when reading the mips IV manual, the movn ins is
> only for mips IV / 32bit and not 64bit. Looks like the qemu code has
> been written following this. (This also explains why qemu-system-mips is
> fine and not qemu-system-mips64).
>
>
> Arnaud
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [Qemu-devel] u-boot on 'qemu-system-mips64 -M mips'
2010-06-22 9:48 ` KAWAKATSU Noritaka
@ 2010-06-23 7:19 ` KAWAKATSU, Noritaka
0 siblings, 0 replies; 5+ messages in thread
From: KAWAKATSU, Noritaka @ 2010-06-23 7:19 UTC (permalink / raw)
To: qemu-devel
I report the workaround for u-boot execution on qemu-system-mips64.
> movn s1,v1,v0
>> From what I understand when reading the mips IV manual, the movn ins
>> is
> only for mips IV / 32bit and not 64bit. Looks like the qemu code has
> been written following this. (This also explains why qemu-system-mips
> is fine and not qemu-system-mips64).
I have rebuilt u-boot by the configuration customed for R4400 architecture:
>From original gcc option script '-march=4kc ..' to '-march=r4400 ..'.
R4400 has inst set without 'movn'.
The binary built by this process runs on
both 'qemu-system-mips' and 'qemu-system-mips64'.
Thank you.
---
Noritaka KAWAKATSU
-----Original Message-----
From: qemu-devel-bounces+kawakatsu.noritaka=interdesigntech.co.jp@nongnu.org
[mailto:qemu-devel-bounces+kawakatsu.noritaka=interdesigntech.co.jp@nongnu.org] On Behalf Of KAWAKATSU Noritaka
Sent: Tuesday, June 22, 2010 6:49 PM
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] u-boot on 'qemu-system-mips64 -M mips'
Thank you for your reply.
> so EPC is set to ffffffffbfc0ee94 which is :
> movn s1,v1,v0
>
>> From what I understand when reading the mips IV manual, the movn ins is > only for mips IV / 32bit and not 64bit. Looks like
the qemu code has > been written following this. (This also explains why qemu-system-mips is > fine and not qemu-system-mips64).
>
> Arnaud
I understand that the relaation between MIPS32/MIPS64 arch is upper compatible (from MIPS32 to MIPS64).
I wonder if this fact (the movn ins is only for mips IV / 32bit and not 64bit) be true, umm.
Please let me know the list of instructions like this (32/64 not compatible) if you know, or give me a hint to investigate?
Noritata KAWAKATSU.
(2010/06/22 18:09), Arnaud Patard (Rtp) wrote:
> KAWAKATSU Noritaka<kawakatsu.noritaka@interdesigntech.co.jp> writes:
>
>> Hi,
>
>
> Hi,
>>
>> I have built u-boot binary for 'qemu-system-mips -M mips'.
>> It is fine to run ths u-boot binary.
>> But the same u-boot binary does not run on 'qemu-system-mips64 -M mips'.
>>
>> I do not understand what happends on the qemu-mips64 execution.
>> Is this a bug for qemu-system-mips64 ?
>> Or should I build u-boot binary by another configuration?
>>
>> ------
>> * u-boot building steps
>> (1) build the gcc 4.5 cross-compiler for mips from the source.
>> (2) build u-boot(2010.03) by the (1)compiler.
>> (3) copy the u-boot.bin to /usr/share/qemu/mips_bios.bin
>> * qemu(mips) execution command
>> $ qemu-system-mips -L /usr/share/qemu -d in_asm -nographic
>> * get /tmp/qemu.log
>> the execution seems fine.
>>
>> * qemu(mips64) execution command
>> $ qemu-system-mips64 -L /usr/share/qemu -d in_asm -nographic
>> * get /tmp/qemu.log
>> the execution seems not fine. Something is wrong?
>>
>>
>>
>> ----- /tmp/qemu.log (last 10-20 lines) [qemu-system-mips64]
>> IN:
>> 0xffffffffbfc0ee8c: xori v0,v0,0x3d
>> 0xffffffffbfc0ee90: li v1,-1
>> 0xffffffffbfc0ee94: movn s1,v1,v0
>> 0xffffffffbfc0ee98: lw ra,52(sp)
>> 0xffffffffbfc0ee9c: move v0,s1
>> 0xffffffffbfc0eea0: lw s3,48(sp)
>> 0xffffffffbfc0eea4: lw s2,44(sp)
>> 0xffffffffbfc0eea8: lw s1,40(sp)
>> 0xffffffffbfc0eeac: lw s0,36(sp)
>> 0xffffffffbfc0eeb0: jr ra
>> 0xffffffffbfc0eeb4: addiu sp,sp,56
>>
>> helper_raise_exception_err: 20 0
>> do_interrupt enter: PC ffffffffbfc0ee94 EPC 0000000000000000 reserved
>> instruction exception
>> do_interrupt: PC ffffffffbfc00380 EPC ffffffffbfc0ee94 cause 10
>> S 00400002 C 00808428 A 0000000000000000 D 0000000000000000
>
> so EPC is set to ffffffffbfc0ee94 which is :
> movn s1,v1,v0
>
>> From what I understand when reading the mips IV manual, the movn ins
>> is
> only for mips IV / 32bit and not 64bit. Looks like the qemu code has
> been written following this. (This also explains why qemu-system-mips
> is fine and not qemu-system-mips64).
>
>
> Arnaud
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-06-23 7:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-21 23:26 [Qemu-devel] u-boot on 'qemu-system-mips64 -M mips' KAWAKATSU Noritaka
2010-06-22 0:38 ` [Qemu-devel] (buiding info)u-boot " KAWAKATSU Noritaka
2010-06-22 9:09 ` [Qemu-devel] u-boot " Arnaud Patard
2010-06-22 9:48 ` KAWAKATSU Noritaka
2010-06-23 7:19 ` KAWAKATSU, Noritaka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).