Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FbMd1-0000mv-D3 for qemu-devel@nongnu.org; Wed, 03 May 2006 15:03:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FbMcy-0000lL-Su for qemu-devel@nongnu.org; Wed, 03 May 2006 15:03:14 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FbMcy-0000lC-Mv for qemu-devel@nongnu.org; Wed, 03 May 2006 15:03:12 -0400 Received: from [194.84.254.251] (helo=mx.globalone.ru) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FbMdO-00048q-P5 for qemu-devel@nongnu.org; Wed, 03 May 2006 15:03:39 -0400 Received: from mx.globalone.ru (localhost [127.0.0.1]) by mx.globalone.ru (8.13.1/8.13.1) with ESMTP id k43J31sI012277 for ; Wed, 3 May 2006 23:03:01 +0400 Received: from smtp.globalone.ru (smtp.globalone.ru [172.16.38.5]) by mx.globalone.ru (8.13.1/8.13.1) with ESMTP id k43J2uf1012265 for ; Wed, 3 May 2006 23:02:56 +0400 Received: from voropaya ([172.16.38.7]) by smtp.globalone.ru (Netscape Messaging Server 4.15) with SMTP id IYPE8V00.VH4 for ; Wed, 3 May 2006 23:02:55 +0400 Message-ID: <2a0701c66ee4$39d3f9b0$e90d11ac@spb.in.rosprint.ru> From: "Alexander Voropay" Date: Wed, 3 May 2006 23:01:44 +0400 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_2A00_01C66F05.8C6AB1C0" Subject: [Qemu-devel] MIPS: UART access w/o -kernel option Reply-To: Alexander Voropay , qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is a multi-part message in MIME format. ------=_NextPart_000_2A00_01C66F05.8C6AB1C0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable Hi! I'm still trying to run a MIPS mmon as a BIOS :) I've found one strange issue : when it runs at the KSEG0 region (0x80008000) with -kernel option it works fine. When I'm trying to run it in the MIPS BIOS region (0xbfc00000) it can't output anything to the UART and Qemu segfaults on the any keypress (not my program, but whole Qemu !) Seems, UART is unmapped w/o -kernel option or something similar. There was no such issue in the previous CVS (a week ago). The "mmon-qemu" sourcecode and binaries are there: http://www.nwpi.ru/~alec/mips/mmon-qemu-0.5.tgz From the KSEG0 (run as kernel) : =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D [alec@ilias mmon-qemu-0.5]$ ../qemu/bin/qemu-system-mipsel -nographic = -kernel mmon.elf (qemu) Could not configure '/dev/rtc' to have a 1024 Hz timer. This is = not a fatal error, but for better emulation accuracy either use a 2.6 host Linux = kernel or type 'echo 1024 > /proc/sys/dev/rtc/max-user-freq' as root. mips_r4k_init: load BIOS '/home/alec/mips/qemu/share/qemu/mips_bios.bin' = size 131072 qemu: Warning, could not load MIPS bios = '/home/alec/mips/qemu/share/qemu/mips_bios.bin' mmon: VR4300 mini-monitor, Copyright 1996, 2003 Eric Smith = >? Commands: db [] dump bytes from addr1 to addr2 dh [] dump half-words (16 bits) dw [] dump words (32 bits) sb ... store byte sh ... store half-word (16 bits) sw ... store word (32 bits) swl store word left swr store word right fb fill bytes of memory range fh fill half-words fw fill words l load S-records g [] go (start execution at address) h help (show this command list) >db bfc00000 BFC00000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 BFC00010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 BFC00020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 BFC00030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D From the KSEG1 (i'm using a stub file "reset" ) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D [alec@ilias mmon-qemu-0.5]$ ../qemu/bin/qemu-system-mipsel -nographic = -L . reset (qemu) Could not configure '/dev/rtc' to have a 1024 Hz timer. This is = not a fatal error, but for better emulation accuracy either use a 2.6 host Linux = kernel or type 'echo 1024 > /proc/sys/dev/rtc/max-user-freq' as root. mips_r4k_init: load BIOS './mips_bios.bin' size 131072 Segmentation fault (core dumped) [alec@ilias mmon-qemu-0.5]$ gdb -c core.15214 GNU gdb Red Hat Linux (6.1post-1.20040607.62rh) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you = are welcome to change it and/or distribute copies of it under certain = conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for = details. This GDB was configured as "i386-redhat-linux-gnu". Core was generated by `../qemu/bin/qemu-system-mipsel -nographic -L'. Program terminated with signal 11, Segmentation fault. #0 0x00000000 in ?? () (gdb) bt #0 0x00000000 in ?? () #1 0x0804b4c7 in ?? () #2 0x00000000 in ?? () =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D -- -=3DAV=3D- ------=_NextPart_000_2A00_01C66F05.8C6AB1C0 Content-Type: text/html; charset="koi8-r" Content-Transfer-Encoding: quoted-printable
Hi!
 
 I'm still trying to run a MIPS = mmon as a BIOS=20 :)
 
 I've found one strange issue : = when it runs=20 at the
