headers/bsd: Add sys/queue.h.
[haiku.git] / src / system / kernel / arch / generic / GenericVMPhysicalPageMapper.cpp
blob405acc06a7e0e09382fba4dc7595f93d6034e10e
1 /*
2 * Copyright 2010, Ingo Weinhold <ingo_weinhold@gmx.de>.
3 * Distributed under the terms of the MIT License.
4 */
7 #include "GenericVMPhysicalPageMapper.h"
9 #include <Errors.h>
11 #include "generic_vm_physical_page_mapper.h"
12 #include "generic_vm_physical_page_ops.h"
15 GenericVMPhysicalPageMapper::GenericVMPhysicalPageMapper()
20 GenericVMPhysicalPageMapper::~GenericVMPhysicalPageMapper()
25 status_t
26 GenericVMPhysicalPageMapper::GetPage(phys_addr_t physicalAddress,
27 addr_t* _virtualAddress, void** _handle)
29 return generic_get_physical_page(physicalAddress, _virtualAddress, 0);
33 status_t
34 GenericVMPhysicalPageMapper::PutPage(addr_t virtualAddress, void* handle)
36 return generic_put_physical_page(virtualAddress);
40 status_t
41 GenericVMPhysicalPageMapper::GetPageCurrentCPU(phys_addr_t physicalAddress,
42 addr_t* _virtualAddress, void** _handle)
44 // TODO:...
45 return B_UNSUPPORTED;
49 status_t
50 GenericVMPhysicalPageMapper::PutPageCurrentCPU(addr_t virtualAddress,
51 void* _handle)
53 // TODO:...
54 return B_UNSUPPORTED;
58 status_t
59 GenericVMPhysicalPageMapper::GetPageDebug(phys_addr_t physicalAddress,
60 addr_t* _virtualAddress, void** _handle)
62 // TODO:...
63 return B_UNSUPPORTED;
67 status_t
68 GenericVMPhysicalPageMapper::PutPageDebug(addr_t virtualAddress, void* handle)
70 // TODO:...
71 return B_UNSUPPORTED;
75 status_t
76 GenericVMPhysicalPageMapper::MemsetPhysical(phys_addr_t address, int value,
77 phys_size_t length)
79 return generic_vm_memset_physical(address, value, length);
83 status_t
84 GenericVMPhysicalPageMapper::MemcpyFromPhysical(void* to, phys_addr_t from,
85 size_t length, bool user)
87 return generic_vm_memcpy_from_physical(to, from, length, user);
91 status_t
92 GenericVMPhysicalPageMapper::MemcpyToPhysical(phys_addr_t to, const void* from,
93 size_t length, bool user)
95 return generic_vm_memcpy_to_physical(to, from, length, user);
99 void
100 GenericVMPhysicalPageMapper::MemcpyPhysicalPage(phys_addr_t to,
101 phys_addr_t from)
103 generic_vm_memcpy_physical_page(to, from);