]> rtime.felk.cvut.cz Git - l4.git/blob - kernel/fiasco/src/kern/ia32/__main.cpp
update
[l4.git] / kernel / fiasco / src / kern / ia32 / __main.cpp
1 INTERFACE[ia32,amd64]:
2 #include "types.h"
3 #include "initcalls.h"
4
5 IMPLEMENTATION[ia32,amd64]:
6 #include "boot_info.h"
7 #include "initcalls.h"
8
9 #include <cstdlib>
10 #include <cstdio>
11 #include <construction.h>
12
13 void kernel_main(void);
14
15 extern "C" FIASCO_FASTCALL FIASCO_INIT
16 void
17 __main(Address /*mbi_phys*/, unsigned aflag, unsigned checksum_ro)
18 {
19   /* set global to be used in the constructors */
20   Boot_info::set_flags(aflag);
21   Boot_info::set_checksum_ro(checksum_ro);
22   Boot_info::init();
23
24   atexit(&static_destruction);
25   static_construction();
26
27   kernel_main();
28   exit(0);
29 }