Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 179 → Rev 180

/SPARTAN/trunk/arch/ia64/include/asm.h
32,10 → 32,19
#include <arch/types.h>
#include <config.h>
 
/* TODO: implement the real stuff */
/** Return base address of current stack
*
* Return the base address of the current stack.
* The stack is assumed to be STACK_SIZE long.
* The stack must start on page boundary.
*/
static inline __address get_stack_base(void)
{
return NULL;
__u64 v;
 
__asm__ volatile ("and %0 = %1, r12" : "=r" (v) : "r" (~(STACK_SIZE-1)));
return v;
}
 
#endif
/SPARTAN/trunk/arch/ia64/include/context.h
31,11 → 31,15
 
#include <arch/types.h>
 
#define STACK_ITEM_SIZE 16
 
/*
* context_save() and context_restore() are both leaf procedures.
* No need to allocate scratch area.
*
* One item is put onto the stack to support get_stack_base().
*/
#define SP_DELTA 0
#define SP_DELTA (0+STACK_ITEM_SIZE)
 
#ifdef context_set
#undef context_set
/SPARTAN/trunk/arch/mips/include/asm.h
38,6 → 38,7
*
* Return the base address of the current stack.
* The stack is assumed to be STACK_SIZE bytes long.
* The stack must start on page boundary.
*/
static inline __address get_stack_base(void)
{
/SPARTAN/trunk/arch/mips/include/context.h
31,9 → 31,14
 
#include <arch/types.h>
 
#define SP_DELTA 0
#define STACK_ITEM_SIZE 4
 
/*
* Put one item onto the stack to support get_stack_base().
*/
#define SP_DELTA (0+STACK_ITEM_SIZE)
 
 
struct context {
__u32 r0;
__u32 r1;
/SPARTAN/trunk/arch/ia32/include/asm.h
161,6 → 161,7
*
* Return the base address of the current stack.
* The stack is assumed to be STACK_SIZE bytes long.
* The stack must start on page boundary.
*/
static inline __address get_stack_base(void)
{
/SPARTAN/trunk/arch/ia32/include/context.h
31,11 → 31,15
 
#include <arch/types.h>
 
#define STACK_ITEM_SIZE 4
 
/*
* Both context_save() and context_restore() eat two doublewords from the stack.
* First for pop of the saved register, second during ret instruction.
*
* One item is put onto stack to support get_stack_base().
*/
#define SP_DELTA 8
#define SP_DELTA (8+STACK_ITEM_SIZE)
 
struct context {
__u32 sp;
/SPARTAN/trunk/arch/ia32/include/cpu.h
29,8 → 29,6
#ifndef __ia32_CPU_H__
#define __ia32_CPU_H__
 
#include <config.h>
#include <proc/thread.h>
#include <typedefs.h>
#include <arch/pm.h>
#include <arch/asm.h>