2 * Copyright 2012, Alex Smith, alex@alex-smith.me.uk.
3 * Copyright 2010, Ingo Weinhold, ingo_weinhold@gmx.de.
4 * Distributed under the terms of the MIT License.
6 #ifndef KERNEL_ARCH_X86_PAGING_64BIT_X86_VM_TRANSLATION_MAP_64BIT_H
7 #define KERNEL_ARCH_X86_PAGING_64BIT_X86_VM_TRANSLATION_MAP_64BIT_H
10 #include "paging/X86VMTranslationMap.h"
13 struct X86PagingStructures64Bit
;
16 struct X86VMTranslationMap64Bit final
: X86VMTranslationMap
{
17 X86VMTranslationMap64Bit();
18 virtual ~X86VMTranslationMap64Bit();
20 status_t
Init(bool kernel
);
22 virtual size_t MaxPagesNeededToMap(addr_t start
,
25 virtual status_t
Map(addr_t virtualAddress
,
26 phys_addr_t physicalAddress
,
27 uint32 attributes
, uint32 memoryType
,
28 vm_page_reservation
* reservation
);
29 virtual status_t
Unmap(addr_t start
, addr_t end
);
31 virtual status_t
DebugMarkRangePresent(addr_t start
, addr_t end
,
34 virtual status_t
UnmapPage(VMArea
* area
, addr_t address
,
35 bool updatePageQueue
);
36 virtual void UnmapPages(VMArea
* area
, addr_t base
,
37 size_t size
, bool updatePageQueue
);
38 virtual void UnmapArea(VMArea
* area
,
39 bool deletingAddressSpace
,
40 bool ignoreTopCachePageFlags
);
42 virtual status_t
Query(addr_t virtualAddress
,
43 phys_addr_t
* _physicalAddress
,
45 virtual status_t
QueryInterrupt(addr_t virtualAddress
,
46 phys_addr_t
* _physicalAddress
,
49 virtual status_t
Protect(addr_t base
, addr_t top
,
50 uint32 attributes
, uint32 memoryType
);
52 virtual status_t
ClearFlags(addr_t virtualAddress
,
55 virtual bool ClearAccessedAndModified(
56 VMArea
* area
, addr_t address
,
57 bool unmapIfUnaccessed
,
60 virtual X86PagingStructures
* PagingStructures() const;
61 inline X86PagingStructures64Bit
* PagingStructures64Bit() const
62 { return fPagingStructures
; }
65 X86PagingStructures64Bit
* fPagingStructures
;
69 #endif // KERNEL_ARCH_X86_PAGING_64BIT_X86_VM_TRANSLATION_MAP_64BIT_H