Subversion Repositories HelenOS

Rev

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

Rev 2411 Rev 2464
Line 44... Line 44...
44
/** No such instruction on ARM to sleep CPU. */
44
/** No such instruction on ARM to sleep CPU. */
45
static inline void cpu_sleep(void)
45
static inline void cpu_sleep(void)
46
{
46
{
47
}
47
}
48
 
48
 
49
 
-
 
50
/** Return base address of current stack.
49
/** Return base address of current stack.
51
 *
50
 *
52
 * Return the base address of the current stack.
51
 * Return the base address of the current stack.
53
 * The stack is assumed to be STACK_SIZE bytes long.
52
 * The stack is assumed to be STACK_SIZE bytes long.
54
 * The stack must start on page boundary.
53
 * The stack must start on page boundary.
Line 57... Line 56...
57
{
56
{
58
    uintptr_t v;
57
    uintptr_t v;
59
    asm volatile (
58
    asm volatile (
60
        "and %0, sp, %1\n"
59
        "and %0, sp, %1\n"
61
        : "=r" (v)
60
        : "=r" (v)
62
        : "r" (~(STACK_SIZE-1))
61
        : "r" (~(STACK_SIZE - 1))
63
    );
62
    );
64
    return v;
63
    return v;
65
}
64
}
66
 
65
 
67
 
-
 
68
extern void cpu_halt(void);
66
extern void cpu_halt(void);
69
extern void asm_delay_loop(uint32_t t);
67
extern void asm_delay_loop(uint32_t t);
70
extern void userspace_asm(uintptr_t ustack, uintptr_t uspace_uarg, uintptr_t entry);
68
extern void userspace_asm(uintptr_t ustack, uintptr_t uspace_uarg,
71
 
-
 
-
 
69
    uintptr_t entry);
72
 
70
 
73
#endif
71
#endif
74
 
72
 
75
/** @}
73
/** @}
76
 */
74
 */