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 BOOT_MSG_LEN 61
16 #define BOOT_MSG2_LEN 50
17
18
19 #define WRITE_PAUSE nop; nop; nop;
20
21 #definePAGE_SIZE 4096
22
23 /* Here are some trap goodies */ 24
25
26 /* Generic trap entry. */ 27
28 #define TRAP_ENTRY(type, label) \
29 mov (type), %l3; blabel; rd %psr, %l0; nop;
30
31 /* This is for hard interrupts from level 1-14, 15 is non-maskable (nmi) and 32 * gets handled with another macro. 33 */ 34
35 #define TRAP_ENTRY_INTERRUPT(int_level) \
36 movint_level, %l3; bstray_irq_entry; rd %psr, %l0; nop;
37
38 /* Here is the macro for soft interrupts (ie. not as urgent as hard ones) 39 * which need to jump to a different handler. 40 */ 41
42 #define TRAP_ENTRY_INTERRUPT_SOFT(int_level, ident) \
43 movint_level, %l3; rd %psr, %l0; bstray_irq_entry; movident, %l4;
44
45 /* The above two macros are for generic traps. The following is made 46 * especially for timer interrupts at IRQ level 14. 47 */ 48
49 #define TRAP_ENTRY_TIMER \
50 mov 10, %l3; rd %psr, %l0; b sparc_timer; nop;
51
52 /* Non-maskable interrupt entry macro. You have to turn off all interrupts 53 * to not receive this. This is usually due to a asynchronous memory error. 54 * All we can really do is stop the show. :-( 55 */ 56
57 #define TRAP_ENTRY_INTERRUPT_NMI(t_type, jmp_to) \
58 movt_type, %l3; bjmp_to; rd %psr, %l0; nop;
59
60 /* Trap entry code in entry.S needs the offsets into task_struct 61 * to get at the thread_struct goodies during window craziness. 62 * 63 * NOTE: We need to keep these values under 0x3ff in order to do 64 * efficient load/stores in the window fill/spill handlers. 65 * See TRAP_WIN_CLEAN in entry.S for details. 66 */ 67
68 #define THREAD_UWINDOWS 0x3bc
69 #define THREAD_WIM 0x3c0
70 #define THREAD_W_SAVED 0x3c4
71 #define THREAD_KSP 0x3c8
72 #define THREAD_USP 0x3cc
73 #define THREAD_REG_WINDOW 0x3d4
74
75 #endif__SPARC_HEAD_H