]> git.proxmox.com Git - mirror_qemu.git/commitdiff
PPC: Add PIR register to POWER7 CPU
authorNathan Whitehorn <nwhitehorn@freebsd.org>
Sat, 3 Mar 2012 06:36:36 +0000 (06:36 +0000)
committerAlexander Graf <agraf@suse.de>
Thu, 15 Mar 2012 12:12:11 +0000 (13:12 +0100)
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>
Signed-off-by: Alexander Graf <agraf@suse.de>
target-ppc/translate_init.c

index c707959e234fb537d19957e8d82bc9cbd4606500..5a958b931fab232b52b7b7fa0b1e0ead760f15b0 100644 (file)
@@ -6588,6 +6588,11 @@ static void init_proc_POWER7 (CPUPPCState *env)
     gen_spr_7xx(env);
     /* Time base */
     gen_tbl(env);
+    /* Processor identification */
+    spr_register(env, SPR_PIR, "PIR",
+                 SPR_NOACCESS, SPR_NOACCESS,
+                 &spr_read_generic, &spr_write_pir,
+                 0x00000000);
 #if !defined(CONFIG_USER_ONLY)
     /* PURR & SPURR: Hack - treat these as aliases for the TB for now */
     spr_register(env, SPR_PURR,   "PURR",