Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Merge branch 'devel'
[palacios.git] / kitten / include / lwk / bootmem.h
1 #ifndef _LWK_BOOTMEM_H
2 #define _LWK_BOOTMEM_H
3
4 #include <lwk/list.h>
5 #include <lwk/init.h>
6
7 /**
8  * Bootmem control structure.
9  *
10  * The node_bootmem_map field is a map pointer - the bits represent
11  * all physical memory pages (including holes) for the region represented
12  * by the enclosing bootmem_data structure.
13  */
14 typedef struct bootmem_data {
15         unsigned long   node_boot_start;
16         unsigned long   node_low_pfn;
17         void            *node_bootmem_map;      // bitmap, one bit per page
18         unsigned long   last_offset;
19         unsigned long   last_pos;
20         unsigned long   last_success;           // previous allocation point,
21                                                 // used to speed up search.
22         struct list_head list;
23 } bootmem_data_t;
24
25 extern unsigned long __init bootmem_bootmap_pages(unsigned long pages);
26 extern unsigned long __init init_bootmem(unsigned long start,
27                                          unsigned long pages);
28 extern void __init reserve_bootmem(unsigned long addr, unsigned long size);
29 extern void * __init alloc_bootmem(unsigned long size);
30 extern void * __init alloc_bootmem_aligned(unsigned long size,
31                                            unsigned long alignment);
32 extern void __init free_bootmem(unsigned long addr, unsigned long size);
33 extern void __init free_all_bootmem(void);
34
35 extern void __init mem_subsys_init(void);
36 extern void __init arch_memsys_init(size_t kmem_size);
37
38 #endif