summaryrefslogtreecommitdiffstats
path: root/src/include/kernel/cpumgr.H
diff options
context:
space:
mode:
authorMike Jones <mjjones@us.ibm.com>2011-07-18 13:01:59 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2011-07-19 13:43:56 -0500
commit103f2e58b35ac7218d9960ceb6568ff7ceb332d2 (patch)
treeef4c3bf1e3b8fe380e03d2fc256bdd46d10214fc /src/include/kernel/cpumgr.H
parentbe301c4ea87c944bd1c51ca2c73ac719cec6b495 (diff)
downloadtalos-hostboot-103f2e58b35ac7218d9960ceb6568ff7ceb332d2.tar.gz
talos-hostboot-103f2e58b35ac7218d9960ceb6568ff7ceb332d2.zip
Shutdown and post status on HostBoot completion
Change-Id: If2ab46af85065b29695a1186ed331fd835944eb4 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/204 Tested-by: Jenkins Server Reviewed-by: Mark W. Wenning <wenning@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/kernel/cpumgr.H')
-rw-r--r--src/include/kernel/cpumgr.H25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/include/kernel/cpumgr.H b/src/include/kernel/cpumgr.H
index 6ba4bfee1..4416e5815 100644
--- a/src/include/kernel/cpumgr.H
+++ b/src/include/kernel/cpumgr.H
@@ -14,14 +14,29 @@ class CpuManager
* task structure in SPRG3.
*/
static cpu_t* getCurrentCPU();
- static cpu_t* getCpu(size_t i) { return cv_cpus[i]; };
+ static cpu_t* getCpu(size_t i) { return cv_cpus[i]; }
static void init();
static void init_slave_smp(cpu_t*);
+ /** @fn requestShutdown
+ * Requests that all CPUs shutdown
+ */
+ static void requestShutdown(uint64_t i_status);
+
+ /** @fn isShutdownRequested
+ * Returns if a shutdown of all CPUs was requested
+ */
+ static bool isShutdownRequested() { return cv_shutdown_requested; }
+
+ /** @fn getShutdownStatus
+ * Returns the status code that needs to be posted during shutdown
+ */
+ static uint32_t getShutdownStatus() { return cv_shutdown_status; }
+
protected:
CpuManager();
- ~CpuManager() {};
+ ~CpuManager() {}
/** @fn startCPU
* Starts the requested CPU. Default of -1 implies current CPU.
@@ -33,6 +48,12 @@ class CpuManager
static cpu_t* cv_cpus[MAXCPUS]; // Need to be able to access this
// from start.S to get initial stacks
// of secondary cpus / threads.
+
+ // If a shutdown of all CPUs is requested
+ static bool cv_shutdown_requested;
+
+ // The status code that needs to be posted during shutdown
+ static uint64_t cv_shutdown_status;
};
#endif
OpenPOWER on IntegriCloud