From 7f7b3d61baf46fe358d3f1bd1cb584e0daed3a81 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Mon, 25 Oct 2021 19:40:53 +0300 Subject: Some minor changes to virtual memory handling + Should start to think about how virtual memory should be handled efficiently, I'm sort of flailing around and not actually doing anything beneficial. The mapping system I've so far implemented _works_, but it's not good and I'm not happy with it. I might come back and fix/improve it, but I think I'll go ahead and do other things for a while, might give me a better overhead view of what the virtual memory system should do. + TODO: should probably document the memory layout I'm going with at the moment. --- include/apos/vmem.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/apos/vmem.h') diff --git a/include/apos/vmem.h b/include/apos/vmem.h index d2dcedc..e72f783 100644 --- a/include/apos/vmem.h +++ b/include/apos/vmem.h @@ -28,4 +28,12 @@ vm_t map_vregion(struct vm_branch_t *branch, pm_t base, vm_t start, size_t size, uint8_t flags); void unmap_vregion(struct vm_branch_t *branch, vm_t start); +void init_vmem(struct vm_branch_t *branch, vm_t tmp_pte); + +#if defined(KERNEL) +void arch_init_vmem(struct vm_branch_t *branch, vm_t tmp_pte); +#else +struct vm_branch_t *arch_get_tmp_pte(struct vm_branch_t *branch); +#endif + #endif /* APOS_VMEM_H */ -- cgit v1.3