1 /* 2 * Copyright 2007, François Revol, revol@free.fr. 3 * Distributed under the terms of the MIT License. 4 * 5 * Copyright 2003-2005, Axel Dörfler, axeld@pinc-software.de. 6 * Distributed under the terms of the MIT License. 7 * 8 * Copyright 2001, Travis Geiselbrecht. All rights reserved. 9 * Distributed under the terms of the NewOS License. 10 */ 11 12 #include <KernelExport.h> 13 14 #include <kernel.h> 15 #include <boot/kernel_args.h> 16 17 #include <vm/vm.h> 18 #include <vm/vm_types.h> 19 #include <arch/vm.h> 20 //#include <arch_mmu.h> 21 22 23 //#define TRACE_ARCH_VM 24 #ifdef TRACE_ARCH_VM 25 # define TRACE(x) dprintf x 26 #else 27 # define TRACE(x) ; 28 #endif 29 30 #warning M68K: WRITEME 31 32 status_t 33 arch_vm_init(kernel_args *args) 34 { 35 return B_OK; 36 } 37 38 39 status_t 40 arch_vm_init2(kernel_args *args) 41 { 42 // int bats[8]; 43 // int i; 44 45 /**/ 46 #warning M68K: disable TT0 and TT1, set up pmmu 47 48 return B_OK; 49 } 50 51 52 status_t 53 arch_vm_init_post_area(kernel_args *args) 54 { 55 return B_OK; 56 } 57 58 59 status_t 60 arch_vm_init_end(kernel_args *args) 61 { 62 63 #warning M68K: unset TT0 now 64 return B_OK; 65 } 66 67 68 status_t 69 arch_vm_init_post_modules(kernel_args *args) 70 { 71 return B_OK; 72 } 73 74 75 void 76 arch_vm_aspace_swap(struct VMAddressSpace *from, struct VMAddressSpace *to) 77 { 78 #warning ARM:WRITEME 79 // m68k_set_pgdir(m68k_translation_map_get_pgdir(&to->TranslationMap())); 80 } 81 82 83 bool 84 arch_vm_supports_protection(uint32 protection) 85 { 86 return true; 87 } 88 89 90 void 91 arch_vm_unset_memory_type(VMArea *area) 92 { 93 } 94 95 96 status_t 97 arch_vm_set_memory_type(VMArea *area, phys_addr_t physicalBase, uint32 type) 98 { 99 if (type == 0) 100 return B_OK; 101 102 return B_ERROR; 103 } 104