Rev 3588 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3588 | Rev 3674 | ||
---|---|---|---|
Line 134... | Line 134... | ||
134 | static inline void tick_compare_write(uint64_t v) |
134 | static inline void tick_compare_write(uint64_t v) |
135 | { |
135 | { |
136 | asm volatile ("wr %0, %1, %%tick_cmpr\n" : : "r" (v), "i" (0)); |
136 | asm volatile ("wr %0, %1, %%tick_cmpr\n" : : "r" (v), "i" (0)); |
137 | } |
137 | } |
138 | 138 | ||
- | 139 | /** Read STICK_compare Register. |
|
- | 140 | * |
|
- | 141 | * @return Value of STICK_compare register. |
|
- | 142 | */ |
|
- | 143 | static inline uint64_t stick_compare_read(void) |
|
- | 144 | { |
|
- | 145 | uint64_t v; |
|
- | 146 | ||
- | 147 | asm volatile ("rd %%asr25, %0\n" : "=r" (v)); |
|
- | 148 | ||
- | 149 | return v; |
|
- | 150 | } |
|
- | 151 | ||
- | 152 | /** Write STICK_compare Register. |
|
- | 153 | * |
|
- | 154 | * @param v New value of STICK_comapre register. |
|
- | 155 | */ |
|
- | 156 | static inline void stick_compare_write(uint64_t v) |
|
- | 157 | { |
|
- | 158 | asm volatile ("wr %0, %1, %%asr25\n" : : "r" (v), "i" (0)); |
|
- | 159 | } |
|
- | 160 | ||
139 | /** Read TICK Register. |
161 | /** Read TICK Register. |
140 | * |
162 | * |
141 | * @return Value of TICK register. |
163 | * @return Value of TICK register. |
142 | */ |
164 | */ |
143 | static inline uint64_t tick_read(void) |
165 | static inline uint64_t tick_read(void) |
Line 405... | Line 427... | ||
405 | static inline void nucleus_leave(void) |
427 | static inline void nucleus_leave(void) |
406 | { |
428 | { |
407 | asm volatile ("wrpr %g0, %g0, %tl\n"); |
429 | asm volatile ("wrpr %g0, %g0, %tl\n"); |
408 | } |
430 | } |
409 | 431 | ||
410 | /** Read UPA_CONFIG register. |
- | |
411 | * |
- | |
412 | * @return Value of the UPA_CONFIG register. |
- | |
413 | */ |
- | |
414 | static inline uint64_t upa_config_read(void) |
- | |
415 | { |
- | |
416 | return asi_u64_read(ASI_UPA_CONFIG, 0); |
- | |
417 | } |
- | |
418 | - | ||
419 | extern void cpu_halt(void); |
432 | extern void cpu_halt(void); |
420 | extern void cpu_sleep(void); |
433 | extern void cpu_sleep(void); |
421 | extern void asm_delay_loop(const uint32_t usec); |
434 | extern void asm_delay_loop(const uint32_t usec); |
422 | 435 | ||
423 | extern uint64_t read_from_ag_g7(void); |
436 | extern uint64_t read_from_ag_g7(void); |