diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2019-01-08 00:04:25 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2019-02-13 14:36:43 +1100 |
commit | 4ebb78cffda897c4175f6659e98e6722ea60703f (patch) | |
tree | bbff80de0487f23e58aca5e141946795d86b4d4e /include/asm-utils.h | |
parent | 37baa9731d0d07cfcc3201105e5c57a07ad91efc (diff) | |
download | skiboot-4ebb78cffda897c4175f6659e98e6722ea60703f.zip skiboot-4ebb78cffda897c4175f6659e98e6722ea60703f.tar.gz skiboot-4ebb78cffda897c4175f6659e98e6722ea60703f.tar.bz2 |
asm/head: sreset handler remove FIXUP_ENDIAN
Remove FIXUP_ENDIAN from the normal sreset handler (not the fast
reboot handler), to prevent it from trashing registers and CFAR.
This mean sreset can be used to report a reliable register dump,
and even be recoverable. A watchdog could be implemented to
catch and diagnose stuck CPUs during boot using sreset.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'include/asm-utils.h')
-rw-r--r-- | include/asm-utils.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/asm-utils.h b/include/asm-utils.h index 503f2cc..e94a143 100644 --- a/include/asm-utils.h +++ b/include/asm-utils.h @@ -41,5 +41,17 @@ /* Load an address via the TOC */ #define LOAD_ADDR_FROM_TOC(r, e) ld r,e@got(%r2) +#define FIXUP_ENDIAN \ + tdi 0,0,0x48; /* Reverse endian of b . + 8 */ \ + b 191f; /* Skip trampoline if endian is good */ \ + .long 0xa600607d; /* mfmsr r11 */ \ + .long 0x01006b69; /* xori r11,r11,1 */ \ + .long 0x05009f42; /* bcl 20,31,$+4 */ \ + .long 0xa602487d; /* mflr r10 */ \ + .long 0x14004a39; /* addi r10,r10,20 */ \ + .long 0xa64b5a7d; /* mthsrr0 r10 */ \ + .long 0xa64b7b7d; /* mthsrr1 r11 */ \ + .long 0x2402004c; /* hrfid */ \ +191: #endif /* __ASM_UTILS_H */ |