Rev 747 | Rev 1078 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 747 | Rev 919 | ||
---|---|---|---|
Line 46... | Line 46... | ||
46 | __asm__ volatile ("and %0 = %1, r12" : "=r" (v) : "r" (~(STACK_SIZE-1))); |
46 | __asm__ volatile ("and %0 = %1, r12" : "=r" (v) : "r" (~(STACK_SIZE-1))); |
47 | 47 | ||
48 | return v; |
48 | return v; |
49 | } |
49 | } |
50 | 50 | ||
- | 51 | /** Return Processor State Register. |
|
- | 52 | * |
|
- | 53 | * @return PSR. |
|
- | 54 | */ |
|
- | 55 | static inline __u64 psr_read(void) |
|
- | 56 | { |
|
- | 57 | __u64 v; |
|
- | 58 | ||
- | 59 | __asm__ volatile ("mov %0 = psr\n" : "=r" (v)); |
|
- | 60 | ||
- | 61 | return v; |
|
- | 62 | } |
|
- | 63 | ||
51 | /** Read IVA (Interruption Vector Address). |
64 | /** Read IVA (Interruption Vector Address). |
52 | * |
65 | * |
53 | * @return Return location of interruption vector table. |
66 | * @return Return location of interruption vector table. |
54 | */ |
67 | */ |
55 | static inline __u64 iva_read(void) |
68 | static inline __u64 iva_read(void) |
Line 230... | Line 243... | ||
230 | * |
243 | * |
231 | * @return PSR. |
244 | * @return PSR. |
232 | */ |
245 | */ |
233 | static inline ipl_t interrupts_read(void) |
246 | static inline ipl_t interrupts_read(void) |
234 | { |
247 | { |
235 | __u64 v; |
- | |
236 | - | ||
237 | __asm__ volatile ("mov %0 = psr\n" : "=r" (v)); |
- | |
238 | - | ||
239 | return (ipl_t) v; |
248 | return (ipl_t) psr_read(); |
240 | } |
249 | } |
241 | 250 | ||
242 | /** Disable protection key checking. */ |
251 | /** Disable protection key checking. */ |
243 | static inline void pk_disable(void) |
252 | static inline void pk_disable(void) |
244 | { |
253 | { |
Line 247... | Line 256... | ||
247 | 256 | ||
248 | extern void cpu_halt(void); |
257 | extern void cpu_halt(void); |
249 | extern void cpu_sleep(void); |
258 | extern void cpu_sleep(void); |
250 | extern void asm_delay_loop(__u32 t); |
259 | extern void asm_delay_loop(__u32 t); |
251 | 260 | ||
- | 261 | extern void switch_to_userspace(__address entry, __address sp, __address bsp, __u64 ipsr, __u64 rsc); |
|
- | 262 | ||
252 | #endif |
263 | #endif |