qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] PPC: Add PIR register to POWER7 CPU
@ 2012-03-03 16:36 Nathan Whitehorn
  2012-03-03 18:06 ` Andreas Färber
  0 siblings, 1 reply; 3+ messages in thread
From: Nathan Whitehorn @ 2012-03-03 16:36 UTC (permalink / raw)
  To: QEMU Developers

The POWER7 emulation is missing the Processor Identification Register, 
mandatory in recent POWER CPUs, that is required for SMP on at least 
some operating systems (e.g. FreeBSD) to function properly. This patch 
copies the existing PIR code from the other CPUs that implement it.

Signed-off-by: Nathan Whitehorn <nwhitehorn@freebsd.org>
---
  target-ppc/translate_init.c |    5 +++++
  1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index 8a7233f..01f4030 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -6537,6 +6537,11 @@ static void init_proc_POWER7 (CPUPPCState *env)
      /* Time base */
      gen_tbl(env);
  #if !defined(CONFIG_USER_ONLY)
+    /* Processor identification */
+    spr_register(env, SPR_PIR, "PIR",
+                 SPR_NOACCESS, SPR_NOACCESS,
+ &spr_read_generic, &spr_write_pir,
+                 0x00000000);
      /* PURR & SPURR: Hack - treat these as aliases for the TB for now */
      spr_register(env, SPR_PURR,   "PURR",
&spr_read_purr, SPR_NOACCESS,
--
1.7.9

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] PPC: Add PIR register to POWER7 CPU
  2012-03-03 16:36 [Qemu-devel] [PATCH] PPC: Add PIR register to POWER7 CPU Nathan Whitehorn
@ 2012-03-03 18:06 ` Andreas Färber
  2012-03-07 15:41   ` Alexander Graf
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Färber @ 2012-03-03 18:06 UTC (permalink / raw)
  To: Nathan Whitehorn; +Cc: qemu-ppc, QEMU Developers, Alexander Graf

Am 03.03.2012 17:36, schrieb Nathan Whitehorn:
> The POWER7 emulation is missing the Processor Identification Register,
> mandatory in recent POWER CPUs, that is required for SMP on at least
> some operating systems (e.g. FreeBSD) to function properly. This patch
> copies the existing PIR code from the other CPUs that implement it.
> 
> Signed-off-by: Nathan Whitehorn <nwhitehorn@freebsd.org>

Please always cc the respective maintainers (and lists) according to
MAINTAINERS. CC'ing Alex and qemu-ppc.

> ---
>  target-ppc/translate_init.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
> index 8a7233f..01f4030 100644
> --- a/target-ppc/translate_init.c
> +++ b/target-ppc/translate_init.c
> @@ -6537,6 +6537,11 @@ static void init_proc_POWER7 (CPUPPCState *env)
>      /* Time base */
>      gen_tbl(env);
>  #if !defined(CONFIG_USER_ONLY)
> +    /* Processor identification */
> +    spr_register(env, SPR_PIR, "PIR",
> +                 SPR_NOACCESS, SPR_NOACCESS,
> + &spr_read_generic, &spr_write_pir,

Indentation looks weird here. Stray tab maybe?

Andreas

> +                 0x00000000);
>      /* PURR & SPURR: Hack - treat these as aliases for the TB for now */
>      spr_register(env, SPR_PURR,   "PURR",
> &spr_read_purr, SPR_NOACCESS,
> -- 
> 1.7.9

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] PPC: Add PIR register to POWER7 CPU
  2012-03-03 18:06 ` Andreas Färber
@ 2012-03-07 15:41   ` Alexander Graf
  0 siblings, 0 replies; 3+ messages in thread
From: Alexander Graf @ 2012-03-07 15:41 UTC (permalink / raw)
  To: Andreas Färber; +Cc: qemu-ppc, Nathan Whitehorn, QEMU Developers

On 03/03/2012 07:06 PM, Andreas Färber wrote:
> Am 03.03.2012 17:36, schrieb Nathan Whitehorn:
>> The POWER7 emulation is missing the Processor Identification Register,
>> mandatory in recent POWER CPUs, that is required for SMP on at least
>> some operating systems (e.g. FreeBSD) to function properly. This patch
>> copies the existing PIR code from the other CPUs that implement it.
>>
>> Signed-off-by: Nathan Whitehorn<nwhitehorn@freebsd.org>
> Please always cc the respective maintainers (and lists) according to
> MAINTAINERS. CC'ing Alex and qemu-ppc.
>
>> ---
>>   target-ppc/translate_init.c |    5 +++++
>>   1 files changed, 5 insertions(+), 0 deletions(-)
>>
>> diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
>> index 8a7233f..01f4030 100644
>> --- a/target-ppc/translate_init.c
>> +++ b/target-ppc/translate_init.c
>> @@ -6537,6 +6537,11 @@ static void init_proc_POWER7 (CPUPPCState *env)
>>       /* Time base */
>>       gen_tbl(env);
>>   #if !defined(CONFIG_USER_ONLY)
>> +    /* Processor identification */
>> +    spr_register(env, SPR_PIR, "PIR",
>> +                 SPR_NOACCESS, SPR_NOACCESS,
>> +&spr_read_generic,&spr_write_pir,
> Indentation looks weird here. Stray tab maybe?

No tab, just a broken patch. I fixed the whitespace and applied it to 
ppc-next.


Alex

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-03-07 15:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-03 16:36 [Qemu-devel] [PATCH] PPC: Add PIR register to POWER7 CPU Nathan Whitehorn
2012-03-03 18:06 ` Andreas Färber
2012-03-07 15:41   ` Alexander Graf

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