Anonymous user
Identity Paging: Difference between revisions
m
→Example: Added spacing between operators to improve readability.
[unchecked revision] | [unchecked revision] |
m (s/dword/uint32_t/g) |
m (→Example: Added spacing between operators to improve readability.) |
||
Line 9:
You can easily do this with a loop filling the page table:
<source lang="c">
void idpaging(uint32_t *first_pte, vaddr from, int size) {
from = from & 0xfffff000; // discard bits we don't want
for(; size>0; from += 4096, size -= 4096, first_pte++){
*first_pte = from | 1; // mark page present.
}
}
|