Rev 2243 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2243 | Rev 2256 | ||
---|---|---|---|
Line 33... | Line 33... | ||
33 | */ |
33 | */ |
34 | 34 | ||
35 | #include <arch/mm/page.h> |
35 | #include <arch/mm/page.h> |
36 | #include <genarch/mm/page_pt.h> |
36 | #include <genarch/mm/page_pt.h> |
37 | #include <mm/page.h> |
37 | #include <mm/page.h> |
- | 38 | #include <mm/tlb.h> |
|
38 | #include <align.h> |
39 | #include <align.h> |
39 | #include <config.h> |
40 | #include <config.h> |
40 | #include "../aux_print/printf.h" |
41 | #include "../aux_print/printf.h" |
41 | 42 | ||
42 | void page_arch_init(void) |
43 | void page_arch_init(void) |
Line 50... | Line 51... | ||
50 | 51 | ||
51 | /* PA2KA(identity) mapping for all frames until last_frame */ |
52 | /* PA2KA(identity) mapping for all frames until last_frame */ |
52 | for (cur = 0; cur < last_frame; cur += FRAME_SIZE) { |
53 | for (cur = 0; cur < last_frame; cur += FRAME_SIZE) { |
53 | page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, flags); |
54 | page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, flags); |
54 | } |
55 | } |
55 | - | ||
56 | //SET_PTL0_ADDRESS_ARCH(AS_KERNEL->genarch.page_table); |
- | |
57 | 56 | ||
- | 57 | // TODO: move to the kernel space |
|
- | 58 | page_mapping_insert(AS_KERNEL, 0x00000000, 0x00000000, flags); |
|
- | 59 | page_mapping_insert(AS_KERNEL, 0x10000000, 0x10000000, flags); |
|
- | 60 | page_mapping_insert(AS_KERNEL, 0x15000000, 0x15000000, flags); |
|
58 | // note for Alf: kernel part of page table is copied in generic/mm/as_pt.c/ptl0_create |
61 | page_mapping_insert(AS_KERNEL, 0x16000000, 0x16000000, flags); |
- | 62 | ||
- | 63 | tlb_invalidate_all(); |
|
- | 64 | SET_PTL0_ADDRESS_ARCH(AS_KERNEL->genarch.page_table); |
|
59 | 65 | ||
- | 66 | // note for Alf: kernel part of page table is copied in generic/mm/as_pt.c/ptl0_create |
|
60 | // TODO: register fault routine |
67 | // TODO: register fault routine |
61 | } |
68 | } |
62 | 69 | ||
63 | /** Map device into kernel space. */ |
70 | /** Map device into kernel space. */ |
64 | uintptr_t hw_map(uintptr_t physaddr, size_t size) |
71 | uintptr_t hw_map(uintptr_t physaddr, size_t size) |