Rev 1852 | Rev 1860 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1852 | Rev 1859 | ||
---|---|---|---|
Line 32... | Line 32... | ||
32 | /** |
32 | /** |
33 | * @file |
33 | * @file |
34 | * @brief This file contains fast MMU trap handlers. |
34 | * @brief This file contains fast MMU trap handlers. |
35 | */ |
35 | */ |
36 | 36 | ||
37 | #ifndef __sparc64_MMU_TRAP_H__ |
37 | #ifndef KERN_sparc64_MMU_TRAP_H_ |
38 | #define __sparc64_MMU_TRAP_H__ |
38 | #define KERN_sparc64_MMU_TRAP_H_ |
39 | 39 | ||
40 | #include <arch/stack.h> |
40 | #include <arch/stack.h> |
41 | #include <arch/regdef.h> |
41 | #include <arch/regdef.h> |
42 | #include <arch/mm/tlb.h> |
42 | #include <arch/mm/tlb.h> |
43 | #include <arch/mm/mmu.h> |
43 | #include <arch/mm/mmu.h> |
Line 49... | Line 49... | ||
49 | 49 | ||
50 | #define FAST_MMU_HANDLER_SIZE 128 |
50 | #define FAST_MMU_HANDLER_SIZE 128 |
51 | 51 | ||
52 | #ifdef __ASM__ |
52 | #ifdef __ASM__ |
53 | .macro FAST_INSTRUCTION_ACCESS_MMU_MISS_HANDLER |
53 | .macro FAST_INSTRUCTION_ACCESS_MMU_MISS_HANDLER |
54 | save %sp, -STACK_WINDOW_SAVE_AREA_SIZE, %sp |
- | |
- | 54 | /* |
|
55 | call fast_instruction_access_mmu_miss |
55 | * First, try to refill TLB from TSB. |
56 | nop |
56 | */ |
57 | restore |
57 | ! TODO |
58 | retry |
58 | |
- | 59 | wrpr %g0, PSTATE_PRIV_BIT | PSTATE_AG_BIT, %pstate |
|
- | 60 | PREEMPTIBLE_HANDLER fast_instruction_access_mmu_miss |
|
59 | .endm |
61 | .endm |
60 | 62 | ||
61 | .macro FAST_DATA_ACCESS_MMU_MISS_HANDLER |
63 | .macro FAST_DATA_ACCESS_MMU_MISS_HANDLER |
62 | /* |
64 | /* |
63 | * First, try to refill TLB from TSB. |
65 | * First, try to refill TLB from TSB. |
Line 99... | Line 101... | ||
99 | wrpr %g0, PSTATE_PRIV_BIT | PSTATE_AG_BIT, %pstate |
101 | wrpr %g0, PSTATE_PRIV_BIT | PSTATE_AG_BIT, %pstate |
100 | PREEMPTIBLE_HANDLER fast_data_access_mmu_miss |
102 | PREEMPTIBLE_HANDLER fast_data_access_mmu_miss |
101 | .endm |
103 | .endm |
102 | 104 | ||
103 | .macro FAST_DATA_ACCESS_PROTECTION_HANDLER |
105 | .macro FAST_DATA_ACCESS_PROTECTION_HANDLER |
104 | save %sp, -STACK_WINDOW_SAVE_AREA_SIZE, %sp |
106 | wrpr %g0, PSTATE_PRIV_BIT | PSTATE_AG_BIT, %pstate |
105 | call fast_data_access_protection |
107 | PREEMPTIBLE_HANDLER fast_data_access_protection |
106 | nop |
- | |
107 | restore |
- | |
108 | retry |
- | |
109 | .endm |
108 | .endm |
110 | #endif /* __ASM__ */ |
109 | #endif /* __ASM__ */ |
111 | 110 | ||
112 | #endif |
111 | #endif |
113 | 112 |