aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2019-01-08 00:04:28 +1000
committerStewart Smith <stewart@linux.ibm.com>2019-02-13 14:36:44 +1100
commit5d86cebd53683d055f039dbecf3f74fb0084ea83 (patch)
treec9c4c9e9844643ca4f73ca686d1c4ec05d2287ee /include
parent22524e9017445a08d63733ae5a8c75d9126bdb28 (diff)
downloadskiboot-5d86cebd53683d055f039dbecf3f74fb0084ea83.zip
skiboot-5d86cebd53683d055f039dbecf3f74fb0084ea83.tar.gz
skiboot-5d86cebd53683d055f039dbecf3f74fb0084ea83.tar.bz2
core/exceptions: implement support for MCE interrupts in powersave
The ISA specifies that MCE interrupts in power saving modes will enter at 0x200 with powersave bits in SRR1 set. This is not currently supported properly, the MCE will just happen like a normal interrupt, but GPRs could be lost, which would lead to crashes (e.g., r1, r2, r13 etc). So check the power save bits similarly to the sreset vector, and handle this properly. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'include')
-rw-r--r--include/processor.h1
-rw-r--r--include/skiboot.h5
2 files changed, 4 insertions, 2 deletions
diff --git a/include/processor.h b/include/processor.h
index 0a93430..edcc210 100644
--- a/include/processor.h
+++ b/include/processor.h
@@ -92,6 +92,7 @@
#define SPR_SRR1_PM_WAKE_MASK 0x3c0000 /* PM wake reason for P8/9 */
#define SPR_SRR1_PM_WAKE_SRESET 0x100000
+#define SPR_SRR1_PM_WAKE_MCE 0x3c0000 /* Use reserved value for MCE */
/* Bits in LPCR */
diff --git a/include/skiboot.h b/include/skiboot.h
index c06146d..6da6223 100644
--- a/include/skiboot.h
+++ b/include/skiboot.h
@@ -289,12 +289,13 @@ extern void fake_rtc_init(void);
struct stack_frame;
extern void exception_entry(struct stack_frame *stack);
extern void exception_entry_pm_sreset(void);
+extern void exception_entry_pm_mce(void);
/* Assembly in head.S */
extern void disable_machine_check(void);
extern void enable_machine_check(void);
-extern void enter_p8_pm_state(bool winkle);
-extern void enter_p9_pm_state(uint64_t psscr);
+extern unsigned int enter_p8_pm_state(bool winkle);
+extern unsigned int enter_p9_pm_state(uint64_t psscr);
extern void enter_p9_pm_lite_state(uint64_t psscr);
extern uint32_t reset_patch_start;
extern uint32_t reset_patch_end;