xref: /haiku/src/system/boot/platform/bios_ia32/mmu.h (revision 922e7ba1f3228e6f28db69b0ded8f86eb32dea17)
1 /*
2  * Copyright 2004-2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef MMU_H
6 #define MMU_H
7 
8 
9 #include <SupportDefs.h>
10 
11 
12 // For use with mmu_map_physical_memory()
13 static const uint32 kDefaultPageFlags = 0x3;	// present, R/W
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 extern void mmu_init(void);
20 extern void mmu_init_for_kernel(void);
21 extern addr_t mmu_map_physical_memory(addr_t physicalAddress, size_t size, uint32 flags);
22 extern void *mmu_allocate(void *virtualAddress, size_t size);
23 extern bool mmu_allocate_physical(addr_t base, size_t size);
24 extern void mmu_free(void *virtualAddress, size_t size);
25 
26 #ifdef __cplusplus
27 }
28 #endif
29 
30 #endif	/* MMU_H */
31