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;
51 struct boot_modent* entries;
54 void (*release)(struct boot_handoff*);
55 void (*prepare)(struct boot_handoff*);
57 // XXX: should arch specific boot detect platform interface provider?
62 boot_begin(struct boot_handoff*);
65 boot_parse_cmdline(struct boot_handoff*);
68 boot_end(struct boot_handoff*);
71 boot_begin_arch_reserve(struct boot_handoff*);
74 boot_clean_arch_reserve(struct boot_handoff*);
77 free_memregion(struct boot_mmapent* mmapent)
79 return !mmapent->type;
83 reserved_memregion(struct boot_mmapent* mmapent)
85 return !!(mmapent->type & BOOT_MMAP_RSVD);
89 reclaimable_memregion(struct boot_mmapent* mmapent)
91 return !!(mmapent->type & BOOT_MMAP_RCLM);
96 #endif /* __LUNAIX_BOOT_GENERIC_H */