POK(kernelpart)
/home/jaouen/pok_official/pok/trunk/kernel/arch/sparc/context_offset.h
Go to the documentation of this file.
00001 /*
00002  *                               POK header
00003  * 
00004  * The following file is a part of the POK project. Any modification should
00005  * made according to the POK licence. You CANNOT use this file or a part of
00006  * this file is this part of a file for your own project
00007  *
00008  * For more information on the POK licence, please see our LICENCE FILE
00009  *
00010  * Please follow the coding guidelines described in doc/CODING_GUIDELINES
00011  *
00012  *                                      Copyright (c) 2007-2009 POK team 
00013  *
00014  * Created by julien on Thu Jan 15 23:34:13 2009 
00015  */
00016 
00023 #ifndef __POK_SPARC_CONTEXT_OFFSET_H__
00024 #define __POK_SPARC_CONTEXT_OFFSET_H__
00025 
00026 /*
00027  * registers saved "over" the stack
00028  * st %xx, [%sp + OFFSET]
00029 */
00030 # define L0_OFFSET  0x00
00031 # define L1_OFFSET  0x04
00032 # define L2_OFFSET  0x08
00033 # define L3_OFFSET  0x0c
00034 # define L4_OFFSET  0x10
00035 # define L5_OFFSET  0x14
00036 # define L6_OFFSET  0x18
00037 # define L7_OFFSET  0x1c
00038 # define I0_OFFSET  0x20
00039 # define I1_OFFSET  0x24
00040 # define I2_OFFSET  0x28
00041 # define I3_OFFSET  0x2c
00042 # define I4_OFFSET  0x30
00043 # define I5_OFFSET  0x34
00044 # define I6_OFFSET  0x38
00045 # define I7_OFFSET  0x3c
00046 
00047 /*
00048  * others registers are saved "under" the stack
00049  * st %xx, [%sp - OFFSET]
00050 */
00051 # define G7_OFFSET    0x04
00052 # define G6_OFFSET    0x08
00053 # define G5_OFFSET    0x0c
00054 # define G4_OFFSET    0x10
00055 # define G3_OFFSET    0x14
00056 # define G2_OFFSET    0x18
00057 # define G1_OFFSET    0x1c
00058 
00059 /*
00060  * next offsets start at -0x40 beacause there's "Inputs" registers from -0x20 to -0x3c
00061 */
00062 # define WIM_OFFSET         0x40
00063 # define PSR_OFFSET         0x44
00064 # define Y_OFFSET           0x48
00065 # define PC_OFFSET          0x4c
00066 # define NPC_OFFSET         0x50
00067 # define RESTORE_CNT_OFFSET 0x54
00068 
00069 #endif /* !__POK_PPC_CONTEXT_OFFSET_H__ */