diff options
Diffstat (limited to 'src/include/kernel/ppcarch.H')
-rw-r--r-- | src/include/kernel/ppcarch.H | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/include/kernel/ppcarch.H b/src/include/kernel/ppcarch.H new file mode 100644 index 000000000..f6b80ea6f --- /dev/null +++ b/src/include/kernel/ppcarch.H @@ -0,0 +1,14 @@ +#ifndef __KERNEL_PPCARCH_H +#define __KERNEL_PPCARCH_H + +#include <kernel/types.h> + +__attribute__((always_inline)) +inline uint64_t ppc_getSRR1() +{ + register uint64_t srr1 = 0; + asm volatile("mfsrr1 %0" : "=r" (srr1)); + return srr1; +} + +#endif |