From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49126) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEnzd-0003Hr-Sy for qemu-devel@nongnu.org; Sun, 19 Jun 2016 21:27:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bEnzc-0005WY-NZ for qemu-devel@nongnu.org; Sun, 19 Jun 2016 21:27:13 -0400 Date: Mon, 20 Jun 2016 11:27:37 +1000 From: David Gibson Message-ID: <20160620012737.GB6858@voom.fritz.box> References: <1466297653.24271.101.camel@kernel.crashing.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4SFOXa2GPu3tIq4H" Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH] ppc: Improve emulation of THRM registers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: BALATON Zoltan Cc: Benjamin Herrenschmidt , qemu-ppc@nongnu.org, qemu-devel@nongnu.org --4SFOXa2GPu3tIq4H Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jun 19, 2016 at 02:14:12PM +0200, BALATON Zoltan wrote: > On Sun, 19 Jun 2016, Benjamin Herrenschmidt wrote: > > The 75x and 74xx processors have some thermal monitoring SPRs that > > some OSes such as MacOS do use. Our current "dumb" implementation > > isn't good enough and will cause some versions of MacOS to hang during > > boot. > >=20 > > This lifts an improved emulation from MacOnLinux and adapts it to > > qemu, thus fixing the problem. > >=20 > > Signed-off-by: Benjamin Herrenschmidt > > --- > > target-ppc/helper.h | 1 + > > target-ppc/misc_helper.c | 41 ++++++++++++++++++++++++++++++++++++++= +++ > > target-ppc/translate_init.c | 13 ++++++++++--- > > 3 files changed, 52 insertions(+), 3 deletions(-) > >=20 > > diff --git a/target-ppc/helper.h b/target-ppc/helper.h > > index f4410a8..18eb52f 100644 > > --- a/target-ppc/helper.h > > +++ b/target-ppc/helper.h > > @@ -670,3 +670,4 @@ DEF_HELPER_4(dscli, void, env, fprp, fprp, i32) > > DEF_HELPER_4(dscliq, void, env, fprp, fprp, i32) > >=20 > > DEF_HELPER_1(tbegin, void, env) > > +DEF_HELPER_1(fixup_thrm, void, env) > > diff --git a/target-ppc/misc_helper.c b/target-ppc/misc_helper.c > > index 7d41b01..4315778 100644 > > --- a/target-ppc/misc_helper.c > > +++ b/target-ppc/misc_helper.c > > @@ -166,3 +166,44 @@ void ppc_store_msr(CPUPPCState *env, target_ulong = value) > > { > > hreg_store_msr(env, value, 0); > > } > > + > > +/* This code is lifted from MacOnLinux. It is called whenever > > + * THRM1,2 or 3 is read an fixes up the values in such a way > > + * that will mac MacOS not hang. These registers exist on some >=20 > Typo: mac -> make? I've made this change, along with a number of checkpatch fixes as I've merged this into my tree. --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --4SFOXa2GPu3tIq4H Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXZ0aJAAoJEGw4ysog2bOS7yQP/iX917ChPo1hBzMnpMxzrFVn eNaqzfcRfBcuT9SBCAKfpwwEbGvlnWRbejA4EDqUhLH3tasr1SzbIwODL1KLF2WT mgJI9uRmd6dx0ubcHrJCNplKBCZPTBtIGRRIMJnxFsM3Q5hDx+j3dOnlK9MWgspY cCQJ6kyXcA5IuNQO6htOumMBt19ojzJPm6VXnbT7dbWWQiBdaYKq3HsMjzA+FGLf 0jfFD7NWj3Y2T1DXo6LfxmXDCWPFCTg1ikKJDr7NR5psd52AvpWyTaT/3fjmKBtd Hob3QcgRo9Pou3lvzzFEAgfrklOyNaf0lsSydKOWLk61Ms6906C6gYrHSHDdFeSw 1aMti5ICQCrrUhVr5k043vlqvgurRJWgwyhBYADGPOC2kbOGgZ/lxVZrF1z3Nw91 7Bs0A4dDC8tdBvQW+wbUFK+tYYp8fyFm9yKBPDAmVwZtnpcmM4/DLhz5F2nnCs8g tENfnr92zULypcBB1PZnTbUtCUqJgxRbhNH3x6U3IiWEzMKMbQfWyKbRbft39Zm7 qDk++yw+XA1rxoHMe9tDy2G0iIGCPpZHQrgZt15bIaEc25xv8mo72A4MkDHFZt6b y//a7zhGpId6t31yNYyrj9eM+WSpf86gyeVp++9UbDdqAlmiCOEG/lu4D2IPZc6A FTIhvtNu99pfFhd6S9+6 =uPXE -----END PGP SIGNATURE----- --4SFOXa2GPu3tIq4H--