xref: /haiku/src/system/kernel/arch/arm/arch_vm_translation_map.cpp (revision 147133b76cbb1603bdbff295505f5b830cb4e688)
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/vm.h>
15 #include <vm/vm_priv.h>
16 #include <vm/VMAddressSpace.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 void *
28 m68k_translation_map_get_pgdir(VMTranslationMap *map)
29 {
30 	return NULL;
31 #warning ARM:WRITEME
32 //get_vm_ops()->m68k_translation_map_get_pgdir(map);
33 }
34 
35 //  #pragma mark -
36 //  VM API
37 
38 
39 status_t
40 arch_vm_translation_map_init(kernel_args *args,
41         VMPhysicalPageMapper** _physicalPageMapper)
42 {
43 	return NULL;
44 #warning ARM:WRITEME
45 
46 //get_vm_ops()->arch_vm_translation_map_init_map(map, kernel);
47 }
48 
49 status_t
50 arch_vm_translation_map_create_map(bool kernel, VMTranslationMap** _map)
51 {
52 	return NULL;
53 #warning ARM:WRITEME
54 }
55 
56 status_t
57 arch_vm_translation_map_init_kernel_map_post_sem(VMTranslationMap *map)
58 {
59 	return NULL;
60 #warning ARM:WRITEME
61 
62 //get_vm_ops()->arch_vm_translation_map_init_kernel_map_post_sem(map);
63 }
64 
65 
66 status_t
67 arch_vm_translation_map_init(kernel_args *args)
68 {
69 	return NULL;
70 #warning ARM:WRITEME
71 
72 //get_vm_ops()->arch_vm_translation_map_init(args);
73 }
74 
75 
76 status_t
77 arch_vm_translation_map_init_post_area(kernel_args *args)
78 {
79 	return NULL;
80 #warning ARM:WRITEME
81 
82 //get_vm_ops()->arch_vm_translation_map_init_post_area(args);
83 }
84 
85 
86 status_t
87 arch_vm_translation_map_init_post_sem(kernel_args *args)
88 {
89 	return NULL;
90 #warning ARM:WRITEME
91 
92 //get_vm_ops()->arch_vm_translation_map_init_post_sem(args);
93 }
94 
95 
96 /**	Directly maps a page without having knowledge of any kernel structures.
97  *	Used only during VM setup.
98  *	It currently ignores the "attributes" parameter and sets all pages
99  *	read/write.
100  */
101 
102 status_t
103 arch_vm_translation_map_early_map(kernel_args *ka, addr_t virtualAddress,
104 	phys_addr_t physicalAddress, uint8 attributes,
105 	phys_addr_t (*get_free_page)(kernel_args *))
106 {
107 	return NULL;
108 #warning ARM:WRITEME
109 
110 //get_vm_ops()->arch_vm_translation_map_early_map(ka, virtualAddress, physicalAddress,
111 //		attributes, get_free_page);
112 }
113 
114 
115 // XXX currently assumes this translation map is active
116 
117 status_t
118 arch_vm_translation_map_early_query(addr_t va, phys_addr_t *out_physical)
119 {
120 	return NULL;
121 #warning ARM:WRITEME
122 
123 //get_vm_ops()->arch_vm_translation_map_early_query(va, out_physical);
124 }
125 
126 
127 bool
128 arch_vm_translation_map_is_kernel_page_accessible(addr_t virtualAddress,
129         uint32 protection)
130 {
131 #warning ARM:WRITEME
132         return TRUE;
133 //get_vm_ops()-arch_vm_translation_map_is_kernel_page_accessible(virtualAddress,
134   //              protection);
135 }
136 
137