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 34... | Line 34... | ||
34 | 34 | ||
35 | #include <arch/mm/as.h> |
35 | #include <arch/mm/as.h> |
36 | #include <arch/mm/asid.h> |
36 | #include <arch/mm/asid.h> |
37 | #include <arch/mm/page.h> |
37 | #include <arch/mm/page.h> |
38 | #include <genarch/mm/as_ht.h> |
38 | #include <genarch/mm/as_ht.h> |
- | 39 | #include <genarch/mm/page_ht.h> |
|
39 | #include <genarch/mm/asid_fifo.h> |
40 | #include <genarch/mm/asid_fifo.h> |
40 | #include <mm/asid.h> |
41 | #include <mm/asid.h> |
41 | #include <arch.h> |
- | |
42 | #include <arch/barrier.h> |
42 | #include <arch/barrier.h> |
43 | #include <synch/spinlock.h> |
- | |
44 | 43 | ||
45 | /** Architecture dependent address space init. */ |
44 | /** Architecture dependent address space init. */ |
46 | void as_arch_init(void) |
45 | void as_arch_init(void) |
47 | { |
46 | { |
48 | as_operations = &as_ht_operations; |
47 | as_operations = &as_ht_operations; |
Line 53... | Line 52... | ||
53 | * |
52 | * |
54 | * @param as Address space. |
53 | * @param as Address space. |
55 | */ |
54 | */ |
56 | void as_install_arch(as_t *as) |
55 | void as_install_arch(as_t *as) |
57 | { |
56 | { |
58 | ipl_t ipl; |
- | |
59 | region_register rr; |
57 | region_register rr; |
60 | int i; |
58 | int i; |
61 | 59 | ||
62 | ipl = interrupts_disable(); |
- | |
63 | spinlock_lock(&as->lock); |
- | |
64 | - | ||
65 | ASSERT(as->asid != ASID_INVALID); |
60 | ASSERT(as->asid != ASID_INVALID); |
66 | 61 | ||
67 | /* |
62 | /* |
68 | * Load respective ASID (7 consecutive RIDs) to |
63 | * Load respective ASID (7 consecutive RIDs) to |
69 | * region registers. |
64 | * region registers. |
Line 78... | Line 73... | ||
78 | rr.map.ps = PAGE_WIDTH; |
73 | rr.map.ps = PAGE_WIDTH; |
79 | rr_write(i, rr.word); |
74 | rr_write(i, rr.word); |
80 | } |
75 | } |
81 | srlz_d(); |
76 | srlz_d(); |
82 | srlz_i(); |
77 | srlz_i(); |
83 | - | ||
84 | spinlock_unlock(&as->lock); |
- | |
85 | interrupts_restore(ipl); |
- | |
86 | } |
78 | } |
87 | 79 | ||
88 | /** @} |
80 | /** @} |
89 | */ |
81 | */ |