vfs: check userland buffers before reading them.
[haiku.git] / src / system / kernel / arch / m68k / arch_040_mmu.cpp
blob5988660d054adb2f29ef1297d23f329373f744cc
1 /*
2 * Copyright 2007, Haiku Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * François Revol <revol@free.fr>
7 */
9 #include <arch/cpu.h>
11 #include <arch_040_mmu.h>
13 #define ARCH_M68K_MMU_TYPE 68040
15 #include "arch_vm_translation_map_impl.cpp"
17 static void
18 set_pgdir(void *rt)
20 uint32 rp;
21 rp = (uint32)rt & ~((1 << 9) - 1);
23 asm volatile( \
24 "movec %0,%%srp\n" \
25 "movec %0,%%urp\n" \
26 : : "d"(rp));
31 struct m68k_vm_ops m68040_vm_ops = {
32 _m68k_translation_map_get_pgdir,
33 m68k_vm_translation_map_init_map,
34 m68k_vm_translation_map_init_kernel_map_post_sem,
35 m68k_vm_translation_map_init,
36 m68k_vm_translation_map_init_post_area,
37 m68k_vm_translation_map_init_post_sem,
38 m68k_vm_translation_map_early_map,
39 /*m68k_vm_translation_map_*/early_query,
40 set_pgdir,
41 #if 0
42 m68k_map_address_range,
43 m68k_unmap_address_range,
44 m68k_remap_address_range
45 #endif
46 m68k_vm_translation_map_is_kernel_page_accessible