This commit is contained in:
Adrien Bourmault 2019-11-16 22:41:46 +01:00
parent c92cb89399
commit 5d7374de80
3 changed files with 18 additions and 17 deletions

View File

@ -174,6 +174,21 @@ void *MmGetStackGuards(char rank);
// //
void *MmTranslateKPageToAddr(void *rank); void *MmTranslateKPageToAddr(void *rank);
// Page directory pointer offset
typedef ulong pdpe_t;
// Page directory offset
typedef ulong pde_t;
// Page table entry
typedef ulong pte_t;
// paging.asm
void MmLoadPML4(void *);
void MmEnableWriteProtect(void);
void MmDisableWriteProtect(void);
void *MmGetStackGuards(char rank);
//----------------------------------------------------------------------------// //----------------------------------------------------------------------------//
#endif #endif

View File

@ -1,7 +1,7 @@
//----------------------------------------------------------------------------// //----------------------------------------------------------------------------//
// GNU GPL OS/K // // GNU GPL OS/K //
// // // //
// Desc: RTC Time related functions // // Desc: PIT Time related functions //
// // // //
// // // //
// Copyright © 2018-2019 The OS/K Team // // Copyright © 2018-2019 The OS/K Team //

View File

@ -6,22 +6,6 @@
#include <lib/buf.h> #include <lib/buf.h>
#include <io/vga.h> #include <io/vga.h>
// Page directory pointer offset
typedef ulong pdpe_t;
// Page directory offset
typedef ulong pde_t;
// Page table entry
typedef ulong pte_t;
// paging.asm
void MmLoadPML4(void *);
void MmEnableWriteProtect(void);
void MmDisableWriteProtect(void);
void *MmGetStackGuards(char rank);
enum enum
{ {
MF_PRESENT = 1 << 0, MF_PRESENT = 1 << 0,
@ -199,6 +183,7 @@ static void PagingHandler(ISRFrame_t *regs)
StackGuardOne StackGuardOne
); );
} else { } else {
//XXX page fault
bprintf(BStdOut, "\n\n%CPANIC\n[ISR 0x%x] Irrecoverable Kernel Page Fault at %p\n\n" bprintf(BStdOut, "\n\n%CPANIC\n[ISR 0x%x] Irrecoverable Kernel Page Fault at %p\n\n"
" Error code : 0x%x (%b)", " Error code : 0x%x (%b)",
@ -220,4 +205,5 @@ static void PagingHandler(ISRFrame_t *regs)
void MmActivatePageHandler(void) void MmActivatePageHandler(void)
{ {
KeRegisterISR(PagingHandler, 0xe); KeRegisterISR(PagingHandler, 0xe);
DebugLog("\tPaging activated\n");
} }