On 4 June 2018 at 17:34, David Gibson <da...@gibson.dropbear.id.au> wrote: > On Thu, May 31, 2018 at 10:34:29PM +0930, Joel Stanley wrote: >> @@ -98,6 +99,15 @@ void helper_store_ptcr(CPUPPCState *env, target_ulong val) >> tlb_flush(CPU(cpu)); >> } >> } >> + >> +void helper_store_pcr(CPUPPCState *env, target_ulong value) >> +{ >> + if (value != 0) { >> + error_report("Invalid PCR value 0x"TARGET_FMT_lx, value); >> + return; >> + } > > I don't see a lot of point to this check. For now the only user just > clears the PCR, but why limit yourself to that explicitly?
As we're not emulating the features of the register when the value is non-zero, I thought it would make make sense to do something. I'll drop it in v3. > >> + env->spr[SPR_PCR] = value; > > You definitely should be masking against pcr_mask too. Okay. Thanks for the review. Cheers, Joel