Rev 664 | Rev 667 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 664 | Rev 666 | ||
---|---|---|---|
Line 35... | Line 35... | ||
35 | * from the trap_table_save. |
35 | * from the trap_table_save. |
36 | * |
36 | * |
37 | * This arrangement is beneficial because kernel handlers stay on their |
37 | * This arrangement is beneficial because kernel handlers stay on their |
38 | * link-time addresses which is good for debugging. |
38 | * link-time addresses which is good for debugging. |
39 | */ |
39 | */ |
40 | 40 | ||
- | 41 | .register %g2, #scratch |
|
- | 42 | .register %g3, #scratch |
|
- | 43 | .register %g6, #scratch |
|
- | 44 | .register %g7, #scratch |
|
- | 45 | ||
41 | .text |
46 | .text |
42 | 47 | ||
43 | #include <arch/trap/trap_table.h> |
48 | #include <arch/trap/trap_table.h> |
44 | #include <arch/trap/regwin.h> |
49 | #include <arch/trap/regwin.h> |
45 | #include <arch/trap/interrupt.h> |
50 | #include <arch/trap/interrupt.h> |
Line 200... | Line 205... | ||
200 | */ |
205 | */ |
201 | .align TABLE_SIZE |
206 | .align TABLE_SIZE |
202 | .global trap_table_save |
207 | .global trap_table_save |
203 | trap_table_save: |
208 | trap_table_save: |
204 | .space TABLE_SIZE, 0 |
209 | .space TABLE_SIZE, 0 |
- | 210 | ||
- | 211 | ||
- | 212 | /* Trap handler that explicitly saves global registers. |
|
- | 213 | * |
|
- | 214 | * Input registers: |
|
- | 215 | * %l0 Address of function to call. |
|
- | 216 | * Output registers: |
|
- | 217 | * %l1 - %l7 Copy of %g1 - %g7 |
|
- | 218 | */ |
|
- | 219 | .global saving_handler |
|
- | 220 | saving_handler: |
|
- | 221 | SAVE_GLOBALS |
|
- | 222 | call %l0 |
|
- | 223 | nop |
|
- | 224 | RESTORE_GLOBALS |
|
- | 225 | restore /* matches the save instruction from the top-level handler */ |
|
- | 226 | retry |