2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
5 Desc: Parse multiboot data and init console.
8 #include <aros/multiboot.h>
9 #include <hardware/vbe.h>
11 #include <bootconsole.h>
15 void con_InitMultiboot(struct multiboot
*mb
)
17 if (mb
->flags
& MB_FLAGS_CMDLINE
)
18 con_InitSerial((char *)(unsigned long)mb
->cmdline
);
20 if (mb
->flags
& MB_FLAGS_FB
)
22 /* Framebuffer was given, use it */
23 scr_FrameBuffer
= (void *)(unsigned long)mb
->framebuffer_addr
;
25 switch (mb
->framebuffer_type
)
27 case MB_FRAMEBUFFER_TEXT
:
28 /* Text framebuffer, size in characters */
29 scr_Width
= mb
->framebuffer_width
;
30 scr_Height
= mb
->framebuffer_height
;
36 /* Graphical framebuffer, size in pixels */
38 fb_Init(mb
->framebuffer_width
, mb
->framebuffer_height
, mb
->framebuffer_bpp
, mb
->framebuffer_pitch
);
42 * TODO: enable this only after testing text mode handling in initVESAScreen() below.
43 * VGA text mode may have valid VESA mode descriptor. If there is a bug in that routine,
44 * text mode display will screw up, and probably crash.
46 else if (mb->flags & MB_FLAGS_GFX)
48 struct vbe_control_info *vbc = (struct vbe_control_info *)mb->vbe_control_info;
49 struct vbe_mode_info *vbm = (struct vbe_mode_info *)mb->vbe_mode_info;
51 con_InitVESA(vbc->version, vbm);
54 /* Fallback to default, VGA text mode */