aboutsummaryrefslogtreecommitdiff
path: root/include/skiboot.h
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2019-09-25 11:01:34 +1000
committerOliver O'Halloran <oohall@gmail.com>2019-10-03 09:55:58 +1000
commit9ddc1a6bfaef8669efd00b36fa1b699c04f6488d (patch)
tree1e3b1585813e5db510f0b7e31914afed040e45b9 /include/skiboot.h
parentb70e8afdb09f56e3c7db643862cd3d2fd15a4544 (diff)
downloadskiboot-9ddc1a6bfaef8669efd00b36fa1b699c04f6488d.zip
skiboot-9ddc1a6bfaef8669efd00b36fa1b699c04f6488d.tar.gz
skiboot-9ddc1a6bfaef8669efd00b36fa1b699c04f6488d.tar.bz2
core/util: trap based assertions
Using traps for assertions like Linux does gives a few advantages: - The asm code leading to the failure condition is nicer. - The interrupt gives a clean snapshot of machine state to dump. The difficulty with using traps for this in OPAL is that the runtime component will not deal well with the OS taking the 0x700 interrupt caused by a trap in OPAL. The long term goal is to improve the ability of the OS to inspect and debug OPAL at runtime. For now though, the traps are patched out before passing control to the OS, and the assert falls through to in-line failure handling. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> [oliver: commit prefix, added and renamed the FWTS label, fix tests] Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Diffstat (limited to 'include/skiboot.h')
-rw-r--r--include/skiboot.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/skiboot.h b/include/skiboot.h
index 96d25b8..686ba9d 100644
--- a/include/skiboot.h
+++ b/include/skiboot.h
@@ -192,6 +192,7 @@ extern bool start_preload_kernel(void);
extern void copy_exception_vectors(void);
extern void copy_sreset_vector(void);
extern void copy_sreset_vector_fast_reboot(void);
+extern void patch_traps(bool enable);
/* Various probe routines, to replace with an initcall system */
extern void probe_phb3(void);