1/*
2 * Copyright 2007, Haiku Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 *
5 * Authors:
6 * 		Fran��ois Revol <revol@free.fr>
7 */
8
9#include <arch/cpu.h>
10
11#include <arch_030_mmu.h>
12
13#define ARCH_M68K_MMU_TYPE 68030
14
15#include "arch_vm_translation_map_impl.cpp"
16
17static void
18set_pgdir(void *rt)
19{
20	long_page_directory_entry entry;
21	*(uint64 *)&entry = DFL_PAGEENT_VAL;
22	entry.type = DT_ROOT;
23	entry.addr = TA_TO_PREA(((addr_t)rt));
24
25	asm volatile( \
26		"pmove (%0),%%srp\n" \
27		"pmove (%0),%%crp\n" \
28		: : "a"((uint64 *)&entry));
29
30}
31
32
33struct m68k_vm_ops m68030_vm_ops = {
34	_m68k_translation_map_get_pgdir,
35	m68k_vm_translation_map_init_map,
36	m68k_vm_translation_map_init_kernel_map_post_sem,
37	m68k_vm_translation_map_init,
38	m68k_vm_translation_map_init_post_area,
39	m68k_vm_translation_map_init_post_sem,
40	m68k_vm_translation_map_early_map,
41	/*m68k_vm_translation_map_*/early_query,
42	set_pgdir,
43#if 0
44	m68k_map_address_range,
45	m68k_unmap_address_range,
46	m68k_remap_address_range
47#endif
48	m68k_vm_translation_map_is_kernel_page_accessible
49};
50