Subversion Repositories HelenOS

Rev

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

Rev 534 Rev 569
Line 105... Line 105...
105
static inline void tba_write(__u64 v)
105
static inline void tba_write(__u64 v)
106
{
106
{
107
    __asm__ volatile ("wrpr %0, %1, %%tba\n" : : "r" (v), "i" (0));
107
    __asm__ volatile ("wrpr %0, %1, %%tba\n" : : "r" (v), "i" (0));
108
}
108
}
109
 
109
 
-
 
110
/** Load __u64 from alternate space.
-
 
111
 *
-
 
112
 * @param asi ASI determining the alternate space.
-
 
113
 * @param va Virtual address within the ASI.
-
 
114
 *
-
 
115
 * @return Value read from the virtual address in the specified address space.
-
 
116
 */
-
 
117
static inline __u64 asi_u64_read(asi_t asi, __address va)
-
 
118
{
-
 
119
    __u64 v;
-
 
120
   
-
 
121
    __asm__ volatile ("ldxa [%1] %2, %0\n" : "=r" (v) : "r" (va), "i" (asi));
-
 
122
   
-
 
123
    return v;
-
 
124
}
-
 
125
 
-
 
126
/** Store __u64 to alternate space.
-
 
127
 *
-
 
128
 * @param asi ASI determining the alternate space.
-
 
129
 * @param va Virtual address within the ASI.
-
 
130
 * @param v Value to be written.
-
 
131
 */
-
 
132
static inline void asi_u64_write(asi_t asi, __address va, __u64 v)
-
 
133
{
-
 
134
    __asm__ volatile ("stxa %0, [%1] %2\n" : :  "r" (v), "r" (va), "i" (asi));
-
 
135
}
-
 
136
 
110
 
137
 
111
void cpu_halt(void);
138
void cpu_halt(void);
112
void cpu_sleep(void);
139
void cpu_sleep(void);
113
void asm_delay_loop(__u32 t);
140
void asm_delay_loop(__u32 t);
114
 
141