14e44040dSFrançois Revol /* 24e44040dSFrançois Revol * Copyright 2007, Haiku Inc. All rights reserved. 34e44040dSFrançois Revol * Distributed under the terms of the MIT License. 44e44040dSFrançois Revol * 54e44040dSFrançois Revol * Authors: 64e44040dSFrançois Revol * François Revol <revol@free.fr> 74e44040dSFrançois Revol */ 84e44040dSFrançois Revol 94e44040dSFrançois Revol #include <arch/cpu.h> 104e44040dSFrançois Revol 1124ec4307SFrançois Revol #include <arch_030_mmu.h> 124e44040dSFrançois Revol 13*1fd024beSFrançois Revol #define ARCH_M68K_MMU_TYPE 68030 144e44040dSFrançois Revol 154e44040dSFrançois Revol #include "arch_vm_translation_map_impl.cpp" 164e44040dSFrançois Revol 17*1fd024beSFrançois Revol static void 18*1fd024beSFrançois Revol set_pgdir(void *rt) 19*1fd024beSFrançois Revol { 20*1fd024beSFrançois Revol long_page_directory_entry entry; 21*1fd024beSFrançois Revol *(uint64 *)&entry = DFL_PAGEENT_VAL; 22*1fd024beSFrançois Revol entry.type = DT_ROOT; 23*1fd024beSFrançois Revol entry.addr = TA_TO_PREA(((addr_t)rt)); 24*1fd024beSFrançois Revol 25*1fd024beSFrançois Revol asm volatile( \ 26*1fd024beSFrançois Revol "pmove (%0),%%srp\n" \ 27*1fd024beSFrançois Revol "pmove (%0),%%crp\n" \ 28*1fd024beSFrançois Revol : : "a"((uint64 *)&entry)); 29*1fd024beSFrançois Revol 30*1fd024beSFrançois Revol } 31*1fd024beSFrançois Revol 32*1fd024beSFrançois Revol 334e44040dSFrançois Revol struct m68k_vm_ops m68030_vm_ops = { 34*1fd024beSFrançois Revol _m68k_translation_map_get_pgdir, 354237dbd0SFrançois Revol m68k_vm_translation_map_init_map, 364237dbd0SFrançois Revol m68k_vm_translation_map_init_kernel_map_post_sem, 374237dbd0SFrançois Revol m68k_vm_translation_map_init, 384237dbd0SFrançois Revol m68k_vm_translation_map_init_post_area, 394237dbd0SFrançois Revol m68k_vm_translation_map_init_post_sem, 404237dbd0SFrançois Revol m68k_vm_translation_map_early_map, 414237dbd0SFrançois Revol /*m68k_vm_translation_map_*/early_query, 42*1fd024beSFrançois Revol set_pgdir, 434e44040dSFrançois Revol #if 0 444e44040dSFrançois Revol m68k_map_address_range, 454e44040dSFrançois Revol m68k_unmap_address_range, 464e44040dSFrançois Revol m68k_remap_address_range 474e44040dSFrançois Revol #endif 484e44040dSFrançois Revol }; 49