1 #ifndef__SPARC_HEAD_H 2 #define__SPARC_HEAD_H 3
4 #define KERNSIZE 134217728 /* this is how much of a mapping the prom promises */ 5 #define PAGESIZE 4096 /* luckily this is the same on sun4c's and sun4m's */ 6 #define PAGESHIFT 12
7 #define PROM_BASE -1568768 /* casa 'de PROM */ 8 #define LOAD_ADDR 0x4000 /* prom jumps to us here */ 9 #define C_STACK 96
10 #define SUN4C_SEGSZ (1 << 18)
11 #define USRSTACK 0x0 /* no joke, this is temporary, trust me */ 12 #define INT_ENABLE_REG_PHYSADR 0xf5000000
13 #define INTS_ENAB 0x01
14
15 #define WRITE_PAUSE nop; nop; nop;
16
17 #definePAGE_SIZE 4096
18
19 /* Here are some trap goodies */ 20
21
22 /* Generic trap entry. */ 23
24 #define TRAP_ENTRY(type, label) \
25 mov (type), %l3; blabel; mov %psr, %l0; nop;
26
27 /* This is for hard interrupts from level 1-14, 15 is non-maskable (nmi) and 28 * gets handled with another macro. 29 */ 30
31 #define TRAP_ENTRY_INTERRUPT(int_level) \
32 movint_level, %l4; btrap_entry; mov %psr, %l0; nop;
33
34 /* Here is the macro for soft interrupts (ie. not as urgent as hard ones) 35 which need to jump to a different handler. 36 */ 37
38 #define TRAP_ENTRY_INTERRUPT_SOFT(int_level, ident) \
39 movint_level, %l4; mov %psr, %l0; btrap_entry; movident, %l3;
40
41 /* Non-maskable interrupt entry macro. You have to turn off all interrupts 42 to not receive this. This is usually due to a asynchronous memory error. 43 All we can really do is stop the show. :-( 44 */ 45 #define TRAP_ENTRY_INTERRUPT_NMI(t_type, jmp_to) \
46 movt_type, %l3; bjmp_to; mov %psr, %l0; nop;
47
48 /* Trap entry code in entry.S needs the offsets into task_struct 49 * to get at the thread_struct goodies during window craziness. 50 * 51 * NOTE: We need to keep these values under 0x3ff in order to do 52 * efficient load/stores in the window fill/spill handlers. 53 * See TRAP_WIN_CLEAN in entry.S for details. 54 */ 55
56 #define THREAD_UWINDOWS 0x3a8
57 #define THREAD_WIM 0x3ac
58 #define THREAD_W_SAVED 0x3b0
59 #define THREAD_KSP 0x3b4
60 #define THREAD_USP 0x3b8
61 #define THREAD_REG_WINDOW 0x3c0
62
63 #endif__SPARC_HEAD_H