Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IFfmZ-0006B4-LS for qemu-devel@nongnu.org; Mon, 30 Jul 2007 20:40:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IFfmX-00068Q-TP for qemu-devel@nongnu.org; Mon, 30 Jul 2007 20:40:15 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IFfmX-00068G-JQ for qemu-devel@nongnu.org; Mon, 30 Jul 2007 20:40:13 -0400 Received: from gwyn.kn-bremen.de ([212.63.36.242]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IFfmX-0007Uv-3x for qemu-devel@nongnu.org; Mon, 30 Jul 2007 20:40:13 -0400 From: Juergen Lock Date: Tue, 31 Jul 2007 02:37:04 +0200 Subject: Re: [Qemu-devel] qemu-system-arm -M akita/terrier - which roms work? (more patches... :) Message-ID: <20070731003704.GA84636@saturn.kn-bremen.de> References: <200707242025.l6OKPSnJ010124@saturn.kn-bremen.de> <20070726213747.GA23871@saturn.kn-bremen.de> <20070728001237.GA17097@saturn.kn-bremen.de> <20070729011535.GA24527@saturn.kn-bremen.de> <20070729223022.GA49435@saturn.kn-bremen.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="tThc/1wpZn/ma/RB" Content-Disposition: inline In-Reply-To: <20070729223022.GA49435@saturn.kn-bremen.de> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: andrzej zaborowski Cc: qemu-devel@nongnu.org --tThc/1wpZn/ma/RB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Jul 30, 2007 at 12:30:23AM +0200, Juergen Lock wrote: > On Sun, Jul 29, 2007 at 03:46:37AM +0200, andrzej zaborowski wrote: > > Hi, > Hi, > > > > On 29/07/07, Juergen Lock wrote: > > > > Anyway, boot now fails with: > > > qemu: fatal: pxa2xx_gpio_read: Bad offset 0x1c > > > i.e. it is apparently expecting something there that is not yet > > > > Oh, it's Sharp's poor code :) the GPSR (0x1c) and GPCR registers are > > write-only. I think it's safe to assume that the real hardware returns > > the last written value in these addresses when reading, but in the > > documentation they are write-only. > > Yeah it was crashing in static int force_8bit_access_check_and_set > in linux/drivers/pcmcia/cistpl.c, apparently while doing an > GPSR(GPIO54_nPCE_2) = GPSR(GPIO54_nPCE_2); > Patched that (patch-pxa-gpsr, attached), and now the boot seems > to be hanging somewhere in userland... Ok I set a breakpoint on do_execve and found that it was repeatedly calling `/bin/grep ^1 /var/lib/pcmcia/stab'. On my zaurus that file looks like: Socket 0: empty Socket 1: ATA/IDE Fixed Disk 1 ide ide_cs 0 hda 3 0 and indeed in qemu it has the disk in socket 0. Patched that (see patch-spitz-hda, attached), and now (well I also added an sd image since I got lots of pxa_sd_put_command: responce time out by jiffies (cmd=01) ) I at least get INIT: version 2.78 booting mount: Mounting /dev/hda1 on /hdd1 failed: Invalid argument and when I hit ^c (btw, the left shift key does work, only the right one doesnt) it continues with INIT: Entering runlevel: 4 INIT: Switching to runlevel: 6 INIT: Sending processes the TERM signal umount: forced umount of /dev/ram1 failed! Can't find /dev in /etc/fstab umount: /proc: Device or resource busy Rebooting the system... and the kernel's last words on the serial console are flushing ide devices: Restarting system. reboot the kernel (1) Reboot failed -- System halted Okay, time to sfdisk the hda image (it was empty :), boot with `rw init=/bin/sh', mknod /dev/hda*, mounting /proc and /home and then try sfdisk: # sfdisk /dev/hda modprobe: modprobe: Can't locate module block-major-3 /dev/hda: No such device or address sfdisk: cannot open /dev/hda read-write Hmm, some module not loaded? looking around in /lib/modules/ I see no obvious candidate, anyone have an idea? Okay, back to the akita image... booting that to runlevel 2 or 4 now in fact gets me a login prompt on the serial console, and in runlevel 4 I even see the gui splash screen flashing, but the gui doesnt start, and after a few iterations I get INIT: Id "ln" respawning too fast: disabled for 5 minutes ln is (grep ln /etc/inittab): ln:345:respawn:survive -l 6 /sbin/launch Playing around I also found that both `more /etc/inittab' and `ps' exit with `Illegal instruction', ouch! Afer adding CONFIG_DEBUG_USER to the kernel I get more (25): undefined instruction: pc=0002087c Code: ed9fa149 e59f0128 ee012190 ee400181 (ee100182) and ps (26): undefined instruction: pc=0200d94c Code: e24b204c ebffce16 ed1bb113 ed1ba10c (ee230182) (the one in brackets seems to be the insn in question), and tracing the kernel's fpu emulator (starting with EmulateAll in linux/arch/arm/nwfpe/fpa11.c) I find that both failure seem to be caused by an fpa11->fType[x] being 0 == typeNone, i.e. it seems an fpu emulator's register is uninitialized... Anyone have an idea what's up with that? (oh, I didn't rebuild the akita kernel so this was actually debugged with the terrier image.) Thanx, Juergen --tThc/1wpZn/ma/RB Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=patch-spitz-hda Index: qemu/hw/spitz.c @@ -929,7 +929,8 @@ if (bs && bdrv_is_inserted(bs) && !bdrv_is_removable(bs)) { md = dscm1xxxx_init(bs); - pxa2xx_pcmcia_attach(cpu->pcmcia[0], md); + /* at least terrier microdrive is in socket 1 */ + pxa2xx_pcmcia_attach(cpu->pcmcia[1], md); } } --tThc/1wpZn/ma/RB--