aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2017-09-20 16:56:03 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-09-20 23:25:01 -0500
commit5e09fe1f19d3f56b1cebb44439da5b5de6e1fccd (patch)
tree159d5c1c26a8068df3ec6cc623f5db7e3bfa8310 /include
parent5779c11fdc57c4dc474beb00f044f34ec1c58368 (diff)
downloadskiboot-5e09fe1f19d3f56b1cebb44439da5b5de6e1fccd.zip
skiboot-5e09fe1f19d3f56b1cebb44439da5b5de6e1fccd.tar.gz
skiboot-5e09fe1f19d3f56b1cebb44439da5b5de6e1fccd.tar.bz2
core: POWER9 implement OPAL_SIGNAL_SYSTEM_RESET
This implements OPAL_SIGNAL_SYSTEM_RESET, using scom registers to quiesce the target thread and raise a system reset exception on it. It has been tested on DD2 with stop0 ESL=0 and ESL=1 shallow power saving modes. DD1 is not implemented because it is sufficiently different as to make support difficult. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> [stewart@linux.vnet.ibm.com: fixup hdat_to_dt test] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include')
-rw-r--r--include/cpu.h7
-rw-r--r--include/processor.h15
-rw-r--r--include/skiboot.h4
3 files changed, 26 insertions, 0 deletions
diff --git a/include/cpu.h b/include/cpu.h
index fd3acf7..1b622a5 100644
--- a/include/cpu.h
+++ b/include/cpu.h
@@ -95,6 +95,13 @@ struct cpu_thread {
/* For use by XICS emulation on XIVE */
struct xive_cpu_state *xstate;
+
+ /*
+ * For direct controls scoms, including special wakeup.
+ */
+ struct lock dctl_lock; /* primary only */
+ bool dctl_stopped; /* per thread */
+ uint32_t special_wakeup_count; /* primary */
};
/* This global is set to 1 to allow secondaries to callin,
diff --git a/include/processor.h b/include/processor.h
index 2e1ac37..da48304 100644
--- a/include/processor.h
+++ b/include/processor.h
@@ -206,6 +206,21 @@
#include <compiler.h>
#include <stdint.h>
+#include <stdbool.h>
+
+static inline bool is_power9n(uint32_t version)
+{
+ if (PVR_TYPE(version) != PVR_TYPE_P9)
+ return false;
+ /*
+ * Bit 13 tells us:
+ * 0 = Scale out (aka Nimbus)
+ * 1 = Scale up (aka Cumulus)
+ */
+ if ((version >> 13) & 1)
+ return false;
+ return true;
+}
/*
* SMT priority
diff --git a/include/skiboot.h b/include/skiboot.h
index 3040c51..a32af6a 100644
--- a/include/skiboot.h
+++ b/include/skiboot.h
@@ -205,6 +205,10 @@ extern char __sym_map_end[];
extern unsigned long get_symbol(unsigned long addr,
char **sym, char **sym_end);
+/* Direct controls */
+extern void direct_controls_init(void);
+extern int64_t opal_signal_system_reset(int cpu_nr);
+
/* Fast reboot support */
extern void disable_fast_reboot(const char *reason);
extern void fast_reboot(void);