POK(kernelpart)
context_offset.h
Go to the documentation of this file.
1 /*
2  * POK header
3  *
4  * The following file is a part of the POK project. Any modification should
5  * made according to the POK licence. You CANNOT use this file or a part of
6  * this file is this part of a file for your own project
7  *
8  * For more information on the POK licence, please see our LICENCE FILE
9  *
10  * Please follow the coding guidelines described in doc/CODING_GUIDELINES
11  *
12  * Copyright (c) 2007-2009 POK team
13  *
14  * Created by julien on Thu Jan 15 23:34:13 2009
15  */
16 
23 #ifndef __POK_SPARC_CONTEXT_OFFSET_H__
24 #define __POK_SPARC_CONTEXT_OFFSET_H__
25 
26 /*
27  * registers saved "over" the stack
28  * st %xx, [%sp + OFFSET]
29 */
30 # define L0_OFFSET 0x00
31 # define L1_OFFSET 0x04
32 # define L2_OFFSET 0x08
33 # define L3_OFFSET 0x0c
34 # define L4_OFFSET 0x10
35 # define L5_OFFSET 0x14
36 # define L6_OFFSET 0x18
37 # define L7_OFFSET 0x1c
38 # define I0_OFFSET 0x20
39 # define I1_OFFSET 0x24
40 # define I2_OFFSET 0x28
41 # define I3_OFFSET 0x2c
42 # define I4_OFFSET 0x30
43 # define I5_OFFSET 0x34
44 # define I6_OFFSET 0x38
45 # define I7_OFFSET 0x3c
46 
47 /*
48  * others registers are saved "under" the stack
49  * st %xx, [%sp - OFFSET]
50 */
51 # define G7_OFFSET 0x04
52 # define G6_OFFSET 0x08
53 # define G5_OFFSET 0x0c
54 # define G4_OFFSET 0x10
55 # define G3_OFFSET 0x14
56 # define G2_OFFSET 0x18
57 # define G1_OFFSET 0x1c
58 
59 /*
60  * next offsets start at -0x40 beacause there's "Inputs" registers from -0x20 to -0x3c
61 */
62 # define WIM_OFFSET 0x40
63 # define PSR_OFFSET 0x44
64 # define Y_OFFSET 0x48
65 # define PC_OFFSET 0x4c
66 # define NPC_OFFSET 0x50
67 # define RESTORE_CNT_OFFSET 0x54
68 
69 #endif /* !__POK_PPC_CONTEXT_OFFSET_H__ */