summaryrefslogtreecommitdiffstats
path: root/src/include/kernel/ppcarch.H
blob: f6b80ea6f5e3c6e2ecfd5760a78cbcfb4dc3a99a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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
OpenPOWER on IntegriCloud