diff options
Diffstat (limited to 'asm/asm_x86.h')
| -rw-r--r-- | asm/asm_x86.h | 3 |
1 files changed, 3 insertions, 0 deletions
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);} |
