From a3ee159ebfd2d088432e386e8809840784f697e7 Mon Sep 17 00:00:00 2001 From: Miguel Date: Wed, 12 Sep 2018 02:10:11 +0200 Subject: working on smp scheduler --- asm/asm_x86.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'asm/asm_x86.h') diff --git a/asm/asm_x86.h b/asm/asm_x86.h index 529a6c2..ec9ebd0 100644 --- a/asm/asm_x86.h +++ b/asm/asm_x86.h @@ -91,6 +91,9 @@ void x86_set_cr(uint8_t num, uint32_t value); /** Set the address of the page directory. This is required **before** enabling paging */ static inline void x86_set_page_directory(uint32_t pdir_addr) {x86_set_cr(3,pdir_addr);} +/** Get the address of the page directory. */ +static inline uint32_t x86_get_page_directory() {return x86_get_cr(3);} + /** Enable paging */ static inline void x86_paging_enable() {x86_set_cr(0,x86_get_cr(0)| 0x80000000);} -- cgit v1.2.3