xref: /haiku/src/system/boot/platform/u-boot/mmu.h (revision a127b88ecbfab58f64944c98aa47722a18e363b2)
1 /*
2  * Copyright 2004-2005, Axel Dörfler, axeld@pinc-software.de.
3  * All rights reserved. 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;
14 	// present, R/W
15 
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 extern void mmu_init(void* fdt);
22 extern void mmu_init_for_kernel(void);
23 extern addr_t mmu_map_physical_memory(addr_t physicalAddress,
24 	size_t size, uint32 flags);
25 extern void *mmu_allocate(void *virtualAddress, size_t size);
26 extern void mmu_free(void *virtualAddress, size_t size);
27 
28 #ifdef __cplusplus
29 }
30 #endif
31 
32 
33 #endif	/* MMU_H */
34