2025-07-17 11:36:45 +00:00
|
|
|
/**
|
|
|
|
|
* @file kmultiboot.h
|
|
|
|
|
* @brief Kernel Multiboot
|
|
|
|
|
* @details Data needed for multiboot compatibility.
|
|
|
|
|
*/
|
2025-06-09 02:44:17 +00:00
|
|
|
#ifndef KMULTIBOOT_H
|
|
|
|
|
#define KMULTIBOOT_H
|
|
|
|
|
|
2025-06-10 13:17:21 +00:00
|
|
|
#include <stdint.h>
|
2025-07-17 11:36:45 +00:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief
|
|
|
|
|
*/
|
2025-07-05 08:36:39 +00:00
|
|
|
typedef struct multiboot_mmap_entry {
|
2025-07-17 11:36:45 +00:00
|
|
|
uint32_t entry_size; /**< @brief size of this struct entry */
|
|
|
|
|
uint64_t addr; /**< @brief physical location of memory */
|
|
|
|
|
uint64_t mem_size; /**< @brief size of the memory block */
|
|
|
|
|
uint32_t type; /**< @brief */
|
2025-07-05 08:36:39 +00:00
|
|
|
} __attribute__((packed)) mb_mmap_entry_t;
|
|
|
|
|
|
2025-07-17 11:36:45 +00:00
|
|
|
/**
|
|
|
|
|
* @brief
|
|
|
|
|
*/
|
2025-07-05 08:36:39 +00:00
|
|
|
typedef struct mb_info_s {
|
2025-07-17 11:36:45 +00:00
|
|
|
uint32_t flags; /**< @brief */
|
|
|
|
|
uint32_t mem_lower; /**< @brief */
|
|
|
|
|
uint32_t mem_upper; /**< @brief */
|
|
|
|
|
uint32_t boot_device; /**< @brief */
|
|
|
|
|
uint32_t cmdline; /**< @brief */
|
|
|
|
|
uint32_t mods_count; /**< @brief */
|
|
|
|
|
uint32_t mods_addr; /**< @brief */
|
|
|
|
|
uint32_t syms[4]; /**< @brief */
|
|
|
|
|
uint32_t mmap_length; /**< @brief */
|
|
|
|
|
uint32_t mmap_addr; /**< @brief */
|
2025-06-10 13:17:21 +00:00
|
|
|
} mb_info_t;
|
2025-06-09 02:44:17 +00:00
|
|
|
|
2025-07-17 11:36:45 +00:00
|
|
|
/**
|
|
|
|
|
* @brief
|
|
|
|
|
*/
|
2025-07-05 08:36:39 +00:00
|
|
|
extern uint8_t _kernel_start;
|
2025-07-17 11:36:45 +00:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief
|
|
|
|
|
*/
|
2025-07-05 08:36:39 +00:00
|
|
|
extern uint8_t _kernel_end;
|
2025-06-09 02:44:17 +00:00
|
|
|
|
|
|
|
|
#endif
|