2024-06-25 22:47:21 -04:00
|
|
|
|
#ifndef HAZEL_MULTIBOOT_H_
|
|
|
|
|
#define HAZEL_MULTIBOOT_H_
|
|
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
uint32_t flags; //required
|
|
|
|
|
uint32_t memlower; //if bit 0 in flags are set
|
|
|
|
|
uint32_t memupper; //if bit 0 in flags are set
|
|
|
|
|
uint32_t bootdevice; //if bit 1 in flags are set
|
|
|
|
|
uint32_t commandline; //if bit 2 in flags are set
|
|
|
|
|
uint32_t modulecount; //if bit 3 in flags are set
|
|
|
|
|
uint32_t moduleaddress; //if bit 3 in flags are set
|
|
|
|
|
uint32_t syms[4]; //if bits 4 or 5 in flags are set
|
|
|
|
|
uint32_t memmaplength; //if bit 6 in flags is set
|
|
|
|
|
uint32_t memmapaddress; //if bit 6 in flags is set
|
|
|
|
|
uint32_t driveslength; //if bit 7 in flags is set
|
|
|
|
|
uint32_t drivesaddress; //if bit 7 in flags is set
|
|
|
|
|
uint32_t configtable; //if bit 8 in flags is set
|
|
|
|
|
uint32_t apmtable; //if bit 9 in flags is set
|
|
|
|
|
uint32_t vbecontrolinfo; //if bit 10 in flags is set
|
|
|
|
|
uint32_t vbemodeinfo; //if bit 11 in flags is set
|
|
|
|
|
uint32_t vbemode; // all vbe_* set if bit 12 in flags are set
|
|
|
|
|
uint32_t vbeinterfaceseg;
|
|
|
|
|
uint32_t vbeinterfaceoff;
|
|
|
|
|
uint32_t vbeinterfacelength;
|
|
|
|
|
} multiboot_info_t;
|
|
|
|
|
|
2024-06-27 18:36:32 -04:00
|
|
|
|
struct multiboot_mmap_entry
|
|
|
|
|
{
|
2024-07-03 15:42:01 -04:00
|
|
|
|
uint32_t size;
|
|
|
|
|
uint64_t addr;
|
|
|
|
|
uint64_t len;
|
2024-06-27 18:36:32 -04:00
|
|
|
|
#define MULTIBOOT_MEMORY_AVAILABLE 1
|
|
|
|
|
#define MULTIBOOT_MEMORY_RESERVED 2
|
|
|
|
|
#define MULTIBOOT_MEMORY_ACPI_RECLAIMABLE 3
|
|
|
|
|
#define MULTIBOOT_MEMORY_NVS 4
|
|
|
|
|
#define MULTIBOOT_MEMORY_BADRAM 5
|
2024-07-03 15:42:01 -04:00
|
|
|
|
uint32_t type;
|
2024-06-27 18:36:32 -04:00
|
|
|
|
} __attribute__((packed));
|
2024-07-02 18:44:36 -04:00
|
|
|
|
typedef struct multiboot_mmap_entry multi_mmap_t;
|
2024-06-27 18:36:32 -04:00
|
|
|
|
|
2024-07-03 15:42:01 -04:00
|
|
|
|
struct multiboot_mod_list
|
|
|
|
|
{
|
|
|
|
|
/* the memory used goes from bytes ’mod_start’ to ’mod_end-1’ inclusive */
|
|
|
|
|
uint32_t mod_start;
|
|
|
|
|
uint32_t mod_end;
|
|
|
|
|
|
|
|
|
|
/* Module command line */
|
|
|
|
|
uint32_t cmdline;
|
|
|
|
|
|
|
|
|
|
/* padding to take it to 16 bytes (must be zero) */
|
|
|
|
|
uint32_t pad;
|
|
|
|
|
};
|
|
|
|
|
typedef struct multiboot_mod_list multi_mod_t;
|
|
|
|
|
|
2024-06-27 18:36:32 -04:00
|
|
|
|
|
2024-06-25 22:47:21 -04:00
|
|
|
|
#endif
|