Skip to content

Commit

Permalink
target-ppc: Add HID4 SPR for PPC970
Browse files Browse the repository at this point in the history
Previously LPCR was registered for the 970 class which was wrong as
it does not have LPCR. Instead, HID4 is used which this patch registers.

Signed-off-by: Alexey Kardashevskiy <[email protected]>
Reviewed-by: Tom Musta <[email protected]>
Signed-off-by: Alexander Graf <[email protected]>
  • Loading branch information
aik authored and agraf committed Jun 16, 2014
1 parent c36c97f commit ba88100
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions target-ppc/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -1679,6 +1679,7 @@ static inline int cpu_mmu_index (CPUPPCState *env)
#define SPR_750_TDCL (0x3F4)
#define SPR_40x_IAC1 (0x3F4)
#define SPR_MMUCSR0 (0x3F4)
#define SPR_970_HID4 (0x3F4)
#define SPR_DABR (0x3F5)
#define DABR_MASK (~(target_ulong)0x7)
#define SPR_Exxx_BUCSR (0x3F5)
Expand Down
11 changes: 11 additions & 0 deletions target-ppc/translate_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -7308,6 +7308,16 @@ static void gen_spr_970_hior(CPUPPCState *env)
0x00000000);
}

static void gen_spr_970_lpar(CPUPPCState *env)
{
/* Logical partitionning */
/* PPC970: HID4 is effectively the LPCR */
spr_register(env, SPR_970_HID4, "HID4",
SPR_NOACCESS, SPR_NOACCESS,
&spr_read_generic, &spr_write_generic,
0x00000000);
}

static void gen_spr_book3s_common(CPUPPCState *env)
{
spr_register(env, SPR_CTRL, "SPR_CTRL",
Expand Down Expand Up @@ -7497,6 +7507,7 @@ static void init_proc_970 (CPUPPCState *env)
gen_spr_book3s_common(env);
gen_spr_970_pmu_sup(env);
gen_spr_970_pmu_user(env);
gen_spr_970_lpar(env);

gen_spr_power5p_ear(env);

Expand Down

0 comments on commit ba88100

Please sign in to comment.