diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/apos/debug.h | 2 | ||||
| -rw-r--r-- | include/apos/dmem.h | 4 | ||||
| -rw-r--r-- | include/apos/mem_regions.h | 4 | ||||
| -rw-r--r-- | include/apos/proc.h | 2 | ||||
| -rw-r--r-- | include/apos/tcb.h | 2 | ||||
| -rw-r--r-- | include/apos/vmem.h | 6 | ||||
| -rw-r--r-- | include/arch/vmem.h | 23 |
7 files changed, 21 insertions, 22 deletions
diff --git a/include/apos/debug.h b/include/apos/debug.h index 25ea132..8df7342 100644 --- a/include/apos/debug.h +++ b/include/apos/debug.h @@ -136,7 +136,7 @@ void __fmt(1, 2) dbg(const char *fmt, ...); void init_dbg(const void *fdt); void setup_dmap_dbg(); -void setup_io_dbg(struct vm_branch *b); +void setup_io_dbg(struct vmem *b); void setup_dbg(pm_t pt, enum serial_dev dev); struct dbg_info dbg_from_fdt(const void *fdt); diff --git a/include/apos/dmem.h b/include/apos/dmem.h index 3ee93b6..59083cb 100644 --- a/include/apos/dmem.h +++ b/include/apos/dmem.h @@ -13,9 +13,9 @@ stat_t init_devmem(pm_t ram_base, pm_t ram_top); vm_t alloc_devmem(struct tcb *t, pm_t dev_start, size_t bytes, vmflags_t flags); stat_t free_devmem(struct tcb *t, vm_t dev_start); -stat_t dev_free_wrapper(struct vm_branch *b, pm_t *offset, vm_t vaddr, +stat_t dev_free_wrapper(struct vmem *b, pm_t *offset, vm_t vaddr, vmflags_t flags, enum mm_order t, void *); -stat_t dev_alloc_wrapper(struct vm_branch *b, pm_t *offset, vm_t vaddr, +stat_t dev_alloc_wrapper(struct vmem *b, pm_t *offset, vm_t vaddr, vmflags_t flags, enum mm_order t, void *); #endif /* APOS_DEV_H */ diff --git a/include/apos/mem_regions.h b/include/apos/mem_regions.h index 9f09eff..2d777a9 100644 --- a/include/apos/mem_regions.h +++ b/include/apos/mem_regions.h @@ -44,11 +44,11 @@ struct mem_region *find_closest_used_region(struct mem_region_root *r, struct mem_region *find_free_region(struct mem_region_root *r, size_t size, size_t *align); -typedef stat_t region_callback_t(struct vm_branch *b, pm_t *offset, vm_t vaddr, +typedef stat_t region_callback_t(struct vmem *b, pm_t *offset, vm_t vaddr, vmflags_t flags, enum mm_order order, void *data); -vm_t map_fill_region(struct vm_branch *b, region_callback_t *mem_handler, +vm_t map_fill_region(struct vmem *b, region_callback_t *mem_handler, pm_t offset, vm_t start, size_t bytes, vmflags_t flags, void *data); diff --git a/include/apos/proc.h b/include/apos/proc.h index e1ea7b6..238e0f6 100644 --- a/include/apos/proc.h +++ b/include/apos/proc.h @@ -5,6 +5,6 @@ #include <apos/vmem.h> stat_t jump_to_userspace(struct tcb *t, int argc, char **argv); -stat_t init_proc(void *fdt, struct vm_branch *b); +stat_t init_proc(void *fdt, struct vmem *b); #endif /* APOS_PROC_H */ diff --git a/include/apos/tcb.h b/include/apos/tcb.h index f31bf77..439a3c9 100644 --- a/include/apos/tcb.h +++ b/include/apos/tcb.h @@ -37,7 +37,7 @@ struct tcb { vm_t entry; /* vm root branch */ - struct vm_branch *b_r; + struct vmem *b_r; /* linked list of threads in this process */ struct tcb *next; diff --git a/include/apos/vmem.h b/include/apos/vmem.h index 036780f..d55e249 100644 --- a/include/apos/vmem.h +++ b/include/apos/vmem.h @@ -16,11 +16,11 @@ stat_t free_uvmem(struct tcb *r, vm_t a); stat_t init_uvmem(struct tcb *r, vm_t base, vm_t top); stat_t destroy_uvmem(struct tcb *r); -stat_t alloc_uvmem_wrapper(struct vm_branch *b, pm_t *offset, vm_t vaddr, +stat_t alloc_uvmem_wrapper(struct vmem *b, pm_t *offset, vm_t vaddr, vmflags_t flags, enum mm_order order, void *data); -stat_t alloc_shared_wrapper(struct vm_branch *b, pm_t *offset, vm_t vaddr, +stat_t alloc_shared_wrapper(struct vmem *b, pm_t *offset, vm_t vaddr, vmflags_t flags, enum mm_order order, void *data); -stat_t free_uvmem_wrapper(struct vm_branch *b, pm_t *offset, vm_t vaddr, +stat_t free_uvmem_wrapper(struct vmem *b, pm_t *offset, vm_t vaddr, vmflags_t flags, enum mm_order order, void *data); #define map_allocd_region(b, start, bytes, flags, data) \ diff --git a/include/arch/vmem.h b/include/arch/vmem.h index 5197c67..03bffb3 100644 --- a/include/arch/vmem.h +++ b/include/arch/vmem.h @@ -3,28 +3,27 @@ #include <vmem.h> -stat_t map_vpage(struct vm_branch *branch, pm_t paddr, vm_t vaddr, - vmflags_t flags, enum mm_order order); +stat_t map_vpage(struct vmem *branch, pm_t paddr, vm_t vaddr, vmflags_t flags, + enum mm_order order); -stat_t unmap_vpage(struct vm_branch *branch, vm_t vaddr); +stat_t unmap_vpage(struct vmem *branch, vm_t vaddr); -stat_t mod_vpage(struct vm_branch *branch, vm_t vaddr, pm_t paddr, - vmflags_t flags); -stat_t stat_vpage(struct vm_branch *branch, vm_t vaddr, pm_t *paddr, +stat_t mod_vpage(struct vmem *branch, vm_t vaddr, pm_t paddr, vmflags_t flags); +stat_t stat_vpage(struct vmem *branch, vm_t vaddr, pm_t *paddr, enum mm_order *order, vmflags_t *flags); void flush_tlb(); void flush_tlb_all(); -stat_t populate_kvmem(struct vm_branch *b); -struct vm_branch *init_vmem(void *fdt); +stat_t populate_kvmem(struct vmem *b); +struct vmem *init_vmem(void *fdt); #if defined(DEBUG) -vm_t setup_kernel_io(struct vm_branch *b, vm_t paddr); +vm_t setup_kernel_io(struct vmem *b, vm_t paddr); #endif -struct vm_branch *create_vmem(); -stat_t destroy_vmem(struct vm_branch *); -stat_t clone_uvmem(struct vm_branch *, struct vm_branch *); +struct vmem *create_vmem(); +stat_t destroy_vmem(struct vmem *); +stat_t clone_uvmem(struct vmem *, struct vmem *); #endif /* APOS_ARCH_PAGES_H */ |
