Rev 1787 | Rev 1888 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1787 | Rev 1860 | ||
---|---|---|---|
Line 31... | Line 31... | ||
31 | */ |
31 | */ |
32 | /** @file |
32 | /** @file |
33 | */ |
33 | */ |
34 | 34 | ||
35 | #include <arch/mm/as.h> |
35 | #include <arch/mm/as.h> |
- | 36 | #include <arch/mm/tlb.h> |
|
36 | #include <genarch/mm/as_ht.h> |
37 | #include <genarch/mm/as_ht.h> |
37 | #include <genarch/mm/asid_fifo.h> |
38 | #include <genarch/mm/asid_fifo.h> |
38 | 39 | ||
39 | /** Architecture dependent address space init. */ |
40 | /** Architecture dependent address space init. */ |
40 | void as_arch_init(void) |
41 | void as_arch_init(void) |
41 | { |
42 | { |
42 | as_operations = &as_ht_operations; |
43 | as_operations = &as_ht_operations; |
43 | asid_fifo_init(); |
44 | asid_fifo_init(); |
44 | } |
45 | } |
45 | 46 | ||
- | 47 | void as_install_arch(as_t *as) |
|
- | 48 | { |
|
- | 49 | tlb_context_reg_t ctx; |
|
- | 50 | ||
- | 51 | /* |
|
- | 52 | * Write ASID to secondary context register. |
|
- | 53 | * The primary context register has to be set |
|
- | 54 | * from TL>0 so it will be filled from the |
|
- | 55 | * secondary context register from the TL=1 |
|
- | 56 | * code just before switch to userspace. |
|
- | 57 | */ |
|
- | 58 | ctx.v = 0; |
|
- | 59 | ctx.context = as->asid; |
|
- | 60 | mmu_secondary_context_write(ctx.v); |
|
- | 61 | } |
|
- | 62 | ||
46 | /** @} |
63 | /** @} |
47 | */ |
64 | */ |
48 | 65 |