136ee9f5cSFrançois Revol /*
236ee9f5cSFrançois Revol * Copyright 2007, Haiku Inc. All rights reserved.
336ee9f5cSFrançois Revol * Distributed under the terms of the MIT License.
436ee9f5cSFrançois Revol *
536ee9f5cSFrançois Revol * Authors:
636ee9f5cSFrançois Revol * François Revol <revol@free.fr>
736ee9f5cSFrançois Revol */
836ee9f5cSFrançois Revol
936ee9f5cSFrançois Revol #include <arch/cpu.h>
1036ee9f5cSFrançois Revol
1136ee9f5cSFrançois Revol #include <arch_040_mmu.h>
1236ee9f5cSFrançois Revol
1336ee9f5cSFrançois Revol #define ARCH_M68K_MMU_TYPE 68040
1436ee9f5cSFrançois Revol
1536ee9f5cSFrançois Revol #include "arch_vm_translation_map_impl.cpp"
1636ee9f5cSFrançois Revol
1736ee9f5cSFrançois Revol static void
set_pgdir(void * rt)1836ee9f5cSFrançois Revol set_pgdir(void *rt)
1936ee9f5cSFrançois Revol {
2036ee9f5cSFrançois Revol uint32 rp;
2136ee9f5cSFrançois Revol rp = (uint32)rt & ~((1 << 9) - 1);
2236ee9f5cSFrançois Revol
2336ee9f5cSFrançois Revol asm volatile( \
2436ee9f5cSFrançois Revol "movec %0,%%srp\n" \
2536ee9f5cSFrançois Revol "movec %0,%%urp\n" \
2636ee9f5cSFrançois Revol : : "d"(rp));
2736ee9f5cSFrançois Revol
2836ee9f5cSFrançois Revol }
2936ee9f5cSFrançois Revol
3036ee9f5cSFrançois Revol
3136ee9f5cSFrançois Revol struct m68k_vm_ops m68040_vm_ops = {
3236ee9f5cSFrançois Revol _m68k_translation_map_get_pgdir,
3336ee9f5cSFrançois Revol m68k_vm_translation_map_init_map,
3436ee9f5cSFrançois Revol m68k_vm_translation_map_init_kernel_map_post_sem,
3536ee9f5cSFrançois Revol m68k_vm_translation_map_init,
3636ee9f5cSFrançois Revol m68k_vm_translation_map_init_post_area,
3736ee9f5cSFrançois Revol m68k_vm_translation_map_init_post_sem,
3836ee9f5cSFrançois Revol m68k_vm_translation_map_early_map,
3936ee9f5cSFrançois Revol /*m68k_vm_translation_map_*/early_query,
4036ee9f5cSFrançois Revol set_pgdir,
4136ee9f5cSFrançois Revol #if 0
4236ee9f5cSFrançois Revol m68k_map_address_range,
4336ee9f5cSFrançois Revol m68k_unmap_address_range,
4436ee9f5cSFrançois Revol m68k_remap_address_range
4536ee9f5cSFrançois Revol #endif
46*98977abcSFrançois Revol m68k_vm_translation_map_is_kernel_page_accessible
4736ee9f5cSFrançois Revol };
48