From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:41529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RiRt1-00050n-O7 for qemu-devel@nongnu.org; Wed, 04 Jan 2012 09:32:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RiRsw-0004z3-KW for qemu-devel@nongnu.org; Wed, 04 Jan 2012 09:32:15 -0500 Received: from mail-qw0-f45.google.com ([209.85.216.45]:59722) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RiRsw-0004yl-EB for qemu-devel@nongnu.org; Wed, 04 Jan 2012 09:32:10 -0500 Received: by qadc10 with SMTP id c10so9822657qad.4 for ; Wed, 04 Jan 2012 06:32:09 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1325175596-5807-4-git-send-email-mark.langsdorf@calxeda.com> References: <1325175596-5807-1-git-send-email-mark.langsdorf@calxeda.com> <1325175596-5807-4-git-send-email-mark.langsdorf@calxeda.com> Date: Wed, 4 Jan 2012 14:32:09 +0000 Message-ID: From: Peter Maydell Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v5 3/7] arm: add dummy v7 cp15 config_base_register List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mark Langsdorf Cc: qemu-devel@nongnu.org, rob.herring@calxeda.com, afaerber@suse.de On 29 December 2011 16:19, Mark Langsdorf wrot= e: > Add a cp15 config_base_register that currently defaults to 0. > After the QOM CPU support is added, the value will be properly > set to the periphal base value. > > Signed-off-by: Mark Langsdorf > Reviewed-by: Peter Maydell I need to revoke this Reviewed-by: because... > @@ -2111,6 +2111,20 @@ uint32_t HELPER(get_cp15)(CPUState *env, uint32_t = insn) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0* 0x200 << ($rn & 0xfff),= when MMU is off. =C2=A0*/ > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 goto bad_reg; > =C2=A0 =C2=A0 =C2=A0 =C2=A0 } > + =C2=A0 =C2=A0 =C2=A0 =C2=A0if (ARM_CPUID(env) =3D=3D ARM_CPUID_CORTEXA9= ) { > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0switch (crm) { > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0case 0: > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* The config_ba= se_address should hold the value of > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 * the periphera= l base. ARM should get this from a CPU > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 * object proper= ty, but that support isn't available in > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 * December 2011= . Default to 0 for now and board models > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 * that care can= set it by a private hook */ > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if ((op1 =3D=3D = 4) && (op2 =3D=3D 0)) { > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0re= turn env->cp15.c15_config_base_address; > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0} > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0} > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0goto bad_reg; > + =C2=A0 =C2=A0 =C2=A0 =C2=A0} > =C2=A0 =C2=A0 =C2=A0 =C2=A0 return 0; this breaks booting on vexpress, which complains qemu: fatal: Unimplemented cp15 register read (c15, c0, {0, 1}) because we're now barfing on all the other c15 registers which we used to read as zero. The simplest fix is to drop that 'goto bad_reg;'. More complicatedly we could decode the c15 range properly for A9 (as per the TRM). -- PMM