KSEG0 region (0x80008000) with -kernel = option it=20 works fine.
When I'm trying to run it in the MIPS = BIOS region=20 (0xbfc00000)
it can't output anything to the UART = and Qemu=20 segfaults
on the any keypress (not my program, but whole Qemu !)
 
 Seems, UART is unmapped w/o = -kernel option or=20 something similar.
There was no such issue in the previous = CVS (a week=20 ago).
 
 The "mmon-qemu" sourcecode and = binaries are=20 there:
http://www.nwpi.= ru/~alec/mips/mmon-qemu-0.5.tgz
 
 From the KSEG0 (run as kernel) = :
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=
[alec@ilias mmon-qemu-0.5]$=20 ../qemu/bin/qemu-system-mipsel -nographic -kernel mmon.elf
(qemu) = Could not=20 configure '/dev/rtc' to have a 1024 Hz timer. This is not a = fatal
error, but=20 for better emulation accuracy either use a 2.6 host Linux kernel = or
type=20 'echo 1024 > /proc/sys/dev/rtc/max-user-freq' as = root.
mips_r4k_init: load=20 BIOS '/home/alec/mips/qemu/share/qemu/mips_bios.bin' size = 131072
qemu:=20 Warning, could not load MIPS bios=20 '/home/alec/mips/qemu/share/qemu/mips_bios.bin'
 
mmon: VR4300 mini-monitor, Copyright = 1996, 2003=20 Eric Smith <eric@brouhaha.com>
>?
C= ommands:
 
db <addr1>=20 [<addr2>]       dump bytes from = addr1 to=20 addr2
dh <addr1> = [<addr2>]      =20 dump half-words (16 bits)
dw <addr1>=20 [<addr2>]       dump words (32 = bits)
sb=20 <addr> <data>...        = store=20 byte
sh <addr>=20 <data>...        store = half-word (16=20 bits)
sw <addr>=20 <data>...        store word (32 = bits)
swl <addr>=20 <data>          store = word=20 left
swr <addr>=20 <data>          store = word=20 right
fb <addr1> <addr2> <data>  fill bytes of = memory=20 range
fh <addr1> <addr2> <data>  fill = half-words
fw=20 <addr1> <addr2> <data>  fill=20 words
l          &nb= sp;           &nbs= p;  =20 load S-records
g=20 [<addr>]          = ;      =20 go (start execution at=20 address)
h          =             &= nbsp;  =20 help (show this command list)
>db bfc00000
BFC00000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 = 00
BFC00010: 00=20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
BFC00020: 00 00 00 00 00 = 00 00=20 00 00 00 00 00 00 00 00 00
BFC00030: 00 00 00 00 00 00 00 00 00 00 00 = 00 00=20 00 00 = 00
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D
 
 From the KSEG1 (i'm using a stub = file "reset"=20 )
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D
[alec@ilias mmon-qemu-0.5]$=20 ../qemu/bin/qemu-system-mipsel -nographic  -L . reset
(qemu) = Could not=20 configure '/dev/rtc' to have a 1024 Hz timer. This is not a = fatal
error, but=20 for better emulation accuracy either use a 2.6 host Linux kernel = or
type=20 'echo 1024 > /proc/sys/dev/rtc/max-user-freq' as = root.
mips_r4k_init: load=20 BIOS './mips_bios.bin' size 131072
Segmentation fault (core=20 dumped)
 
[alec@ilias mmon-qemu-0.5]$ gdb -c=20 core.15214
GNU gdb Red Hat Linux = (6.1post-1.20040607.62rh)
Copyright 2004=20 Free Software Foundation, Inc.
GDB is free software, covered by the = GNU=20 General Public License, and you are
welcome to change it and/or = distribute=20 copies of it under certain conditions.
Type "show copying" to see the = conditions.
There is absolutely no warranty for GDB.  Type "show = warranty" for details.
This GDB was configured as=20 "i386-redhat-linux-gnu".
Core was generated by=20 `../qemu/bin/qemu-system-mipsel -nographic -L'.
Program terminated = with=20 signal 11, Segmentation fault.
#0  0x00000000 in ?? ()
(gdb)=20 bt
#0  0x00000000 in ?? ()
#1  0x0804b4c7 in ?? = ()
#2 =20 0x00000000 in ?? = ()
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D
 
--
-=3DAV=3D-
------=_NextPart_000_2A00_01C66F05.8C6AB1C0--