diff options
author | Alex Auvolat <alex.auvolat@ens.fr> | 2015-02-13 17:23:29 +0100 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ens.fr> | 2015-02-13 17:23:29 +0100 |
commit | f67c0b7e20ef0816a2d9047fd20346e3ede98b75 (patch) | |
tree | 7e547ff85cf10777b882fe925800dad4e65e6414 /src/kernel/include/paging.h | |
parent | 1ca5c37cee8a9d9c3058746da78240d8dc289a02 (diff) | |
download | kogata-f67c0b7e20ef0816a2d9047fd20346e3ede98b75.tar.gz kogata-f67c0b7e20ef0816a2d9047fd20346e3ede98b75.zip |
Prepare for user memory management and usermode code
Diffstat (limited to 'src/kernel/include/paging.h')
-rw-r--r-- | src/kernel/include/paging.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/kernel/include/paging.h b/src/kernel/include/paging.h index d42ec52..56fa7fa 100644 --- a/src/kernel/include/paging.h +++ b/src/kernel/include/paging.h @@ -3,10 +3,16 @@ #include <sys.h> #include <stdbool.h> +// Bits in the error code for page fault +#define PF_PRESENT_BIT (1<<0) +#define PF_WRITE_BIT (1<<1) +#define PF_USER_BIT (1<<2) +#define PF_RSVD_WRITE_BIT (1<<3) +#define PF_OPFETCH_BIT (1<<4) + struct page_directory; typedef struct page_directory pagedir_t; - void paging_setup(void* kernel_data_end); pagedir_t *get_current_pagedir(); |