diff options
author | Bill Hoffa <wghoffa@us.ibm.com> | 2018-07-23 10:34:32 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-07-24 09:39:23 -0500 |
commit | 331b4bff6cb94d3578243089c2adcf3908058d63 (patch) | |
tree | 22d542cc21702eea675e2f8fa278ca35edf164b4 /src/include/kernel | |
parent | 923ed59ce8a7703b5d36abee3ada0fd4248a6178 (diff) | |
download | talos-hostboot-331b4bff6cb94d3578243089c2adcf3908058d63.tar.gz talos-hostboot-331b4bff6cb94d3578243089c2adcf3908058d63.zip |
Restore Timebase on Master Core Threads 1-3 after Sleep/Winkle
Change-Id: I329dd64345f2474cb0dad628ccc2244d85be86c2
CQ: SW429364
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/63147
Reviewed-by: ILYA SMIRNOV <ismirno@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Reviewed-by: Prachi Gupta <pragupta@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/kernel')
-rw-r--r-- | src/include/kernel/cpu.H | 3 | ||||
-rw-r--r-- | src/include/kernel/doorbell.H | 7 | ||||
-rw-r--r-- | src/include/kernel/workitem.H | 12 |
3 files changed, 22 insertions, 0 deletions
diff --git a/src/include/kernel/cpu.H b/src/include/kernel/cpu.H index f218e3e45..e6dc4a1fa 100644 --- a/src/include/kernel/cpu.H +++ b/src/include/kernel/cpu.H @@ -104,6 +104,9 @@ struct cpu_t /** Sequence ID of CPU initialization. */ uint64_t cpu_start_seqid; + /** Timebase Restore Value (used during core wakeup) */ + uint64_t cpu_restore_tb; + /** Stack of WorkItems to be executed during doorbell wakeup */ Util::Lockfree::Stack<KernelWorkItem> doorbell_actions; }; diff --git a/src/include/kernel/doorbell.H b/src/include/kernel/doorbell.H index 1d01ce119..d9a613672 100644 --- a/src/include/kernel/doorbell.H +++ b/src/include/kernel/doorbell.H @@ -56,6 +56,13 @@ void send_doorbell_wakeup(uint64_t i_pir); */ void send_doorbell_ipc(uint64_t i_pir); +/** Send a doorbell and also restore the thread's timebase + * + * @param i_pir - PIR to send doorbell to wakeup + * @param i_tb - Timebase value to restore during wakeup + */ +void send_doorbell_restore_tb(uint64_t i_pir, uint64_t i_tb); + enum { _DOORBELL_MSG_TYPE = 0x0000000028000000, /// Comes from the ISA. diff --git a/src/include/kernel/workitem.H b/src/include/kernel/workitem.H index 856f5b365..027f3626f 100644 --- a/src/include/kernel/workitem.H +++ b/src/include/kernel/workitem.H @@ -53,6 +53,18 @@ class CpuWakeupDoorbellWorkItem : public KernelWorkItem ~CpuWakeupDoorbellWorkItem() = default; }; +//A work item to be created/executed during a Master CPU +// wakeup scenario, it will also restore the timebase +// on the threads being woken up +class CpuTbRestoreDoorbellWorkItem : public KernelWorkItem +{ + public: + //Implement operator() function + void operator() (void); + + //No data to clean up, use default destructor + ~CpuTbRestoreDoorbellWorkItem() = default; +}; #endif |