Minor corrections

This commit is contained in:
Adrien Bourmault 2020-01-08 00:28:10 +01:00
parent 74d0508b67
commit 737bea025f
3 changed files with 11 additions and 5 deletions

View File

@ -136,6 +136,11 @@ static inline ulong KeReadStsc(void) {
return ((ulong)edx << 32) + eax;
}
static inline void KeFlushTlbSingle(unsigned long addr)
{
asm volatile("invlpg (%0)" ::"r" (addr) : "memory");
}
//------------------------------------------//
// Misc. I/O //
//------------------------------------------//

View File

@ -41,7 +41,7 @@
#define BADRAM_ZONE 5 // Invalid zone because material problem...
#define MAX_ENTRIES 2048 // Max number of memory map entries
#define KPAGESIZE (4 * KB)
#define UPAGESIZE (2 * MB)
#define UPAGESIZE (4 * KB)
//----------------------------------------------------------------------------//

View File

@ -58,10 +58,11 @@ isrPreHandler:
push rax
; Check if we are switching from user mode to supervisor mode
;mov rax, [rsp + 152]
;and rax, 0x3000
;jz .SEnter
;swapgs ; XXX need TSS
mov rax, [rsp + 152]
and rax, 0x3000
jz .SEnter
swapgs ; XXX need TSS
.SEnter:
; Increment mask count as we configure all interrupts to mask IF