1 #ifndef AROS_MULTIBOOT_H
2 #define AROS_MULTIBOOT_H
5 Copyright © 2002, The AROS Development Team. All rights reserved.
8 Desc: Multiboot information structures
12 #include <exec/types.h>
14 #define MULTIBOOT_HEADER_MAGIC 0x1BADB002
15 #define MULTIBOOT_HEADER_FLAGS 0x00000003
16 #define MULTIBOOT_BOOTLOADER_MAGIC 0x2BADB002
18 /* Structure passed from bootloader */
21 #define MB_FLAGS_MEM 1
22 #define MB_FLAGS_BOOTDEV 2
23 #define MB_FLAGS_CMDLINE 4
24 #define MB_FLAGS_MODS 8
25 #define MB_FLAGS_AOUT 16
26 #define MB_FLAGS_ELF 32
27 #define MB_FLAGS_MMAP 64
28 #define MB_FLAGS_DRIVES 128
29 #define MB_FLAGS_CFGTBL 256
30 #define MB_FLAGS_LDRNAME 512
31 #define MB_FLAGS_APMTBL 1024
32 #define MB_FLAGS_GFX 2048
50 ULONG vbe_control_info
;
65 #define MMAP_TYPE_RAM 1
66 #define MMAP_TYPE_RESERVED 2
67 #define MMAP_TYPE_ACPIDATA 3
68 #define MMAP_TYPE_ACPINVS 4
71 /* VBE controller information */
74 unsigned char signature
[4];
75 unsigned short version
;
76 unsigned long oem_string
;
77 unsigned long capabilities
;
78 unsigned long video_mode
;
79 unsigned short total_memory
;
80 unsigned short oem_software_rev
;
81 unsigned long oem_vendor_name
;
82 unsigned long oem_product_name
;
83 unsigned long oem_product_rev
;
84 unsigned char reserved
[222];
85 unsigned char oem_data
[256];
86 } __attribute__ ((packed
));
88 /* VBE mode information. */
91 unsigned short mode_attributes
;
92 unsigned char win_a_attributes
;
93 unsigned char win_b_attributes
;
94 unsigned short win_granularity
;
95 unsigned short win_size
;
96 unsigned short win_a_segment
;
97 unsigned short win_b_segment
;
98 unsigned long win_func
;
99 unsigned short bytes_per_scanline
;
102 unsigned short x_resolution
;
103 unsigned short y_resolution
;
104 unsigned char x_char_size
;
105 unsigned char y_char_size
;
106 unsigned char number_of_planes
;
107 unsigned char bits_per_pixel
;
108 unsigned char number_of_banks
;
109 unsigned char memory_model
;
110 unsigned char bank_size
;
111 unsigned char number_of_image_pages
;
112 unsigned char reserved0
;
115 unsigned char red_mask_size
;
116 unsigned char red_field_position
;
117 unsigned char green_mask_size
;
118 unsigned char green_field_position
;
119 unsigned char blue_mask_size
;
120 unsigned char blue_field_position
;
121 unsigned char reserved_mask_size
;
122 unsigned char reserved_field_position
;
123 unsigned char direct_color_mode_info
;
126 unsigned long phys_base
;
127 unsigned long reserved1
;
128 unsigned short reversed2
;
131 unsigned short linear_bytes_per_scanline
;
132 unsigned char banked_number_of_image_pages
;
133 unsigned char linear_number_of_image_pages
;
134 unsigned char linear_red_mask_size
;
135 unsigned char linear_red_field_position
;
136 unsigned char linear_green_mask_size
;
137 unsigned char linear_green_field_position
;
138 unsigned char linear_blue_mask_size
;
139 unsigned char linear_blue_field_position
;
140 unsigned char linear_reserved_mask_size
;
141 unsigned char linear_reserved_field_position
;
142 unsigned long max_pixel_clock
;
144 unsigned char reserved3
[189];
145 } __attribute__ ((packed
));
148 /* Structure in RAM at 0x1000 */
150 ULONG magic
; /* Indicates if information is valid */
151 #define MBRAM_VALID 0x1337BABE
152 ULONG flags
; /* Copy of the multiboot flags */
153 ULONG mem_lower
; /* Amount of lowmem (Sub 1Mb) */
154 ULONG mem_upper
; /* Amount of upper memory */
155 ULONG mmap_addr
; /* Pointer to memory map */
156 ULONG mmap_len
; /* size of memory map */
157 ULONG drives_addr
; /* Pointer to drive information */
158 ULONG drives_len
; /* Size of drive information */
159 char ldrname
[30]; /* String of loadername */
160 char cmdline
[200]; /* Commandline */
161 UWORD vbe_mode
; /* VBE mode */
162 struct vbe_mode vmi
; /* VBE mode information */
163 struct vbe_controller vci
; /* VBE controller information */
170 #define MB_MODE_CHS 0
171 #define MB_MODE_LBA 1
175 UWORD ports
[10]; /* Ugly, needs to be fixed */
178 #endif /* AROS_MULTIBOOT_H */