Rev 2238 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2238 | Rev 2243 | ||
---|---|---|---|
Line 45... | Line 45... | ||
45 | int flags; |
45 | int flags; |
46 | 46 | ||
47 | page_mapping_operations = &pt_mapping_operations; |
47 | page_mapping_operations = &pt_mapping_operations; |
48 | 48 | ||
49 | flags = PAGE_CACHEABLE; |
49 | flags = PAGE_CACHEABLE; |
50 | const unsigned maxmem = ALIGN_DOWN(config.memory_size, FRAME_SIZE); |
- | |
51 | 50 | ||
- | 51 | /* PA2KA(identity) mapping for all frames until last_frame */ |
|
52 | for (cur = 0; cur < maxmem; cur += FRAME_SIZE) { |
52 | for (cur = 0; cur < last_frame; cur += FRAME_SIZE) { |
53 | //page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, flags); |
53 | page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, flags); |
54 | } |
54 | } |
- | 55 | ||
- | 56 | //SET_PTL0_ADDRESS_ARCH(AS_KERNEL->genarch.page_table); |
|
- | 57 | ||
- | 58 | // note for Alf: kernel part of page table is copied in generic/mm/as_pt.c/ptl0_create |
|
- | 59 | ||
55 | //TODO set page fault routines |
60 | // TODO: register fault routine |
56 | // no problem no ... kernel doesn't do page faults |
- | |
57 | } |
61 | } |
58 | 62 | ||
59 | /** Map device into kernel space. */ |
63 | /** Map device into kernel space. */ |
60 | uintptr_t hw_map(uintptr_t physaddr, size_t size) |
64 | uintptr_t hw_map(uintptr_t physaddr, size_t size) |
61 | { |
65 | { |