headers/bsd: Add sys/queue.h.
[haiku.git] / src / system / kernel / arch / m68k / paging / 040 / M68KVMTranslationMap040.h
blob5f372861ea1b0fc50c035114385b06509f1496af
1 /*
2 * Copyright 2010, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef KERNEL_ARCH_M68K_PAGING_040_M68K_VM_TRANSLATION_MAP_040_H
6 #define KERNEL_ARCH_M68K_PAGING_040_M68K_VM_TRANSLATION_MAP_040_H
9 #include "paging/M68KVMTranslationMap.h"
11 struct M68KPagingStructures040;
14 struct M68KVMTranslationMap040 : M68KVMTranslationMap {
15 M68KVMTranslationMap040();
16 virtual ~M68KVMTranslationMap040();
18 status_t Init(bool kernel);
20 virtual size_t MaxPagesNeededToMap(addr_t start,
21 addr_t end) const;
23 virtual status_t Map(addr_t virtualAddress,
24 phys_addr_t physicalAddress,
25 uint32 attributes, uint32 memoryType,
26 vm_page_reservation* reservation);
27 virtual status_t Unmap(addr_t start, addr_t end);
29 virtual status_t UnmapPage(VMArea* area, addr_t address,
30 bool updatePageQueue);
31 virtual void UnmapPages(VMArea* area, addr_t base,
32 size_t size, bool updatePageQueue);
33 virtual void UnmapArea(VMArea* area,
34 bool deletingAddressSpace,
35 bool ignoreTopCachePageFlags);
37 virtual status_t Query(addr_t virtualAddress,
38 phys_addr_t* _physicalAddress,
39 uint32* _flags);
40 virtual status_t QueryInterrupt(addr_t virtualAddress,
41 phys_addr_t* _physicalAddress,
42 uint32* _flags);
44 virtual status_t Protect(addr_t base, addr_t top,
45 uint32 attributes, uint32 memoryType);
47 virtual status_t ClearFlags(addr_t virtualAddress,
48 uint32 flags);
50 virtual bool ClearAccessedAndModified(
51 VMArea* area, addr_t address,
52 bool unmapIfUnaccessed,
53 bool& _modified);
55 virtual M68KPagingStructures* PagingStructures() const;
56 inline M68KPagingStructures040* PagingStructures040() const
57 { return fPagingStructures; }
59 void* MapperGetPageTableAt(
60 phys_addr_t physicalAddress,
61 bool indirect=false);
63 private:
64 M68KPagingStructures040* fPagingStructures;
68 #endif // KERNEL_ARCH_M68K_PAGING_040_M68K_VM_TRANSLATION_MAP_040_H