Rev 1044 | Rev 1229 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 1044 | Rev 1221 | ||
|---|---|---|---|
| Line 61... | Line 61... | ||
| 61 | */ |
61 | */ |
| 62 | void map_structure(__address s, size_t size) |
62 | void map_structure(__address s, size_t size) |
| 63 | { |
63 | { |
| 64 | int i, cnt, length; |
64 | int i, cnt, length; |
| 65 | 65 | ||
| 66 | length = size + (s - (s & ~(PAGE_SIZE-1))); |
66 | length = size + (s - (s & ~(PAGE_SIZE - 1))); |
| 67 | cnt = length/PAGE_SIZE + (length%PAGE_SIZE>0); |
67 | cnt = length / PAGE_SIZE + (length % PAGE_SIZE > 0); |
| 68 | 68 | ||
| 69 | for (i = 0; i < cnt; i++) |
69 | for (i = 0; i < cnt; i++) |
| 70 | page_mapping_insert(AS_KERNEL, s + i*PAGE_SIZE, s + i*PAGE_SIZE, PAGE_NOT_CACHEABLE); |
70 | page_mapping_insert(AS_KERNEL, s + i * PAGE_SIZE, s + i * PAGE_SIZE, PAGE_NOT_CACHEABLE); |
| 71 | 71 | ||
| 72 | } |
72 | } |
| 73 | 73 | ||
| 74 | /** Insert mapping of page to frame. |
74 | /** Insert mapping of page to frame. |
| 75 | * |
75 | * |