]> rtime.felk.cvut.cz Git - l4.git/blob - kernel/fiasco/src/kern/ia32/boot_console-ia32-amd64.cpp
update
[l4.git] / kernel / fiasco / src / kern / ia32 / boot_console-ia32-amd64.cpp
1 INTERFACE[ia32,amd64]:
2
3 class Console;
4
5 class Boot_console
6 {
7 public:
8   static void init();
9 };
10
11 IMPLEMENTATION[ia32,amd64]:
12
13 #include <cstring>
14 #include <cstdio>
15
16 #include "kernel_console.h"
17 #include "keyb.h"
18 #include "mux_console.h"
19 #include "initcalls.h"
20 #include "koptions.h"
21 #include "static_init.h"
22 #include "vga_console.h"
23 #include "mem_layout.h"
24
25 static Static_object<Vga_console> vga;
26 static Static_object<Keyb> keyb;
27
28 IMPLEMENT FIASCO_INIT
29 void Boot_console::init()
30 {
31   keyb.init();
32   Kconsole::console()->register_console(keyb.get());
33
34   if (Koptions::o()->opt(Koptions::F_noscreen))
35     return;
36
37 #if defined(CONFIG_IRQ_SPINNER)
38   vga.init((unsigned long)Mem_layout::Adap_vram_cga_beg,80,20,true,true);
39 #else
40   vga.init((unsigned long)Mem_layout::Adap_vram_cga_beg,80,25,true,true);
41 #endif
42
43   if (vga->is_working())
44     Kconsole::console()->register_console(vga.get());
45
46 #if defined(CONFIG_IRQ_SPINNER)
47   for (int y = 20; y < 25; ++y)
48     for (int x = 0; x < 80; ++x)
49       vga->printchar(x, y, ' ', 8);
50 #endif
51 };
52