2 * Copyright 2010, Ingo Weinhold <ingo_weinhold@gmx.de>.
3 * Distributed under the terms of the MIT License.
7 #include "GenericVMPhysicalPageMapper.h"
11 #include "generic_vm_physical_page_mapper.h"
12 #include "generic_vm_physical_page_ops.h"
15 GenericVMPhysicalPageMapper::GenericVMPhysicalPageMapper()
20 GenericVMPhysicalPageMapper::~GenericVMPhysicalPageMapper()
26 GenericVMPhysicalPageMapper::GetPage(phys_addr_t physicalAddress
,
27 addr_t
* _virtualAddress
, void** _handle
)
29 return generic_get_physical_page(physicalAddress
, _virtualAddress
, 0);
34 GenericVMPhysicalPageMapper::PutPage(addr_t virtualAddress
, void* handle
)
36 return generic_put_physical_page(virtualAddress
);
41 GenericVMPhysicalPageMapper::GetPageCurrentCPU(phys_addr_t physicalAddress
,
42 addr_t
* _virtualAddress
, void** _handle
)
50 GenericVMPhysicalPageMapper::PutPageCurrentCPU(addr_t virtualAddress
,
59 GenericVMPhysicalPageMapper::GetPageDebug(phys_addr_t physicalAddress
,
60 addr_t
* _virtualAddress
, void** _handle
)
68 GenericVMPhysicalPageMapper::PutPageDebug(addr_t virtualAddress
, void* handle
)
76 GenericVMPhysicalPageMapper::MemsetPhysical(phys_addr_t address
, int value
,
79 return generic_vm_memset_physical(address
, value
, length
);
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
);
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
);
100 GenericVMPhysicalPageMapper::MemcpyPhysicalPage(phys_addr_t to
,
103 generic_vm_memcpy_physical_page(to
, from
);