SayoriOS  0.3.3
multiboot.h
1 /*------------------------------------------------------------------------------
2 //
3 // Multiboot header
4 //
5 //----------------------------------------------------------------------------*/
6 #ifndef MULTIBOOT_H
7 #define MULTIBOOT_H
8 
9 #include "common.h"
10 
11 #define MBOOT_FLAG_MEM 0x001
12 #define MBOOT_FLAG_DEVICE 0x002
13 #define MBOOT_FLAG_CMDLINE 0x004
14 #define MBOOT_FLAG_MODS 0x008
15 #define MBOOT_FLAG_AOUT 0x010
16 #define MBOOT_FLAG_ELF 0x020
17 #define MBOOT_FLAG_MMAP 0x040
18 #define MBOOT_FLAG_CONFIG 0x080
19 #define MBOOT_FLAG_LOADER 0x100
20 #define MBOOT_FLAG_APM 0x200
21 #define MBOOT_FLAG_VBE 0x400
22 
24 {
25  uint32_t flags; /* Header flags */
26  uint32_t mem_lower;
27  uint32_t mem_upper;
28  uint32_t boot_device;
29  uint32_t cmdline;
30  uint32_t mods_count;
31  uint32_t mods_addr;
32  uint32_t num;
33  uint32_t size;
34  uint32_t addr;
35  uint32_t shndx;
36  uint32_t mmap_length;
37  uint32_t mmap_addr;
38  uint32_t drives_length;
39  uint32_t drives_addr;
40  uint32_t config_table;
41  uint32_t boot_loader_name;
42  uint32_t apm_table;
43  uint32_t vbe_control_info;
44  uint32_t vbe_mode_info;
45  uint16_t vbe_mode;
46  uint16_t vbe_interface_seg;
47  uint16_t vbe_interface_off;
48  uint16_t vbe_interface_len;
49 
50  uint64_t framebuffer_addr;
51  uint32_t framebuffer_pitch;
52  uint32_t framebuffer_width;
53  uint32_t framebuffer_height;
54  uint8_t framebuffer_bpp;
55  uint8_t framebuffer_type;
56 
57  union {
58  struct {
59  uint32_t framebuffer_palette_addr;
60  uint16_t framebuffer_palette_num_colors;
61  };
62 
63  struct {
64  uint8_t framebuffer_red_field_position;
65  uint8_t framebuffer_red_mask_size;
66  uint8_t framebuffer_green_field_position;
67  uint8_t framebuffer_green_mask_size;
68  uint8_t framebuffer_blue_field_position;
69  uint8_t framebuffer_blue_mask_size;
70  };
71  };
72 
73 }__attribute__((packed));
74 
76 
78  uint32_t mod_start;
79  uint32_t mod_end;
80  uint32_t cmdline;
81  uint32_t reserved;
82 } __attribute__((packed));
83 
85 
86 
87 /* APM BIOS info. */
89 {
90  uint16_t version;
91  uint16_t cseg;
92  uint32_t offset;
93  uint16_t cseg_16;
94  uint16_t dseg;
95  uint16_t flags;
96  uint16_t cseg_len;
97  uint16_t cseg_16_len;
98  uint16_t dseg_len;
99 };
100 
102 {
103  uint32_t size;
104  uint32_t addr_low;
105  uint32_t addr_high;
106  uint32_t len_low;
107  uint32_t len_high;
108  uint32_t type;
109 
110 }__attribute__((packed));
111 
112 typedef struct memory_map_entry memory_map_entry_t;
113 
115 {
116  uint32_t type;
117  uint32_t size;
118  uint32_t mod_start;
119  uint32_t mod_end;
120  char cmdline[0];
121 }__attribute__((packed));
122 
124 
125 #endif
Основные определения ядра
struct registers __attribute__((packed))
Структура данных пакета от мыши
Definition: psf.h:19
Definition: multiboot.h:102