1/* 2 * Copyright 2010, Ingo Weinhold <ingo_weinhold@gmx.de>. 3 * Distributed under the terms of the MIT License. 4 */ 5 6 7#include "GenericVMPhysicalPageMapper.h" 8 9#include <Errors.h> 10 11#include "generic_vm_physical_page_mapper.h" 12#include "generic_vm_physical_page_ops.h" 13 14 15GenericVMPhysicalPageMapper::GenericVMPhysicalPageMapper() 16{ 17} 18 19 20GenericVMPhysicalPageMapper::~GenericVMPhysicalPageMapper() 21{ 22} 23 24 25status_t 26GenericVMPhysicalPageMapper::GetPage(phys_addr_t physicalAddress, 27 addr_t* _virtualAddress, void** _handle) 28{ 29 return generic_get_physical_page(physicalAddress, _virtualAddress, 0); 30} 31 32 33status_t 34GenericVMPhysicalPageMapper::PutPage(addr_t virtualAddress, void* handle) 35{ 36 return generic_put_physical_page(virtualAddress); 37} 38 39 40status_t 41GenericVMPhysicalPageMapper::GetPageCurrentCPU(phys_addr_t physicalAddress, 42 addr_t* _virtualAddress, void** _handle) 43{ 44 // TODO:... 45 return B_UNSUPPORTED; 46} 47 48 49status_t 50GenericVMPhysicalPageMapper::PutPageCurrentCPU(addr_t virtualAddress, 51 void* _handle) 52{ 53 // TODO:... 54 return B_UNSUPPORTED; 55} 56 57 58status_t 59GenericVMPhysicalPageMapper::GetPageDebug(phys_addr_t physicalAddress, 60 addr_t* _virtualAddress, void** _handle) 61{ 62 // TODO:... 63 return B_UNSUPPORTED; 64} 65 66 67status_t 68GenericVMPhysicalPageMapper::PutPageDebug(addr_t virtualAddress, void* handle) 69{ 70 // TODO:... 71 return B_UNSUPPORTED; 72} 73 74 75status_t 76GenericVMPhysicalPageMapper::MemsetPhysical(phys_addr_t address, int value, 77 phys_size_t length) 78{ 79 return generic_vm_memset_physical(address, value, length); 80} 81 82 83status_t 84GenericVMPhysicalPageMapper::MemcpyFromPhysical(void* to, phys_addr_t from, 85 size_t length, bool user) 86{ 87 return generic_vm_memcpy_from_physical(to, from, length, user); 88} 89 90 91status_t 92GenericVMPhysicalPageMapper::MemcpyToPhysical(phys_addr_t to, const void* from, 93 size_t length, bool user) 94{ 95 return generic_vm_memcpy_to_physical(to, from, length, user); 96} 97 98 99void 100GenericVMPhysicalPageMapper::MemcpyPhysicalPage(phys_addr_t to, 101 phys_addr_t from) 102{ 103 generic_vm_memcpy_physical_page(to, from); 104} 105