Commit 2e06214f authored by Nathan Whitehorn's avatar Nathan Whitehorn Committed by Alexander Graf
Browse files

PPC: Add PIR register to POWER7 CPU



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: default avatarNathan Whitehorn <nwhitehorn@freebsd.org>
Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
parent 76ab9583
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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",