Rev 2071 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 2071 | Rev 2170 | ||
|---|---|---|---|
| Line 32... | Line 32... | ||
| 32 | /** @file |
32 | /** @file |
| 33 | */ |
33 | */ |
| 34 | 34 | ||
| 35 | #include <arch/mm/as.h> |
35 | #include <arch/mm/as.h> |
| 36 | #include <genarch/mm/as_pt.h> |
36 | #include <genarch/mm/as_pt.h> |
| - | 37 | #include <genarch/mm/page_pt.h> |
|
| 37 | #include <genarch/mm/asid_fifo.h> |
38 | #include <genarch/mm/asid_fifo.h> |
| 38 | #include <arch/mm/tlb.h> |
39 | #include <arch/mm/tlb.h> |
| 39 | #include <mm/tlb.h> |
40 | #include <mm/tlb.h> |
| 40 | #include <mm/as.h> |
41 | #include <mm/as.h> |
| 41 | #include <arch/cp0.h> |
42 | #include <arch/cp0.h> |
| 42 | #include <arch.h> |
- | |
| 43 | 43 | ||
| 44 | /** Architecture dependent address space init. */ |
44 | /** Architecture dependent address space init. */ |
| 45 | void as_arch_init(void) |
45 | void as_arch_init(void) |
| 46 | { |
46 | { |
| 47 | as_operations = &as_pt_operations; |
47 | as_operations = &as_pt_operations; |
| Line 55... | Line 55... | ||
| 55 | * @param as Address space structure. |
55 | * @param as Address space structure. |
| 56 | */ |
56 | */ |
| 57 | void as_install_arch(as_t *as) |
57 | void as_install_arch(as_t *as) |
| 58 | { |
58 | { |
| 59 | entry_hi_t hi; |
59 | entry_hi_t hi; |
| 60 | ipl_t ipl; |
- | |
| 61 | 60 | ||
| 62 | /* |
61 | /* |
| 63 | * Install ASID. |
62 | * Install ASID. |
| 64 | */ |
63 | */ |
| 65 | hi.value = cp0_entry_hi_read(); |
64 | hi.value = cp0_entry_hi_read(); |
| 66 | 65 | ||
| 67 | ipl = interrupts_disable(); |
- | |
| 68 | spinlock_lock(&as->lock); |
- | |
| 69 | hi.asid = as->asid; |
66 | hi.asid = as->asid; |
| 70 | cp0_entry_hi_write(hi.value); |
67 | cp0_entry_hi_write(hi.value); |
| 71 | spinlock_unlock(&as->lock); |
- | |
| 72 | interrupts_restore(ipl); |
- | |
| 73 | } |
68 | } |
| 74 | 69 | ||
| 75 | /** @} |
70 | /** @} |
| 76 | */ |
71 | */ |