Rev 139 | Rev 177 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 139 | Rev 173 | ||
---|---|---|---|
Line 32... | Line 32... | ||
32 | #include <arch/types.h> |
32 | #include <arch/types.h> |
33 | #include <typedefs.h> |
33 | #include <typedefs.h> |
34 | #include <mm/page.h> |
34 | #include <mm/page.h> |
35 | #include <synch/spinlock.h> |
35 | #include <synch/spinlock.h> |
36 | #include <arch/boot/memmap.h> |
36 | #include <arch/boot/memmap.h> |
- | 37 | #include <config.h> |
|
37 | 38 | ||
38 | extern __u32 interrupt_handler_size; |
39 | extern __u32 interrupt_handler_size; |
39 | 40 | ||
40 | extern void paging_on(void); |
41 | extern void paging_on(void); |
41 | 42 | ||
Line 154... | Line 155... | ||
154 | : "=r" (v) |
155 | : "=r" (v) |
155 | ); |
156 | ); |
156 | return v; |
157 | return v; |
157 | } |
158 | } |
158 | 159 | ||
- | 160 | /** Return base address of current stack |
|
- | 161 | * |
|
- | 162 | * Return the base address of the current stack. |
|
- | 163 | * The stack is assumed to be STACK_SIZE bytes long. |
|
- | 164 | */ |
|
- | 165 | static inline __address get_stack_base(void) |
|
- | 166 | { |
|
- | 167 | __address v; |
|
- | 168 | ||
- | 169 | __asm__ volatile ("andl %%esp, %0\n" : "=r" (v) : "0" (~(STACK_SIZE-1))); |
|
- | 170 | ||
- | 171 | return v; |
|
- | 172 | } |
|
- | 173 | ||
159 | #endif |
174 | #endif |