1 /* 2 * Copyright 2007, François Revol, revol@free.fr. 3 * Distributed under the terms of the MIT License. 4 * 5 * Copyright 2003-2007, 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 #include <kernel.h> 14 #include <vm.h> 15 #include <vm_address_space.h> 16 #include <vm_priv.h> 17 #include <int.h> 18 #include <boot/kernel_args.h> 19 #include <arch/vm_translation_map.h> 20 #include <arch/cpu.h> 21 //#include <arch_mmu.h> 22 #include <stdlib.h> 23 24 #include "generic_vm_physical_page_mapper.h" 25 26 27 28 void * 29 m68k_translation_map_get_pgdir(vm_translation_map *map) 30 { 31 return NULL; 32 #warning ARM:WRITEME 33 //get_vm_ops()->m68k_translation_map_get_pgdir(map); 34 } 35 36 // #pragma mark - 37 // VM API 38 39 40 status_t 41 arch_vm_translation_map_init_map(vm_translation_map *map, bool kernel) 42 { 43 return NULL; 44 #warning ARM:WRITEME 45 46 //get_vm_ops()->arch_vm_translation_map_init_map(map, kernel); 47 } 48 49 50 status_t 51 arch_vm_translation_map_init_kernel_map_post_sem(vm_translation_map *map) 52 { 53 return NULL; 54 #warning ARM:WRITEME 55 56 //get_vm_ops()->arch_vm_translation_map_init_kernel_map_post_sem(map); 57 } 58 59 60 status_t 61 arch_vm_translation_map_init(kernel_args *args) 62 { 63 return NULL; 64 #warning ARM:WRITEME 65 66 //get_vm_ops()->arch_vm_translation_map_init(args); 67 } 68 69 70 status_t 71 arch_vm_translation_map_init_post_area(kernel_args *args) 72 { 73 return NULL; 74 #warning ARM:WRITEME 75 76 //get_vm_ops()->arch_vm_translation_map_init_post_area(args); 77 } 78 79 80 status_t 81 arch_vm_translation_map_init_post_sem(kernel_args *args) 82 { 83 return NULL; 84 #warning ARM:WRITEME 85 86 //get_vm_ops()->arch_vm_translation_map_init_post_sem(args); 87 } 88 89 90 /** Directly maps a page without having knowledge of any kernel structures. 91 * Used only during VM setup. 92 * It currently ignores the "attributes" parameter and sets all pages 93 * read/write. 94 */ 95 96 status_t 97 arch_vm_translation_map_early_map(kernel_args *ka, addr_t virtualAddress, addr_t physicalAddress, 98 uint8 attributes, addr_t (*get_free_page)(kernel_args *)) 99 { 100 return NULL; 101 #warning ARM:WRITEME 102 103 //get_vm_ops()->arch_vm_translation_map_early_map(ka, virtualAddress, physicalAddress, 104 // attributes, get_free_page); 105 } 106 107 108 // XXX currently assumes this translation map is active 109 110 status_t 111 arch_vm_translation_map_early_query(addr_t va, addr_t *out_physical) 112 { 113 return NULL; 114 #warning ARM:WRITEME 115 116 //get_vm_ops()->arch_vm_translation_map_early_query(va, out_physical); 117 } 118 119 120 bool 121 arch_vm_translation_map_is_kernel_page_accessible(addr_t virtualAddress, 122 uint32 protection) 123 { 124 #warning ARM:WRITEME 125 return TRUE; 126 //get_vm_ops()-arch_vm_translation_map_is_kernel_page_accessible(virtualAddress, 127 // protection); 128 } 129 130