Rev 1770 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1770 | Rev 1780 | ||
---|---|---|---|
Line 42... | Line 42... | ||
42 | void page_arch_init(void) |
42 | void page_arch_init(void) |
43 | { |
43 | { |
44 | page_mapping_operations = &ht_mapping_operations; |
44 | page_mapping_operations = &ht_mapping_operations; |
45 | } |
45 | } |
46 | 46 | ||
47 | __address hw_map(__address physaddr, size_t size) |
47 | uintptr_t hw_map(uintptr_t physaddr, size_t size) |
48 | { |
48 | { |
49 | unsigned int order; |
49 | unsigned int order; |
50 | int i; |
50 | int i; |
51 | 51 | ||
52 | struct { |
52 | struct { |
Line 71... | Line 71... | ||
71 | if (size <= FRAME_SIZE) |
71 | if (size <= FRAME_SIZE) |
72 | order = 0; |
72 | order = 0; |
73 | else |
73 | else |
74 | order = (fnzb32(size - 1) + 1) - FRAME_WIDTH; |
74 | order = (fnzb32(size - 1) + 1) - FRAME_WIDTH; |
75 | 75 | ||
76 | __address virtaddr = (__address) frame_alloc(order, FRAME_KA); |
76 | uintptr_t virtaddr = (uintptr_t) frame_alloc(order, FRAME_KA); |
77 | 77 | ||
78 | for (i = 0; i < sizemap[order].count; i++) |
78 | for (i = 0; i < sizemap[order].count; i++) |
79 | dtlb_insert_mapping(virtaddr + i*sizemap[order].increment, |
79 | dtlb_insert_mapping(virtaddr + i*sizemap[order].increment, |
80 | physaddr + i*sizemap[order].increment, |
80 | physaddr + i*sizemap[order].increment, |
81 | sizemap[order].pagesize, true, false); |
81 | sizemap[order].pagesize, true, false); |