summaryrefslogtreecommitdiffstats
path: root/src/include/arch/ppc.H
diff options
context:
space:
mode:
authorBrian Stegmiller <bjs@us.ibm.com>2015-11-15 10:52:28 -0600
committerPatrick Williams <iawillia@us.ibm.com>2015-12-11 15:30:29 -0600
commitcb1f5614326054b025774dae1a37ad5bdf07902d (patch)
tree4b5ef74fd7aac1b7bba91da711da867ccb870920 /src/include/arch/ppc.H
parentbedb0a1a1818ebe6d683028926ccaec14fdb9f8d (diff)
downloadtalos-hostboot-cb1f5614326054b025774dae1a37ad5bdf07902d.tar.gz
talos-hostboot-cb1f5614326054b025774dae1a37ad5bdf07902d.zip
HOSTBOOT: Support fused cores
Change-Id: I2ad133be733ee9e41590b3b8bd60bd6abe69d1a9 RTC: 126786 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/22054 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/arch/ppc.H')
-rw-r--r--src/include/arch/ppc.H34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/include/arch/ppc.H b/src/include/arch/ppc.H
index 8402f743c..455728500 100644
--- a/src/include/arch/ppc.H
+++ b/src/include/arch/ppc.H
@@ -339,6 +339,29 @@ inline void nap()
{
// @todo-RTC:130186 Add new stop command support
//asm volatile("nap");
+
+ // Nap should be equivalent to 'stop 1' (no state loss)
+ // 855 reg for HYPV, 823 reg otherwise
+ // using EC(bit43) as 1 here (system reset or LPCR event)
+ // PHYP uses bit 42 as 1 also
+// register uint64_t psscr = 0x0000000000310001;
+// asm volatile("mtspr 823, %0; isync" :: "r" (psscr));
+// asm volatile(".long 0x4C0002E4"); // When GCC supports 'stop', use it
+}
+
+ALWAYS_INLINE
+inline void setPSSCR(uint64_t _psscr)
+{
+ register uint64_t psscr = _psscr;
+ asm volatile("mtspr 855, %0; isync" :: "r" (psscr));
+}
+
+ALWAYS_INLINE
+inline uint64_t getPSSCR()
+{
+ register uint64_t psscr = 0;
+ asm volatile("mfspr %0, 855" : "=r" (psscr));
+ return psscr;
}
ALWAYS_INLINE
@@ -426,6 +449,10 @@ enum
// some state from the core doing the
// wakeup to apply into the woken one.
+ MAGIC_SIMICS_FUSEDCOREWAKE = 11, // Indicate to the PHYP model of simics
+ // that we are waking up and expecting
+ // CORES to become fused.
+
MAGIC_SHUTDOWN = 7006, // KernelMisc::shutdown() called.
MAGIC_BREAK = 7007, // hard-code a breakpoint
MAGIC_RANDOM = 7008, // generate random number
@@ -433,6 +460,13 @@ enum
MAGIC_FAKEPAYLOAD_ENTER = 7010, // Entered the fake payload.
MAGIC_SIMICS_CHECK = 7011, // Check if system is running on simics
MAGIC_LOAD_PAYLOAD = 7012, // load payload from flash
+
+ // These are used for getting threads
+ // going after doing 'stop/winkle'
+ MAGIC_WAKE_MASTER_THREAD = 7015, // Wake master thread
+ MAGIC_WAKE_OTHER_THREADS = 7016, // Wake other threads on initial CORE
+ MAGIC_WAKE_FUSED_THREADS = 7017, // Wake up fused core threads
+
MAGIC_CONTINUOUS_TRACE = 7055, // extract mixed trace buffer
};
OpenPOWER on IntegriCloud