summaryrefslogtreecommitdiff
path: root/kc/core/memory.h
diff options
context:
space:
mode:
authorAda Christine <adachristine18@gmail.com>2023-02-19 23:31:10 +0000
committerAda Christine <adachristine18@gmail.com>2023-02-19 23:31:10 +0000
commit838f39324a1f305562addce6d807400522d9c469 (patch)
tree71304643765fd39bc4e4ba3cb74968735b806f23 /kc/core/memory.h
parent2f5e6b2d18b2c0fa09ea8ece0bc13e2f040b4d80 (diff)
preparations for user mode
Diffstat (limited to 'kc/core/memory.h')
-rw-r--r--kc/core/memory.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/kc/core/memory.h b/kc/core/memory.h
index 1303a99..6f70e57 100644
--- a/kc/core/memory.h
+++ b/kc/core/memory.h
@@ -19,10 +19,13 @@ enum page_map_flags
CONTENT_RWDATA = 0x3,
CONTENT_MASK = 0x3,
- SIZE_4K = 0x4,
- SIZE_2M = 0x8,
- SIZE_1G = 0xc,
- SIZE_MASK = 0xc,
+ PRIV_USER = 0x4,
+ PRIV_MASK = 0x4,
+
+ SIZE_4K = 0x8,
+ SIZE_2M = 0x10,
+ SIZE_1G = 0x18,
+ SIZE_MASK = 0x18,
};
enum page_alloc_flags
@@ -60,6 +63,7 @@ int page_inc_ref(kc_phys_addr page);
int page_dec_ref(kc_phys_addr page);
void *page_map(phys_addr_t paddr, enum page_map_flags flags);
+void *page_set_flags(void *vaddr, enum page_map_flags flags);
void page_unmap(void *vaddr);
phys_addr_t page_alloc(enum page_alloc_flags flags);