Subversion Repositories HelenOS-historic

Rev

Rev 1769 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1769 Rev 1780
Line 50... Line 50...
50
 *
50
 *
51
 * Return the base address of the current stack.
51
 * Return the base address of the current stack.
52
 * The stack is assumed to be STACK_SIZE bytes long.
52
 * The stack is assumed to be STACK_SIZE bytes long.
53
 * The stack must start on page boundary.
53
 * The stack must start on page boundary.
54
 */
54
 */
55
static inline __address get_stack_base(void)
55
static inline uintptr_t get_stack_base(void)
56
{
56
{
57
    __address v;
57
    uintptr_t v;
58
   
58
   
59
    __asm__ volatile ("and %0, $29, %1\n" : "=r" (v) : "r" (~(STACK_SIZE-1)));
59
    __asm__ volatile ("and %0, $29, %1\n" : "=r" (v) : "r" (~(STACK_SIZE-1)));
60
   
60
   
61
    return v;
61
    return v;
62
}
62
}
63
 
63
 
64
extern void cpu_halt(void);
64
extern void cpu_halt(void);
65
extern void asm_delay_loop(__u32 t);
65
extern void asm_delay_loop(uint32_t t);
66
extern void userspace_asm(__address ustack, __address uspace_uarg,
66
extern void userspace_asm(uintptr_t ustack, uintptr_t uspace_uarg,
67
              __address entry);
67
              uintptr_t entry);
68
 
68
 
69
#endif
69
#endif
70
 
70
 
71
/** @}
71
/** @}
72
 */
72
 */