ppc64: Don't set Kp bit on SLB
[openbios.git] / arch / sparc64 / context.h
blob2756fa15f875707057e425cb427efdee8902abf3
1 #ifndef SPARC64_CONTEXT_H
2 #define SPARC64_CONTEXT_H
4 #define STACK_BIAS 2047
6 struct context {
7 /* General registers */
8 uint64_t regs[32];
9 uint64_t pc;
10 uint64_t npc;
11 #define REG_O0 8
12 #define REG_SP 14
13 #define SP_LOC(ctx) (&(ctx)->regs[REG_SP])
14 /* Flags */
15 /* Optional stack contents */
16 uint64_t return_addr;
17 uint64_t param[0];
20 /* Create a new context in the given stack */
21 struct context *
22 init_context(uint8_t *stack, uint64_t stack_size, int num_param);
24 /* Switch context */
25 struct context *switch_to(struct context *);
27 /* Holds physical address of boot context */
28 extern unsigned long __boot_ctx;
30 /* This can always be safely used to refer to the boot context */
31 #define boot_ctx ((struct context *) phys_to_virt(__boot_ctx))
33 #endif /* SPARC64_CONTEXT_H */