Fix powerpc 604 reset vector
PATCH 1/1 Fix powerpc 604 reset vector
According to 604eUM_book (see 8.3.3 Reset inputs p8-54), the IP bit is set for hreset and the vector is at offset 0x100 from the exception prefix.
No difference in this area between 604 and 604e.
--- target-ppc/translate_init.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
target-ppc/translate_init.c +2 -2
@@ -2875,9 +2875,9 @@ static void init_excp_604 (CPUPPCState *env) env->excp_vectors[POWERPC_EXCP_PERFM ] =0x00000F00 ; env->excp_vectors[POWERPC_EXCP_IABR ] =0x00001300 ; env->excp_vectors[POWERPC_EXCP_SMI ] =0x00001400 ; - env->excp_prefix =0x00000000UL ; + env->excp_prefix =0xFFF00000UL ;/* Hardware reset vector */ - env->hreset_vector =0xFFFFFFFCUL ; + env->hreset_vector =0x00000100UL ;#endif }
Signature · 1 line
1.6.2
Quoted 4 lines · Tristan Gingold
According to 604eUM_book (see 8.3.3 Reset inputs p8-54), the IP bit is set
for hreset and the vector is at offset0x100from the exception prefix.No difference in this area between 604 and 604e.
This breaks system_reset. Maybe the excp_prefix should be reset to original value on reset?
Quoted 8 lines · Blue Swirl
Quoted 4 lines · Tristan Gingold
According to 604eUM_book (see 8.3.3 Reset inputs p8-54), the IP bit is set for hreset and the vector is at offset
0x100from the exception prefix.No difference in this area between 604 and 604e.
This breaks
system_reset. Maybe theexcp_prefixshould be reset to original value on reset?
Is system_reset supposed to be a soft reset or an hard reset ?
Maybe the firmware you used doesn't handle soft reset.
Quoted 7 lines · Tristan Gingold
Quoted 4 lines · Blue Swirl
Quoted 3 lines · Tristan Gingold
According to 604eUM_book (see 8.3.3 Reset inputs p8-54), the IP bit is set for hreset and the vector is at offset
0x100from the exception prefix.
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
No difference in this area between 604 and 604e.
This breaks
system_reset. Maybe theexcp_prefixshould be reset to original value on reset?Is
system_resetsupposed to be a soft reset or an hard reset ?
To be more precise:
helper.c:cpu_ppc_reset set msr EP (=IP) bit without setting excp_prefix.
This is not coherent: if exceptions are enabled without resetting EP bit, a wrong prefix will be used.
Blue Swirl
AppliedQuoted 4 lines · Tristan Gingold
According to 604eUM_book (see 8.3.3 Reset inputs p8-54), the IP bit is set
for hreset and the vector is at offset0x100from the exception prefix.No difference in this area between 604 and 604e.
Thanks, applied.