Architectural Support: x86_64 (#37)
[lunaix-os.git] / lunaix-os / includes / lunaix / boot_generic.h
index 93e9e3db6b7c53d424ee6ee8b703c5cd2d00ba6c..cc6ea08a9492841e867bedee031f99bc1da5b041 100644 (file)
@@ -41,8 +41,8 @@ struct boot_handoff
         ptr_t ksections;
         size_t size;
 
         ptr_t ksections;
         size_t size;
 
-        char** argv;
-        size_t argc;
+        char* cmdline;
+        size_t len;
     } kexec;
 
     struct
     } kexec;
 
     struct
@@ -61,11 +61,36 @@ struct boot_handoff
 void
 boot_begin(struct boot_handoff*);
 
 void
 boot_begin(struct boot_handoff*);
 
+void
+boot_parse_cmdline(struct boot_handoff*);
+
 void
 boot_end(struct boot_handoff*);
 
 void
 void
 boot_end(struct boot_handoff*);
 
 void
-boot_cleanup();
+boot_begin_arch_reserve(struct boot_handoff*);
+
+void
+boot_clean_arch_reserve(struct boot_handoff*);
+
+static inline bool
+free_memregion(struct boot_mmapent* mmapent)
+{
+    return !mmapent->type;
+}
+
+static inline bool
+reserved_memregion(struct boot_mmapent* mmapent)
+{
+    return !!(mmapent->type & BOOT_MMAP_RSVD);
+}
+
+static inline bool
+reclaimable_memregion(struct boot_mmapent* mmapent)
+{
+    return !!(mmapent->type & BOOT_MMAP_RCLM);
+}
+
 #endif
 
 #endif /* __LUNAIX_BOOT_GENERIC_H */
 #endif
 
 #endif /* __LUNAIX_BOOT_GENERIC_H */