Rev 3593 | Rev 3993 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3593 | Rev 3664 | ||
---|---|---|---|
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/FIREPLANE_CONFIG register. |
- | |
411 | * |
- | |
412 | * @return |
- | |
413 | * Value of the UPA_CONFIG register in US, |
- | |
414 | * value of the FIREPLANE_CONFIG on US3. |
- | |
415 | */ |
- | |
416 | static inline uint64_t icbus_config_read(void) |
- | |
417 | { |
- | |
418 | return asi_u64_read(ASI_ICBUS_CONFIG, 0); |
- | |
419 | } |
- | |
420 | - | ||
421 | extern void cpu_halt(void); |
432 | extern void cpu_halt(void); |
422 | extern void cpu_sleep(void); |
433 | extern void cpu_sleep(void); |
423 | extern void asm_delay_loop(const uint32_t usec); |
434 | extern void asm_delay_loop(const uint32_t usec); |
424 | 435 | ||
425 | extern uint64_t read_from_ag_g7(void); |
436 | extern uint64_t read_from_ag_g7(void); |