Fixed binary search: no more infinite loops when vendor is unknown.
[tangerine.git] / arch / i386-pc / include / aros / multiboot.h
blob4793fbc7a3e148e68ae80ca7fc9f63aab62df560
1 #ifndef _MB_H
2 #define _MB_H
4 /*
5 Copyright © 2002, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: Multiboot information structures
9 Lang: english
12 #include <exec/types.h>
15 /* Structure passed from bootloader */
16 struct multiboot {
17 ULONG flags;
18 #define MB_FLAGS_MEM 1
19 #define MB_FLAGS_BOOTDEV 2
20 #define MB_FLAGS_CMDLINE 4
21 #define MB_FLAGS_MODS 8
22 #define MB_FLAGS_AOUT 16
23 #define MB_FLAGS_ELF 32
24 #define MB_FLAGS_MMAP 64
25 #define MB_FLAGS_DRIVES 128
26 #define MB_FLAGS_CFGTBL 256
27 #define MB_FLAGS_LDRNAME 512
28 #define MB_FLAGS_APMTBL 1024
29 #define MB_FLAGS_GFX 2048
30 ULONG mem_lower;
31 ULONG mem_upper;
32 ULONG bootdev;
33 STRPTR cmdline;
34 ULONG mods_count;
35 ULONG mods_addr;
36 ULONG elf_num;
37 ULONG elf_size;
38 ULONG elf_addr;
39 ULONG elf_shndx;
40 ULONG mmap_length;
41 ULONG mmap_addr;
42 ULONG drives_length;
43 ULONG drives_addr;
44 ULONG config_table;
45 STRPTR loader_name;
46 ULONG apm_table;
47 ULONG vbe_control_info;
48 ULONG vbe_mode_info;
49 UWORD vbe_mode;
50 UWORD vbe_if_seg;
51 UWORD vbe_if_off;
52 UWORD vbe_if_len;
55 struct mb_mmap {
56 ULONG size;
57 ULONG addr_low;
58 ULONG addr_high;
59 ULONG len_low;
60 ULONG len_high;
61 ULONG type;
62 #define MMAP_TYPE_RAM 1
63 #define MMAP_TYPE_RESERVED 2
64 #define MMAP_TYPE_ACPIDATA 3
65 #define MMAP_TYPE_ACPINVS 4
68 /* VBE controller information */
69 struct vbe_controller
71 unsigned char signature[4];
72 unsigned short version;
73 unsigned long oem_string;
74 unsigned long capabilities;
75 unsigned long video_mode;
76 unsigned short total_memory;
77 unsigned short oem_software_rev;
78 unsigned long oem_vendor_name;
79 unsigned long oem_product_name;
80 unsigned long oem_product_rev;
81 unsigned char reserved[222];
82 unsigned char oem_data[256];
83 } __attribute__ ((packed));
85 /* VBE mode information. */
86 struct vbe_mode
88 unsigned short mode_attributes;
89 unsigned char win_a_attributes;
90 unsigned char win_b_attributes;
91 unsigned short win_granularity;
92 unsigned short win_size;
93 unsigned short win_a_segment;
94 unsigned short win_b_segment;
95 unsigned long win_func;
96 unsigned short bytes_per_scanline;
98 /* >=1.2 */
99 unsigned short x_resolution;
100 unsigned short y_resolution;
101 unsigned char x_char_size;
102 unsigned char y_char_size;
103 unsigned char number_of_planes;
104 unsigned char bits_per_pixel;
105 unsigned char number_of_banks;
106 unsigned char memory_model;
107 unsigned char bank_size;
108 unsigned char number_of_image_pages;
109 unsigned char reserved0;
111 /* direct color */
112 unsigned char red_mask_size;
113 unsigned char red_field_position;
114 unsigned char green_mask_size;
115 unsigned char green_field_position;
116 unsigned char blue_mask_size;
117 unsigned char blue_field_position;
118 unsigned char reserved_mask_size;
119 unsigned char reserved_field_position;
120 unsigned char direct_color_mode_info;
122 /* >=2.0 */
123 unsigned long phys_base;
124 unsigned long reserved1;
125 unsigned short reversed2;
127 /* >=3.0 */
128 unsigned short linear_bytes_per_scanline;
129 unsigned char banked_number_of_image_pages;
130 unsigned char linear_number_of_image_pages;
131 unsigned char linear_red_mask_size;
132 unsigned char linear_red_field_position;
133 unsigned char linear_green_mask_size;
134 unsigned char linear_green_field_position;
135 unsigned char linear_blue_mask_size;
136 unsigned char linear_blue_field_position;
137 unsigned char linear_reserved_mask_size;
138 unsigned char linear_reserved_field_position;
139 unsigned long max_pixel_clock;
141 unsigned char reserved3[189];
142 } __attribute__ ((packed));
145 /* Structure in RAM at 0x1000 */
146 struct arosmb {
147 ULONG magic; /* Indicates if information is valid */
148 #define MBRAM_VALID 0x1337BABE
149 ULONG flags; /* Copy of the multiboot flags */
150 ULONG mem_lower; /* Amount of lowmem (Sub 1Mb) */
151 ULONG mem_upper; /* Amount of upper memory */
152 ULONG mmap_addr; /* Pointer to memory map */
153 ULONG mmap_len; /* size of memory map */
154 ULONG drives_addr; /* Pointer to drive information */
155 ULONG drives_len; /* Size of drive information */
156 char ldrname[30]; /* String of loadername */
157 char cmdline[200]; /* Commandline */
158 UWORD vbe_mode; /* VBE mode */
159 UBYTE vbe_palette_width; /* VBE palette width */
160 struct vbe_mode vmi; /* VBE mode information */
161 struct vbe_controller vci; /* VBE controller information */
164 struct mb_drive {
165 ULONG size;
166 UBYTE number;
167 UBYTE mode;
168 #define MB_MODE_CHS 0
169 #define MB_MODE_LBA 1
170 UWORD cyls;
171 UBYTE heads;
172 UBYTE secs;
173 UWORD ports[10]; /* Ugly, needs to be fixed */
176 #endif /* _MB_H */