#ifndef KMULTIBOOT_H
#define KMULTIBOOT_H

#include <stdint.h>

typedef struct {
    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;
    uint32_t num;
    uint32_t size;
    uint32_t addr;
    uint32_t shndx;
    uint32_t mmap_length;
    uint32_t mmap_addr; 
    uint32_t drives_length;
    uint32_t drives_addr;
    uint32_t config_table;
    uint32_t boot_loader_name;
    uint32_t apm_table;
    uint32_t vbe_control_info;
    uint32_t vbe_mode_info;
    uint16_t vbe_mode;
    uint16_t vbe_interface_seg;
    uint16_t vbe_interface_off;
    uint16_t vbe_interface_len;
    uint64_t framebuffer_addr;
    uint32_t framebuffer_pitch;
    uint32_t framebuffer_width;
    uint32_t framebuffer_height;
    uint8_t  framebuffer_bpp;
    uint8_t  framebuffer_type;
    uint8_t  red_field_position;
    uint8_t  red_mask_size;
    uint8_t  green_field_position;
    uint8_t  green_mask_size;
    uint8_t  blue_field_position;
    uint8_t  blue_mask_size;
} __attribute__((packed)) multiboot_info;

typedef struct {
    uint32_t size;
    uint64_t addr;  
    uint64_t len;    
    uint32_t type;
} __attribute__((packed)) multiboot_mmap_entry;

typedef struct {
    uint32_t mod_start; // Physical start address of user.elf in memory
    uint32_t mod_end;   // Physical end address of user.elf
    uint32_t cmdline;   // Pointer to a string (e.g., "/boot/user.elf")
    uint32_t pad;
} __attribute__((packed)) multiboot_module_t;

extern multiboot_module_t multiboot_module_info_table[32];

#endif