From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:53563) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rjrfe-0001Od-N0 for qemu-devel@nongnu.org; Sun, 08 Jan 2012 07:16:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rjrfd-0005fr-AM for qemu-devel@nongnu.org; Sun, 08 Jan 2012 07:16:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42731) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rjrfc-0005fm-Uq for qemu-devel@nongnu.org; Sun, 08 Jan 2012 07:16:17 -0500 Message-ID: <4F09890B.9020108@redhat.com> Date: Sun, 08 Jan 2012 14:16:11 +0200 From: Avi Kivity MIME-Version: 1.0 References: <4F05E1A1.5050709@suse.de> <4F0903F5.20809@suse.de> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1/2] m48t59: drop obsolete address base arithmetic List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: Alexander Graf , =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= , qemu-devel On 01/08/2012 01:43 PM, Blue Swirl wrote: > On Sun, Jan 8, 2012 at 02:48, Andreas F=C3=A4rber wr= ote: > > Am 07.01.2012 18:29, schrieb Blue Swirl: > >> On Thu, Jan 5, 2012 at 17:45, Andreas F=C3=A4rber = wrote: > >>> Am 15.10.2011 15:50, schrieb Blue Swirl: > >>>> Remove now incorrect address base arithmetic, missed by > >>>> 9936d6e42392f1440505dfa9df065eabd251cadf. Fixes Sparc64 boot. > >>> > >>> ...but breaks PReP boot: > >>> > >>> ERROR: BUG caught... > >>> BIOS execution exception > >>> nip=3D0x05800000 msr=3D0x00002000 dar=3D0x00000000 dsisr=3D0x000000= 00 > >>> Stopping execution > >>> > >>> I verified by checking out the preceding commit, applying a variati= on of > >>> http://patchwork.ozlabs.org/patch/134519/ on top; that restored PRe= P > >>> boot to what it used to look like. > >>> > >>> Any insights? > >> > >> Sparc64 problem was that the io_base did not match what was passed t= o > >> the functions and then the calculation made the offset totally > >> incorrect. Could you add printfs to see what is the offset? > > > > info qtree: > > > > dev: m48t59, id "" > > dev-prop: size =3D 8192 > > dev-prop: type =3D 59 > > dev-prop: io_base =3D 0x74 > > irq 1 > > mmio ffffffffffffffff/0000000000002000 > > > > #define DEBUG_NVRAM: > > > > NVRAM_writeb: 0x00000074 =3D> 0x00000000 > > NVRAM_writeb: 0x00000075 =3D> 0x00000000 > > NVRAM_readb: 0x00000077 <=3D 0xffffffff > > NVRAM_writeb: 0x00000074 =3D> 0x00000001 > > NVRAM_writeb: 0x00000075 =3D> 0x00000000 > > NVRAM_readb: 0x00000077 <=3D 0xffffffff > > NVRAM_writeb: 0x00000074 =3D> 0x00000002 > > NVRAM_writeb: 0x00000075 =3D> 0x00000000 > > NVRAM_readb: 0x00000077 <=3D 0xffffffff > > NVRAM_writeb: 0x00000074 =3D> 0x00000003 > > NVRAM_writeb: 0x00000075 =3D> 0x00000000 > > NVRAM_readb: 0x00000077 <=3D 0xffffffff > > NVRAM_writeb: 0x00000074 =3D> 0x00000004 > > NVRAM_writeb: 0x00000075 =3D> 0x00000000 > > NVRAM_readb: 0x00000077 <=3D 0xffffffff > > NVRAM_writeb: 0x00000074 =3D> 0x00000005 > > NVRAM_writeb: 0x00000075 =3D> 0x00000000 > > NVRAM_readb: 0x00000077 <=3D 0xffffffff > > NVRAM_writeb: 0x00000074 =3D> 0x00000006 > > NVRAM_writeb: 0x00000075 =3D> 0x00000000 > > NVRAM_readb: 0x00000077 <=3D 0xffffffff > > NVRAM_writeb: 0x00000074 =3D> 0x00000007 > > NVRAM_writeb: 0x00000075 =3D> 0x00000000 > > NVRAM_readb: 0x00000077 <=3D 0xffffffff > > NVRAM_writeb: 0x00000074 =3D> 0x00000008 > > NVRAM_writeb: 0x00000075 =3D> 0x00000000 > > NVRAM_readb: 0x00000077 <=3D 0xffffffff > > NVRAM_writeb: 0x00000074 =3D> 0x00000009 > > NVRAM_writeb: 0x00000075 =3D> 0x00000000 > > NVRAM_readb: 0x00000077 <=3D 0xffffffff > > NVRAM_writeb: 0x00000074 =3D> 0x0000000a > > NVRAM_writeb: 0x00000075 =3D> 0x00000000 > > NVRAM_readb: 0x00000077 <=3D 0xffffffff > > NVRAM_writeb: 0x00000074 =3D> 0x0000000b > > NVRAM_writeb: 0x00000075 =3D> 0x00000000 > > NVRAM_readb: 0x00000077 <=3D 0xffffffff > > NVRAM_writeb: 0x00000074 =3D> 0x0000000c > > NVRAM_writeb: 0x00000075 =3D> 0x00000000 > > NVRAM_readb: 0x00000077 <=3D 0xffffffff > > NVRAM_writeb: 0x00000074 =3D> 0x0000000d > > NVRAM_writeb: 0x00000075 =3D> 0x00000000 > > NVRAM_readb: 0x00000077 <=3D 0xffffffff > > NVRAM_writeb: 0x00000074 =3D> 0x0000000e > > NVRAM_writeb: 0x00000075 =3D> 0x00000000 > > NVRAM_readb: 0x00000077 <=3D 0xffffffff > > NVRAM_writeb: 0x00000074 =3D> 0x0000000f > > NVRAM_writeb: 0x00000075 =3D> 0x00000000 > > NVRAM_readb: 0x00000077 <=3D 0xffffffff > > This is what happens on Sparc64: > NVRAM_writeb: 0x00000000 =3D> 0x00000000 > NVRAM_writeb: 0x00000001 =3D> 0x00000000 > NVRAM_readb: 0x00000003 <=3D 0x00000070 > NVRAM_writeb: 0x00000000 =3D> 0x00000001 > NVRAM_writeb: 0x00000001 =3D> 0x00000000 > NVRAM_readb: 0x00000003 <=3D 0x0000001a > NVRAM_writeb: 0x00000000 =3D> 0x00000002 > NVRAM_writeb: 0x00000001 =3D> 0x00000000 > NVRAM_readb: 0x00000003 <=3D 0x00000000 > NVRAM_writeb: 0x00000000 =3D> 0x00000003 > NVRAM_writeb: 0x00000001 =3D> 0x00000000 > NVRAM_readb: 0x00000003 <=3D 0x00000002 > NVRAM_writeb: 0x00000000 =3D> 0x00000004 > NVRAM_writeb: 0x00000001 =3D> 0x00000000 > NVRAM_readb: 0x00000003 <=3D 0x00000073 > NVRAM_writeb: 0x00000000 =3D> 0x00000005 > NVRAM_writeb: 0x00000001 =3D> 0x00000000 > NVRAM_readb: 0x00000003 <=3D 0x00000079 > NVRAM_writeb: 0x00000000 =3D> 0x00000006 > NVRAM_writeb: 0x00000001 =3D> 0x00000000 > NVRAM_readb: 0x00000003 <=3D 0x00000073 > NVRAM_writeb: 0x00000000 =3D> 0x00000007 > NVRAM_writeb: 0x00000001 =3D> 0x00000000 > > I/O base offset is kept with PIO but removed from MMIO, which is not > consistent. Avi, could we fix this? Yes, I'll work on it. --=20 error compiling committee.c: too many arguments to function