diff --git a/include/arch/x86/asm-macros.h b/include/arch/x86/asm-macros.h index 6b946d57..acdb7edd 100644 --- a/include/arch/x86/asm-macros.h +++ b/include/arch/x86/asm-macros.h @@ -152,6 +152,13 @@ #endif .endm +.macro SET_CR3 val + push %_ASM_AX + mov (\val), %_ASM_AX + mov %_ASM_AX, %cr3 + pop %_ASM_AX +.endm + #define GLOBAL(name) \ .global name; \ name: