btrfs: Attempt to fix GCC2 build.
[haiku.git] / src / system / kernel / arch / arm / arch_vm.cpp
bloba17f317d70183b1dd1d8ec4c3b7654af2df1c830
1 /*
2 * Copyright 2007, François Revol, revol@free.fr.
3 * Distributed under the terms of the MIT License.
5 * Copyright 2003-2005, Axel Dörfler, axeld@pinc-software.de.
6 * Distributed under the terms of the MIT License.
8 * Copyright 2001, Travis Geiselbrecht. All rights reserved.
9 * Distributed under the terms of the NewOS License.
13 #include <KernelExport.h>
15 #include <kernel.h>
16 #include <boot/kernel_args.h>
18 #include <vm/vm.h>
19 #include <vm/vm_types.h>
20 #include <arch/vm.h>
21 //#include <arch_mmu.h>
24 //#define TRACE_ARCH_VM
25 #ifdef TRACE_ARCH_VM
26 # define TRACE(x) dprintf x
27 #else
28 # define TRACE(x) ;
29 #endif
32 status_t
33 arch_vm_init(kernel_args *args)
35 TRACE(("arch_vm_init: entry\n"));
36 return B_OK;
40 status_t
41 arch_vm_init2(kernel_args *args)
43 return B_OK;
47 status_t
48 arch_vm_init_post_area(kernel_args *args)
50 TRACE(("arch_vm_init_post_area: entry\n"));
51 return B_OK;
55 status_t
56 arch_vm_init_end(kernel_args *args)
58 // Throw away all mappings that are unused by the kernel
59 vm_free_unused_boot_loader_range(KERNEL_LOAD_BASE, KERNEL_SIZE);
61 return B_OK;
65 status_t
66 arch_vm_init_post_modules(kernel_args *args)
68 return B_OK;
72 void
73 arch_vm_aspace_swap(struct VMAddressSpace *from, struct VMAddressSpace *to)
75 // This functions is only invoked when a userland thread is in the process
76 // of dying. It switches to the kernel team and does whatever cleanup is
77 // necessary (in case it is the team's main thread, it will delete the
78 // team).
79 // It is however not necessary to change the page directory. Userland team's
80 // page directories include all kernel mappings as well. Furthermore our
81 // arch specific translation map data objects are ref-counted, so they won't
82 // go away as long as they are still used on any CPU.
86 bool
87 arch_vm_supports_protection(uint32 protection)
89 // TODO check ARM protection possibilities
90 return true;
94 void
95 arch_vm_unset_memory_type(VMArea *area)
97 // TODO
101 status_t
102 arch_vm_set_memory_type(VMArea *area, phys_addr_t physicalBase, uint32 type)
104 if (type != 0)
105 dprintf("%s: undefined type %lx!\n", __PRETTY_FUNCTION__, type);
107 return B_OK;