2 * Copyright 2004-2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
3 * Distributed under the terms of the MIT License.
9 #include <SupportDefs.h>
12 // For use with mmu_map_physical_memory()
13 static const uint32 kDefaultPageFlags
= 0x3; // present, R/W
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 void mmu_free(void *virtualAddress
, size_t size
);
25 extern addr_t
mmu_get_next_page_tables();
29 void (*initialize
)(void);
30 /* len=0 to disable */
31 status_t (*set_tt
)(int which
, addr_t pa
, size_t len
, uint32 perms
);
32 /* load root pointers */
33 status_t (*load_rp
)(addr_t pa
);
34 status_t (*allocate_kernel_pgdirs
)(void);
35 status_t (*enable_paging
)(void);
36 status_t (*add_page_table
)(addr_t virtualAddress
);
37 void (*unmap_page
)(addr_t virtualAddress
);
38 void (*map_page
)(addr_t virtualAddress
, addr_t pa
, uint32 flags
);
41 extern const struct boot_mmu_ops k030MMUOps
;
42 extern const struct boot_mmu_ops k040MMUOps
;
43 extern const struct boot_mmu_ops k060MMUOps
;