Subversion Repositories HelenOS

Rev

Rev 501 | Rev 532 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 501 Rev 529
Line 83... Line 83...
83
    __asm__ volatile ("and %%o6, %1, %0\n" : "=r" (v) : "r" (~(STACK_SIZE-1)));
83
    __asm__ volatile ("and %%o6, %1, %0\n" : "=r" (v) : "r" (~(STACK_SIZE-1)));
84
   
84
   
85
    return v;
85
    return v;
86
}
86
}
87
 
87
 
-
 
88
/** Read Trap Base Address register.
-
 
89
 *
-
 
90
 * @return Current value in TBA.
-
 
91
 */
-
 
92
static inline __u64 tba_read(void)
-
 
93
{
-
 
94
    __u64 v;
-
 
95
   
-
 
96
    __asm__ volatile ("rdpr %%tba, %0\n" : "=r" (v));
-
 
97
   
-
 
98
    return v;
-
 
99
}
-
 
100
 
-
 
101
/** Write Trap Base Address register.
-
 
102
 *
-
 
103
 * @param New value of TBA.
-
 
104
 */
-
 
105
static inline void tba_write(__u64 v)
-
 
106
{
-
 
107
    __asm__ volatile ("wrpr %0, %1, %%tba\n" : : "r" (v), "i" (0));
-
 
108
}
-
 
109
 
-
 
110
 
88
void cpu_halt(void);
111
void cpu_halt(void);
89
void cpu_sleep(void);
112
void cpu_sleep(void);
90
void asm_delay_loop(__u32 t);
113
void asm_delay_loop(__u32 t);
91
 
114
 
92
#endif
115
#endif