2025-06-28 06:11:09 +00:00
|
|
|
/* kmultiboot.h
|
|
|
|
|
* Kernel Multiboot
|
|
|
|
|
*
|
|
|
|
|
* 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-05 08:36:39 +00:00
|
|
|
typedef struct multiboot_mmap_entry {
|
|
|
|
|
uint32_t entry_size; //size of this struct entry
|
|
|
|
|
uint64_t addr; //physical location of memory
|
|
|
|
|
uint64_t mem_size; //size of the memory block
|
|
|
|
|
uint32_t type;
|
|
|
|
|
} __attribute__((packed)) mb_mmap_entry_t;
|
|
|
|
|
|
2025-06-10 13:17:21 +00:00
|
|
|
|
2025-07-05 08:36:39 +00:00
|
|
|
typedef struct mb_info_s {
|
2025-06-09 02:44:17 +00:00
|
|
|
uint32_t flags;
|
|
|
|
|
uint32_t mem_lower;
|
|
|
|
|
uint32_t mem_upper;
|
|
|
|
|
uint32_t boot_device;
|
|
|
|
|
uint32_t cmdline;
|
|
|
|
|
uint32_t mods_count;
|
|
|
|
|
uint32_t mods_addr;
|
2025-07-05 08:36:39 +00:00
|
|
|
uint32_t syms[4];
|
|
|
|
|
uint32_t mmap_length;
|
|
|
|
|
uint32_t mmap_addr;
|
2025-06-10 13:17:21 +00:00
|
|
|
} mb_info_t;
|
2025-06-09 02:44:17 +00:00
|
|
|
|
2025-07-05 08:36:39 +00:00
|
|
|
|
|
|
|
|
extern uint8_t _kernel_start;
|
|
|
|
|
extern uint8_t _kernel_end;
|
2025-06-09 02:44:17 +00:00
|
|
|
|
|
|
|
|
#endif
|