123eafdafSFrançois Revol /* 223eafdafSFrançois Revol * Copyright 2007, François Revol, revol@free.fr. 323eafdafSFrançois Revol * Distributed under the terms of the MIT License. 423eafdafSFrançois Revol * 523eafdafSFrançois Revol * Copyright 2003-2005, Axel Dörfler, axeld@pinc-software.de. 623eafdafSFrançois Revol * Distributed under the terms of the MIT License. 723eafdafSFrançois Revol * 823eafdafSFrançois Revol * Copyright 2001, Travis Geiselbrecht. All rights reserved. 923eafdafSFrançois Revol * Distributed under the terms of the NewOS License. 1023eafdafSFrançois Revol */ 1123eafdafSFrançois Revol 12258d4ef9SAlexander von Gluck IV 1323eafdafSFrançois Revol #include <KernelExport.h> 1423eafdafSFrançois Revol 1523eafdafSFrançois Revol #include <kernel.h> 1623eafdafSFrançois Revol #include <boot/kernel_args.h> 1723eafdafSFrançois Revol 18e50cf876SIngo Weinhold #include <vm/vm.h> 19e50cf876SIngo Weinhold #include <vm/vm_types.h> 2023eafdafSFrançois Revol #include <arch/vm.h> 2123eafdafSFrançois Revol //#include <arch_mmu.h> 2223eafdafSFrançois Revol 2323eafdafSFrançois Revol 2423eafdafSFrançois Revol //#define TRACE_ARCH_VM 2523eafdafSFrançois Revol #ifdef TRACE_ARCH_VM 2623eafdafSFrançois Revol # define TRACE(x) dprintf x 2723eafdafSFrançois Revol #else 2823eafdafSFrançois Revol # define TRACE(x) ; 2923eafdafSFrançois Revol #endif 3023eafdafSFrançois Revol 31258d4ef9SAlexander von Gluck IV #warning ARM: WRITEME 32258d4ef9SAlexander von Gluck IV 3323eafdafSFrançois Revol 3423eafdafSFrançois Revol status_t 3523eafdafSFrançois Revol arch_vm_init(kernel_args *args) 3623eafdafSFrançois Revol { 3723eafdafSFrançois Revol return B_OK; 3823eafdafSFrançois Revol } 3923eafdafSFrançois Revol 4023eafdafSFrançois Revol 4123eafdafSFrançois Revol status_t 4223eafdafSFrançois Revol arch_vm_init2(kernel_args *args) 4323eafdafSFrançois Revol { 4423eafdafSFrançois Revol // int bats[8]; 4523eafdafSFrançois Revol // int i; 4623eafdafSFrançois Revol 4723eafdafSFrançois Revol /**/ 48258d4ef9SAlexander von Gluck IV #warning ARM: WRITEME 4923eafdafSFrançois Revol 5023eafdafSFrançois Revol return B_OK; 5123eafdafSFrançois Revol } 5223eafdafSFrançois Revol 5323eafdafSFrançois Revol 5423eafdafSFrançois Revol status_t 5523eafdafSFrançois Revol arch_vm_init_post_area(kernel_args *args) 5623eafdafSFrançois Revol { 5723eafdafSFrançois Revol return B_OK; 5823eafdafSFrançois Revol } 5923eafdafSFrançois Revol 6023eafdafSFrançois Revol 6123eafdafSFrançois Revol status_t 6223eafdafSFrançois Revol arch_vm_init_end(kernel_args *args) 6323eafdafSFrançois Revol { 64258d4ef9SAlexander von Gluck IV #warning ARM: WRITEME 6523eafdafSFrançois Revol return B_OK; 6623eafdafSFrançois Revol } 6723eafdafSFrançois Revol 6823eafdafSFrançois Revol 6923eafdafSFrançois Revol status_t 7023eafdafSFrançois Revol arch_vm_init_post_modules(kernel_args *args) 7123eafdafSFrançois Revol { 7223eafdafSFrançois Revol return B_OK; 7323eafdafSFrançois Revol } 7423eafdafSFrançois Revol 7523eafdafSFrançois Revol 7623eafdafSFrançois Revol void 77b0db552cSIngo Weinhold arch_vm_aspace_swap(struct VMAddressSpace *from, struct VMAddressSpace *to) 7823eafdafSFrançois Revol { 7923eafdafSFrançois Revol #warning ARM:WRITEME 8090d870c1SIngo Weinhold // m68k_set_pgdir(m68k_translation_map_get_pgdir(&to->TranslationMap())); 8123eafdafSFrançois Revol } 8223eafdafSFrançois Revol 8323eafdafSFrançois Revol 8423eafdafSFrançois Revol bool 8523eafdafSFrançois Revol arch_vm_supports_protection(uint32 protection) 8623eafdafSFrançois Revol { 8723eafdafSFrançois Revol return true; 8823eafdafSFrançois Revol } 8923eafdafSFrançois Revol 9023eafdafSFrançois Revol 9123eafdafSFrançois Revol void 92a99eb6b5SIngo Weinhold arch_vm_unset_memory_type(VMArea *area) 9323eafdafSFrançois Revol { 9423eafdafSFrançois Revol } 9523eafdafSFrançois Revol 9623eafdafSFrançois Revol 9723eafdafSFrançois Revol status_t 98147133b7SIngo Weinhold arch_vm_set_memory_type(VMArea *area, phys_addr_t physicalBase, uint32 type) 9923eafdafSFrançois Revol { 100*de4f3cf3SIthamar R. Adema if (type != 0) 101*de4f3cf3SIthamar R. Adema dprintf("%s: undefined type %lx!\n", __PRETTY_FUNCTION__, type); 10223eafdafSFrançois Revol 103*de4f3cf3SIthamar R. Adema return B_OK; 10423eafdafSFrançois Revol } 105