diff options
author | Patrick Williams <iawillia@us.ibm.com> | 2010-06-22 16:41:25 -0500 |
---|---|---|
committer | Patrick Williams <iawillia@us.ibm.com> | 2010-06-22 16:41:25 -0500 |
commit | 261aa2b9b790868a16a6cee0f19c73221ddc81d5 (patch) | |
tree | 324a74523aa6596705ae2021c494e6acd2ddbb89 /src/include/kernel | |
parent | 02b38895c3af9ce6aae9bc02ef2930fabefff628 (diff) | |
download | talos-hostboot-261aa2b9b790868a16a6cee0f19c73221ddc81d5.tar.gz talos-hostboot-261aa2b9b790868a16a6cee0f19c73221ddc81d5.zip |
Program exception handling and emulated instruction for mfsprg3.
Diffstat (limited to 'src/include/kernel')
-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 |