summaryrefslogtreecommitdiffstats
path: root/src/include/arch/ppc.H
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2012-07-31 10:26:12 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-08-10 11:38:42 -0500
commit99f217daf307b3cd963bcbce8eb7b025d58f734e (patch)
tree87a82faba5be946460ff25f222f0f10a03afdfce /src/include/arch/ppc.H
parentda472c60655393f0bb49113713a8be2bdd2a9b6f (diff)
downloadtalos-hostboot-99f217daf307b3cd963bcbce8eb7b025d58f734e.tar.gz
talos-hostboot-99f217daf307b3cd963bcbce8eb7b025d58f734e.zip
Support for master winkle.
RTC: 44730 Change-Id: Ifaeecc659e1bfd8ded4744dc591fc993471519ba Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1471 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/arch/ppc.H')
-rw-r--r--src/include/arch/ppc.H14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/include/arch/ppc.H b/src/include/arch/ppc.H
index 9ba62ff9e..4e6add553 100644
--- a/src/include/arch/ppc.H
+++ b/src/include/arch/ppc.H
@@ -159,6 +159,16 @@ inline uint64_t getTB()
}
ALWAYS_INLINE
+inline void setTB(uint64_t _tb)
+{
+ // The bottom 24 bits of the timebase can't be written so round it up.
+ register uint64_t tb = (_tb + 0x1000000);
+ // Note that SPR 286 is intended (while getTB is 268) here.
+ // This is the mttbu40 instruction and not the mttb, which doesn't exist.
+ asm volatile("mtspr 286, %0" :: "r" (tb));
+}
+
+ALWAYS_INLINE
inline void setDEC(uint64_t _dec)
{
register uint64_t dec = _dec;
@@ -277,9 +287,9 @@ inline void icbi(void* _ptr)
}
ALWAYS_INLINE
-inline void doze()
+inline void nap()
{
- asm volatile("doze");
+ asm volatile("nap");
}
ALWAYS_INLINE
OpenPOWER on IntegriCloud