Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Paging::createKernelDirectory() {
- kernelDirectory = allocator.getPage();
- for (int i = 0; i < 1024; i++) {
- kernelDirectory[i] = (0 | 2);
- }
- }
- void Paging::identityMapKernelMemory() {
- unsigned int physicalAddress = 0x0;
- unsigned int* table = allocator.getPage();
- for (int i = 0; i < 1024; i++) {
- table[i] = physicalAddress;
- table[i] |= (2 | 1);
- physicalAddress += 0x1000;
- }
- kernelDirectory[0] = (unsigned int) table;
- kernelDirectory[0] |= (2 | 1);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement