diff options
author | Alex AUVOLAT <alexis211@gmail.com> | 2012-05-17 17:56:23 +0200 |
---|---|---|
committer | Alex AUVOLAT <alexis211@gmail.com> | 2012-05-17 17:56:23 +0200 |
commit | 593bf4df3d8db49286c1a7ae4ef75c887b629930 (patch) | |
tree | 988a104c9611d72e1252282789688586efd9a394 /src/kernel/mem/paging.cpp | |
parent | 7c9a48b4e6d66cf4f62e7bad9e22ab06923e47ef (diff) | |
download | TCE-593bf4df3d8db49286c1a7ae4ef75c887b629930.tar.gz TCE-593bf4df3d8db49286c1a7ae4ef75c887b629930.zip |
Devices using the VFS structure. Basic keyboard handler.
Diffstat (limited to 'src/kernel/mem/paging.cpp')
-rw-r--r-- | src/kernel/mem/paging.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/kernel/mem/paging.cpp b/src/kernel/mem/paging.cpp index 206cc08..01a1780 100644 --- a/src/kernel/mem/paging.cpp +++ b/src/kernel/mem/paging.cpp @@ -1,11 +1,11 @@ #include "paging.h" #include <bitset.h> #include <stdlib_common.h> -#include <core/monitor.h> #include "mem.h" #include "seg.h" #include <core/sys.h> #include <task/task.h> +#include <ui/vt.h> static bitset frames; @@ -57,10 +57,7 @@ void paging_init(size_t totalRam) { kernel_pagedir->tables[i] = kernel_pagedir->tables[i + FIRST_KERNEL_PAGETABLE]; } - monitor_write("{PD: "); - monitor_writeHex(kernel_pagedir->physicalAddr); pagedir_switch(kernel_pagedir); - monitor_write("} [Paging] "); } /* De-allocates pages at 0x00000000 where kernel code was read from with the GDT from loader_.asm. */ @@ -70,7 +67,6 @@ void paging_cleanup() { kernel_pagedir->tablesPhysical[i] = 0; kernel_pagedir->tables[i] = 0; } - monitor_write("[PD Cleanup] "); } /************************* PAGING EVERYDAY USE *****************************/ @@ -140,14 +136,14 @@ uint32_t paging_fault(registers *regs) { } if (seg == 0) { - NL; WHERE; monitor_write("Unhandled Page Fault\t"); - monitor_write("cr2:"); monitor_writeHex(addr); + NL; WHERE; ke_vt->writeStr("Unhandled Page Fault\t"); + ke_vt->writeStr("cr2:"); ke_vt->writeHex(addr); NL; TAB; - if (regs->err_code & 0x1) monitor_write("present"); TAB; - if (regs->err_code & 0x2) monitor_write("write"); TAB; - if (regs->err_code & 0x4) monitor_write("user"); TAB; - if (regs->err_code & 0x8) monitor_write("rsvd"); TAB; - if (regs->err_code & 0x10) monitor_write("opfetch"); + if (regs->err_code & 0x1) ke_vt->writeStr("present"); TAB; + if (regs->err_code & 0x2) ke_vt->writeStr("write"); TAB; + if (regs->err_code & 0x4) ke_vt->writeStr("user"); TAB; + if (regs->err_code & 0x8) ke_vt->writeStr("rsvd"); TAB; + if (regs->err_code & 0x10) ke_vt->writeStr("opfetch"); return 1; } return 0; |