diff options
Diffstat (limited to 'arch/i386/include/kernel/asm.h')
-rw-r--r-- | arch/i386/include/kernel/asm.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/arch/i386/include/kernel/asm.h b/arch/i386/include/kernel/asm.h index a002a44..d692917 100644 --- a/arch/i386/include/kernel/asm.h +++ b/arch/i386/include/kernel/asm.h @@ -4,13 +4,6 @@ #include <kernel/gdt.h> #include <stdint.h> -extern uintptr_t _kernel_start; -extern uintptr_t _kernel_end; -#define KSTART ((uintptr_t)&_kernel_start) -#define KEND ((uintptr_t)&_kernel_end - 0xC0000000) - -#define PAGE_SIZE 4096 - #define PCI_CONFIG_ADDR 0xCF8 #define PCI_CONFIG_DATA 0xCFC @@ -108,7 +101,6 @@ void aquire_lock(int *lock); void release_lock(int *lock); void enable_paging(uint32_t new_cr3); - void flush_gdt(void); static inline void outb(uint16_t port, uint8_t value) { @@ -153,6 +145,10 @@ static inline void flush_tss(void) { __asm__ volatile("movw $0x28, %ax; ltr %ax"); } +static inline void flush_tlb(void) { + __asm__ volatile("movl %cr3, %eax; movl %eax, %cr3"); +} + static inline void invlpg(void *addr) { __asm__ volatile("invlpg (%0)" : : "b"(addr) : "memory"); } |