Rev 1858 | Rev 1861 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1858 | Rev 1860 | ||
---|---|---|---|
Line 38... | Line 38... | ||
38 | #include <arch/trap/trap_table.h> |
38 | #include <arch/trap/trap_table.h> |
39 | #include <arch/trap/regwin.h> |
39 | #include <arch/trap/regwin.h> |
40 | #include <arch/trap/interrupt.h> |
40 | #include <arch/trap/interrupt.h> |
41 | #include <arch/trap/exception.h> |
41 | #include <arch/trap/exception.h> |
42 | #include <arch/trap/mmu.h> |
42 | #include <arch/trap/mmu.h> |
- | 43 | #include <arch/mm/mmu.h> |
|
43 | #include <arch/mm/page.h> |
44 | #include <arch/mm/page.h> |
44 | #include <arch/stack.h> |
45 | #include <arch/stack.h> |
45 | #include <arch/regdef.h> |
46 | #include <arch/regdef.h> |
46 | 47 | ||
47 | #define TABLE_SIZE TRAP_TABLE_SIZE |
48 | #define TABLE_SIZE TRAP_TABLE_SIZE |
Line 346... | Line 347... | ||
346 | * Set CLEANWIN to NWINDOW-1 so that clean_window traps do not occur. |
347 | * Set CLEANWIN to NWINDOW-1 so that clean_window traps do not occur. |
347 | */ |
348 | */ |
348 | rdpr %cansave, %l0 |
349 | rdpr %cansave, %l0 |
349 | wrpr %l0, %otherwin |
350 | wrpr %l0, %otherwin |
350 | wrpr %g0, %cansave |
351 | wrpr %g0, %cansave |
351 | wrpr %g0, NWINDOW-1, %cleanwin |
352 | wrpr %g0, NWINDOW - 1, %cleanwin |
352 | 353 | ||
353 | /* |
354 | /* |
354 | * Switch to primary context 0. |
355 | * Switch to primary context 0. |
355 | */ |
356 | */ |
356 | mov VA_PRIMARY_CONTEXT_REG, %l0 |
357 | mov VA_PRIMARY_CONTEXT_REG, %l0 |
357 | stxa %g0, [%l0] ASI_DMMU |
358 | stxa %g0, [%l0] ASI_DMMU |
358 | set kernel_image_start, %l0 |
359 | rd %pc, %l0 |
359 | flush %l0 |
360 | flush %l0 |
360 | 361 | ||
361 | ba 1f |
362 | ba 1f |
362 | nop |
363 | nop |
363 | 364 | ||
364 | 0: |
365 | 0: |
Line 495... | Line 496... | ||
495 | /* |
496 | /* |
496 | * Spills and fills will be processed by the {spill,fill}_1_normal |
497 | * Spills and fills will be processed by the {spill,fill}_1_normal |
497 | * handlers. |
498 | * handlers. |
498 | */ |
499 | */ |
499 | wrpr %g0, WSTATE_OTHER(0) | WSTATE_NORMAL(1), %wstate |
500 | wrpr %g0, WSTATE_OTHER(0) | WSTATE_NORMAL(1), %wstate |
- | 501 | ||
- | 502 | /* |
|
- | 503 | * Set primary context according to secondary context. |
|
- | 504 | */ |
|
- | 505 | wr %g0, ASI_DMMU, %asi |
|
- | 506 | ldxa [VA_SECONDARY_CONTEXT_REG] %asi, %g1 |
|
- | 507 | stxa %g1, [VA_PRIMARY_CONTEXT_REG] %asi |
|
- | 508 | flush %o7 |
|
500 | 509 | ||
501 | rdpr %cwp, %g1 |
510 | rdpr %cwp, %g1 |
502 | rdpr %otherwin, %g2 |
511 | rdpr %otherwin, %g2 |
503 | 512 | ||
504 | /* |
513 | /* |