Unifying the Lunaix's Physical Memory Model (#28)
[lunaix-os.git] / lunaix-os / includes / lunaix / boot_generic.h
index a229c454b8f8668251b140eaeab8d1746a13e504..dca7b9af1df9d2bef19c92b256a7261953fbe28e 100644 (file)
@@ -69,6 +69,25 @@ boot_end(struct boot_handoff*);
 
 void
 boot_cleanup();
 
 void
 boot_cleanup();
+
+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 */