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_040_mmu.h>
12
13#define ARCH_M68K_MMU_TYPE 68040
14
15#include "arch_vm_translation_map_impl.cpp"
16
17static void
18set_pgdir(void *rt)
19{
20	uint32 rp;
21	rp = (uint32)rt & ~((1 << 9) - 1);
22
23	asm volatile(          \
24		"movec %0,%%srp\n" \
25		"movec %0,%%urp\n" \
26		: : "d"(rp));
27
28}
29
30
31struct 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
47};
48