qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: BALATON Zoltan <balaton@eik.bme.hu>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH] ppc: Improve emulation of THRM registers
Date: Mon, 20 Jun 2016 11:27:37 +1000	[thread overview]
Message-ID: <20160620012737.GB6858@voom.fritz.box> (raw)
In-Reply-To: <alpine.BSF.2.20.1606191413150.77695@zero.eik.bme.hu>

[-- Attachment #1: Type: text/plain, Size: 1999 bytes --]

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.
> > 
> > This lifts an improved emulation from MacOnLinux and adapts it to
> > qemu, thus fixing the problem.
> > 
> > Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> > ---
> > target-ppc/helper.h         |  1 +
> > target-ppc/misc_helper.c    | 41 +++++++++++++++++++++++++++++++++++++++++
> > target-ppc/translate_init.c | 13 ++++++++++---
> > 3 files changed, 52 insertions(+), 3 deletions(-)
> > 
> > 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)
> > 
> > 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
> 
> Typo: mac -> make?

I've made this change, along with a number of checkpatch fixes as I've
merged this into my tree.


-- 
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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

      reply	other threads:[~2016-06-20  1:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-19  0:54 [Qemu-devel] [PATCH] ppc: Improve emulation of THRM registers Benjamin Herrenschmidt
2016-06-19 12:14 ` [Qemu-devel] [Qemu-ppc] " BALATON Zoltan
2016-06-20  1:27   ` David Gibson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160620012737.GB6858@voom.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=balaton@eik.bme.hu \
    --cc=benh@kernel.crashing.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).