diff options
author | Corey Swenson <cswenson@us.ibm.com> | 2015-07-08 12:57:22 -0500 |
---|---|---|
committer | Patrick Williams <iawillia@us.ibm.com> | 2015-12-11 15:30:29 -0600 |
commit | eb551fdd12e4ec25b302ec0f69be51720908e156 (patch) | |
tree | 1573eb484fdb22dc790d810b1ab965eb97f0dd5b /src/include/arch/ppc.H | |
parent | 56e0928053eecfd25832306b6283521462b4e412 (diff) | |
download | talos-hostboot-eb551fdd12e4ec25b302ec0f69be51720908e156.tar.gz talos-hostboot-eb551fdd12e4ec25b302ec0f69be51720908e156.zip |
P9 page table changes
Change-Id: Ic5f234e0ce0747f887a706054f82372c9a96258c
RTC:126640
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/19041
Tested-by: Jenkins Server
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: WILLIAM G. HOFFA <wghoffa@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.H | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/include/arch/ppc.H b/src/include/arch/ppc.H index 54c9e8774..8402f743c 100644 --- a/src/include/arch/ppc.H +++ b/src/include/arch/ppc.H @@ -273,6 +273,21 @@ inline uint64_t getHRMOR() } ALWAYS_INLINE +inline uint64_t getPTCR() +{ + register uint64_t ptcr = 0; + asm volatile("mfspr %0, 464" : "=r" (ptcr)); + return ptcr; +} + +ALWAYS_INLINE +inline void setPTCR(uint64_t _ptcr) +{ + register uint64_t ptcr = _ptcr; + asm volatile("mtspr 464, %0; isync" :: "r" (ptcr)); +} + +ALWAYS_INLINE inline void setThreadPriorityLow() { asm volatile("or 1,1,1"); |