/branches/arm/kernel/arch/arm32/include/asm.h |
---|
36,10 → 36,12 |
#define KERN_arm32_ASM_H_ |
#include <arch/types.h> |
#include <arch/stack.h> |
#include <config.h> |
static inline void cpu_sleep(void) |
{ |
/* TODO */ |
// not implemented on gxemul |
} |
/** Return base address of current stack |
50,8 → 52,9 |
*/ |
static inline uintptr_t get_stack_base(void) |
{ |
/* TODO */ |
return NULL; |
uintptr_t v; |
asm volatile ("and %0, sp, %1\n" : "=r" (v) : "r" (~(STACK_SIZE-1))); |
return v; |
} |
extern void cpu_halt(void); |
/branches/arm/kernel/arch/arm32/include/context.h |
---|
35,11 → 35,14 |
#ifndef KERN_arm32_CONTEXT_H_ |
#define KERN_arm32_CONTEXT_H_ |
#include <align.h> |
#include <arch/stack.h> |
/* |
* Put one item onto the stack to support get_stack_base() and align it up. |
*/ |
#define SP_DELTA 0 /*TODO*/ |
#define SP_DELTA (0 + ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT)) |
#ifndef __ASM__ |