From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36505) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8GEg-0005w8-Nh for qemu-devel@nongnu.org; Thu, 15 Mar 2012 15:21:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S8GEF-00043y-7T for qemu-devel@nongnu.org; Thu, 15 Mar 2012 15:21:18 -0400 Received: from mail-ee0-f45.google.com ([74.125.83.45]:55924) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8GEF-000437-1P for qemu-devel@nongnu.org; Thu, 15 Mar 2012 15:20:51 -0400 Received: by eeit10 with SMTP id t10so2121135eei.4 for ; Thu, 15 Mar 2012 12:20:47 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <201203151908.45065.paul@codesourcery.com> References: <1330893156-26569-1-git-send-email-afaerber@suse.de> <1331398436-20761-1-git-send-email-afaerber@suse.de> <1331398436-20761-9-git-send-email-afaerber@suse.de> <201203151908.45065.paul@codesourcery.com> Date: Thu, 15 Mar 2012 19:20:46 +0000 Message-ID: From: Peter Maydell Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH RFC v4 08/20] target-arm: Store cp15 c0_c1 and c0_c2 in ARMCPUClass List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: =?UTF-8?Q?Andreas_F=C3=A4rber?= , qemu-devel@nongnu.org On 15 March 2012 19:08, Paul Brook wrote: >> For now set them in the reset function. > >> + =C2=A0 =C2=A0/* TODO Move these into arm_cpu_initfn() once no longer z= eroed above.*/ >> + =C2=A0 =C2=A0memcpy(env->cp15.c0_c1, klass->cp15.c0_c1, 8 * sizeof(uin= t32_t)); >> + =C2=A0 =C2=A0memcpy(env->cp15.c0_c2, klass->cp15.c0_c2, 8 * sizeof(uin= t32_t)); + > > Why bother copying them into the CPU state? =C2=A0These are readonly, so = anything > that needs them should be able to use the value straight from the class > definitions. In my (hugely delayed) cp15 rework attempt these probably go away anyway in favour of having each CPU register a pile of registers along the lines o= f { .name =3D "ID_PFR0", .cp =3D 15, .crn =3D 0, .crm =3D 1, .opc1 =3D 0,= .opc2 =3D 0, .access =3D PL1_R, .type =3D ARM_CP_CONST, .resetvalue =3D 0x00001231= }, { .name =3D "ID_PFR1", .cp =3D 15, .crn =3D 0, .crm =3D 1, .opc1 =3D 0,= .opc2 =3D 1, .access =3D PL1_R, .type =3D ARM_CP_CONST, .resetvalue =3D 0x00000011= }, etc. I'm not sure there's any need to retain the CPUState (or equivalent) fields for them at that point. -- PMM