1
2
3
4
5
6
7
8
9 #ifndef _ASM_SN_LAUNCH_H
10 #define _ASM_SN_LAUNCH_H
11
12 #include <asm/sn/types.h>
13 #include <asm/sn/addrs.h>
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 #define LAUNCH_MAGIC 0xaddbead2addbead3
31 #ifdef CONFIG_SGI_IP27
32 #define LAUNCH_SIZEOF 0x100
33 #define LAUNCH_PADSZ 0xa0
34 #endif
35
36 #define LAUNCH_OFF_MAGIC 0x00
37 #define LAUNCH_OFF_BUSY 0x08
38 #define LAUNCH_OFF_CALL 0x10
39 #define LAUNCH_OFF_CALLC 0x18
40 #define LAUNCH_OFF_CALLPARM 0x20
41 #define LAUNCH_OFF_STACK 0x28
42 #define LAUNCH_OFF_GP 0x30
43 #define LAUNCH_OFF_BEVUTLB 0x38
44 #define LAUNCH_OFF_BEVNORMAL 0x40
45 #define LAUNCH_OFF_BEVECC 0x48
46
47 #define LAUNCH_STATE_DONE 0
48 #define LAUNCH_STATE_SENT 1
49 #define LAUNCH_STATE_RECD 2
50
51
52
53
54
55
56
57
58
59
60
61
62 #ifndef __ASSEMBLY__
63
64 typedef int launch_state_t;
65 typedef void (*launch_proc_t)(u64 call_parm);
66
67 typedef struct launch_s {
68 volatile u64 magic;
69 volatile u64 busy;
70 volatile launch_proc_t call_addr;
71 volatile u64 call_addr_c;
72 volatile u64 call_parm;
73 volatile void *stack_addr;
74 volatile void *gp_addr;
75 volatile char *bevutlb;
76 volatile char *bevnormal;
77 volatile char *bevecc;
78 volatile char pad[160];
79 } launch_t;
80
81
82
83
84
85 #define LAUNCH_SLAVE (*(void (*)(int nasid, int cpu, \
86 launch_proc_t call_addr, \
87 u64 call_parm, \
88 void *stack_addr, \
89 void *gp_addr)) \
90 IP27PROM_LAUNCHSLAVE)
91
92 #define LAUNCH_WAIT (*(void (*)(int nasid, int cpu, int timeout_msec)) \
93 IP27PROM_WAITSLAVE)
94
95 #define LAUNCH_POLL (*(launch_state_t (*)(int nasid, int cpu)) \
96 IP27PROM_POLLSLAVE)
97
98 #define LAUNCH_LOOP (*(void (*)(void)) \
99 IP27PROM_SLAVELOOP)
100
101 #define LAUNCH_FLASH (*(void (*)(void)) \
102 IP27PROM_FLASHLEDS)
103
104 #endif
105
106 #endif