use USER_CPPFLAGS
[AROS.git] / arch / all-native / bootconsole / init_multiboot.c
blob877c3722a6116403d4d852b0c9576c0959c3049a
1 /*
2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Parse multiboot data and init console.
6 */
8 #include <aros/multiboot.h>
9 #include <hardware/vbe.h>
11 #include <bootconsole.h>
13 #include "console.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;
31 scr_Type = SCR_TEXT;
32 txt_Clear();
33 break;
35 default:
36 /* Graphical framebuffer, size in pixels */
37 scr_Type = SCR_GFX;
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);
52 }*/
53 else
54 /* Fallback to default, VGA text mode */
55 con_InitVGA();