Identity Paging: Difference between revisions

m
Bot: Replace deprecated source tag with syntaxhighlight
[unchecked revision][unchecked revision]
(Syntax highlight)
m (Bot: Replace deprecated source tag with syntaxhighlight)
 
(3 intermediate revisions by 3 users not shown)
Line 8:
 
You can easily do this with a loop filling the page table:
<sourcesyntaxhighlight lang="c">
void idpaging(dworduint32_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.
}
}
</syntaxhighlight>
</source>
 
==See Also==
===Articles===
* [[Memory Management]]
* [[Paging]]
 
[[Category:Memory management]]