Added boot process information to help someone find out what really happens.
[bootos.git] / stage2 / mm.h
blobcfa98ad78039982c3c225441fd1225d507ba03b3
1 /* mm.h - memory management
3 Copyright (C) 2010-2011 Hector Martin "marcan" <hector@marcansoft.com>
5 This code is licensed to you under the terms of the GNU GPL, version 2;
6 see file COPYING or http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
7 */
9 #ifndef MM_H
10 #define MM_H
12 #include "types.h"
14 extern u64 mm_bootmem_size;
15 extern u64 mm_highmem_addr;
16 extern u64 mm_highmem_size;
18 int mm_loadseg(u64 addr);
19 int mm_loadhtab(u64 addr);
21 void mm_init(void);
22 void mm_shutdown_highmem(void);
23 void mm_shutdown(void);
25 int mm_addmmio(u64 start, u32 size);
26 int mm_delmmio(u64 start);
27 int mm_clrmmio(void);
28 int mm_ismmio(u64 addr);
30 void *mm_highmem_freestart(void);
31 size_t mm_highmem_freesize(void);
32 void mm_highmem_reserve(size_t size);
34 u64 mm_addr_to_kernel(void *addr);
36 void sync_before_exec(void *addr, int len);
38 #endif