Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/genarch/include/genarch/multiboot/multiboot.h

    r6ecf5b8 r7ba16eb  
    3636#define KERN_MULTIBOOT_H_
    3737
     38#include <genarch/multiboot/multiboot_memmap_struct.h>
     39#include <genarch/multiboot/multiboot_info_struct.h>
     40
    3841#define MULTIBOOT_HEADER_MAGIC  0x1badb002
    3942#define MULTIBOOT_HEADER_FLAGS  0x00010003
    4043
    4144#define MULTIBOOT_LOADER_MAGIC  0x2badb002
     45
     46#define MULTIBOOT_INFO_FLAGS_MEM        0x01
     47#define MULTIBOOT_INFO_FLAGS_BOOT       0x02
     48#define MULTIBOOT_INFO_FLAGS_CMDLINE    0x04
     49#define MULTIBOOT_INFO_FLAGS_MODS       0x08
     50#define MULTIBOOT_INFO_FLAGS_SYMS1      0x10
     51#define MULTIBOOT_INFO_FLAGS_SYMS2      0x20
     52#define MULTIBOOT_INFO_FLAGS_MMAP       0x40
    4253
    4354#ifndef __ASM__
     
    6071} __attribute__((packed)) multiboot_module_t;
    6172
    62 /** Multiboot mmap structure */
    63 typedef struct {
    64         uint32_t size;
    65         e820memmap_t mm_info;
    66 } __attribute__((packed)) multiboot_memmap_t;
    67 
    68 /** Multiboot information structure */
    69 typedef struct {
    70         uint32_t flags;
    71         uint32_t mem_lower;
    72         uint32_t mem_upper;
    73        
    74         uint32_t boot_device;
    75         uint32_t cmdline;
    76        
    77         uint32_t mods_count;
    78         mbaddr_t mods_addr;
    79        
    80         uint32_t syms[4];
    81        
    82         uint32_t mmap_length;
    83         mbaddr_t mmap_addr;
    84        
    85         /* ... */
    86 } __attribute__((packed)) multiboot_info_t;
    87 
    88 enum multiboot_info_flags {
    89         MULTIBOOT_INFO_FLAGS_MEM     = 0x01,
    90         MULTIBOOT_INFO_FLAGS_BOOT    = 0x02,
    91         MULTIBOOT_INFO_FLAGS_CMDLINE = 0x04,
    92         MULTIBOOT_INFO_FLAGS_MODS    = 0x08,
    93         MULTIBOOT_INFO_FLAGS_SYMS1   = 0x10,
    94         MULTIBOOT_INFO_FLAGS_SYMS2   = 0x20,
    95         MULTIBOOT_INFO_FLAGS_MMAP    = 0x40
    96        
    97         /* ... */
    98 };
    99 
    10073extern void multiboot_extract_command(char *, size_t, const char *);
    10174extern void multiboot_extract_argument(char *, size_t, const char *);
Note: See TracChangeset for help on using the changeset viewer.