1 #ifndef __LUNAIX_BOOT_GENERIC_H
2 #define __LUNAIX_BOOT_GENERIC_H
4 #include <lunaix/types.h>
7 #define BOOT_MMAP_FREE 0
9 // Reserved memory region
10 #define BOOT_MMAP_RSVD 1
12 // Reclaimable memory region
13 #define BOOT_MMAP_RCLM 2
35 struct boot_mmapent* mmap;
52 struct boot_modent* entries;
55 void (*release)(struct boot_handoff*);
56 void (*prepare)(struct boot_handoff*);
58 // XXX: should arch specific boot detect platform interface provider?
63 boot_begin(struct boot_handoff*);
66 boot_parse_cmdline(struct boot_handoff*);
69 boot_end(struct boot_handoff*);
72 boot_begin_arch_reserve(struct boot_handoff*);
75 boot_clean_arch_reserve(struct boot_handoff*);
78 free_memregion(struct boot_mmapent* mmapent)
80 return !mmapent->type;
84 reserved_memregion(struct boot_mmapent* mmapent)
86 return !!(mmapent->type & BOOT_MMAP_RSVD);
90 reclaimable_memregion(struct boot_mmapent* mmapent)
92 return !!(mmapent->type & BOOT_MMAP_RCLM);
97 #endif /* __LUNAIX_BOOT_GENERIC_H */