X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/1fe5f5eb5378a47bf0f3451762743c162e40faad..bffa3430fbbaaad29bec0b5bee9c1f0bfc7fd068:/lunaix-os/includes/lunaix/boot_generic.h diff --git a/lunaix-os/includes/lunaix/boot_generic.h b/lunaix-os/includes/lunaix/boot_generic.h index 93e9e3d..9ffb7e2 100644 --- a/lunaix-os/includes/lunaix/boot_generic.h +++ b/lunaix-os/includes/lunaix/boot_generic.h @@ -38,11 +38,12 @@ struct boot_handoff struct { - ptr_t ksections; - size_t size; + struct { + char* cmdline; + size_t len; + }; - char** argv; - size_t argc; + ptr_t dtb_pa; } kexec; struct @@ -61,11 +62,36 @@ struct boot_handoff void boot_begin(struct boot_handoff*); +void +boot_parse_cmdline(struct boot_handoff*); + 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 */