Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2464 → Rev 2465

/trunk/kernel/arch/arm32/include/asm.h
1,5 → 1,5
/*
* Copyright (c) 2003-2004 Jakub Jermar
* Copyright (c) 2007 Michal Kebrt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
29,7 → 29,8
/** @addtogroup arm32
* @{
*/
/** @file
/** @file
* @brief Declarations of functions implemented in assembly.
*/
 
#ifndef KERN_arm32_ASM_H_
36,13 → 37,16
#define KERN_arm32_ASM_H_
 
#include <arch/types.h>
#include <arch/stack.h>
#include <config.h>
#include <arch/interrupt.h>
 
/** No such instruction on ARM to sleep CPU. */
static inline void cpu_sleep(void)
{
/* TODO */
}
 
/** Return base address of current stack
/** Return base address of current stack.
*
* Return the base address of the current stack.
* The stack is assumed to be STACK_SIZE bytes long.
50,8 → 54,13
*/
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);
59,11 → 68,6
extern void userspace_asm(uintptr_t ustack, uintptr_t uspace_uarg,
uintptr_t entry);
 
extern ipl_t interrupts_disable(void);
extern ipl_t interrupts_enable(void);
extern void interrupts_restore(ipl_t ipl);
extern ipl_t interrupts_read(void);
 
#endif
 
/** @}