From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41840) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHei4-0001KE-O7 for qemu-devel@nongnu.org; Thu, 05 Sep 2013 14:55:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VHehy-0003Zh-UM for qemu-devel@nongnu.org; Thu, 05 Sep 2013 14:55:16 -0400 Received: from cantor2.suse.de ([195.135.220.15]:54907 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHehy-0003Zb-Kk for qemu-devel@nongnu.org; Thu, 05 Sep 2013 14:55:10 -0400 Message-ID: <5228D38A.6040401@suse.de> Date: Thu, 05 Sep 2013 20:55:06 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1378399437-17615-1-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1378399437-17615-1-git-send-email-peter.maydell@linaro.org> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] pl110: Clarify comment about PL110 ID on VersatilePB List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel@nongnu.org, patches@linaro.org Am 05.09.2013 18:43, schrieb Peter Maydell: > Clarify a comment about the ID register value presented by > the PL110 variant present on the VersatilePB board (based > on testing what the actual hardware does), to indicate that > this is not an error in our emulation, and to remove an #if-0. >=20 > Signed-off-by: Peter Maydell > --- > I happened to have to check the h/w behaviour in this area today > during a discussion about some kernel pl11x patches, so I thought > I might as well record the info and clean up the #if-0 in the > process. >=20 > hw/display/pl110.c | 18 ++++++++---------- > 1 file changed, 8 insertions(+), 10 deletions(-) >=20 > diff --git a/hw/display/pl110.c b/hw/display/pl110.c > index e79ab4b..790e510 100644 > --- a/hw/display/pl110.c > +++ b/hw/display/pl110.c > @@ -94,23 +94,21 @@ static const VMStateDescription vmstate_pl110 =3D { > static const unsigned char pl110_id[] =3D > { 0x10, 0x11, 0x04, 0x00, 0x0d, 0xf0, 0x05, 0xb1 }; > =20 > -/* The Arm documentation (DDI0224C) says the CLDC on the Versatile boa= rd > - has a different ID. However Linux only looks for the normal ID. *= / > -#if 0 > -static const unsigned char pl110_versatile_id[] =3D > -{ 0x93, 0x10, 0x04, 0x00, 0x0d, 0xf0, 0x05, 0xb1 }; > -#else > -#define pl110_versatile_id pl110_id > -#endif > - > static const unsigned char pl111_id[] =3D { > 0x11, 0x11, 0x24, 0x00, 0x0d, 0xf0, 0x05, 0xb1 > }; > =20 > + > /* Indexed by pl110_version */ > static const unsigned char *idregs[] =3D { > pl110_id, > - pl110_versatile_id, > + /* The ARM documentation (DDI0224C) says the CLCDC on the Versatil= e board > + * has a different ID (0x93, 0x10, 0x04, 0x00, ...). However the h= ardware > + * itself has the same ID values as a stock PL110, and guests (in > + * particular Linux) rely on this. We emulate what the hardware do= es, > + * rather than what the docs claim it ought to do. > + */ > + pl110_id, > pl111_id > }; > =20 I vaguely remember us having a conversation that we might store these in the class, but me not wanting to refactor that in my 1.6 candidate patchset, right? In case you find some time, feel free to improve on this, I'll get my other pending series polished first. Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg