Cleanup in elf.c with .bss section clean; adm command mounts cdrom instead of floppy...
[ZeXOS.git] / kernel / core / main.c
blob211023f4988d68d39ecb159888253135a3fefe3f
1 /*
2 * ZeX/OS
3 * Copyright (C) 2007 Tomas 'ZeXx86' Jedrzejek (zexx86@zexos.org)
4 * Copyright (C) 2008 Tomas 'ZeXx86' Jedrzejek (zexx86@zexos.org)
5 * Copyright (C) 2009 Tomas 'ZeXx86' Jedrzejek (zexx86@zexos.org)
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #include <build.h>
23 #include <system.h>
25 #ifdef ARCH_i386
26 #include <multiboot/grub.h>
28 int main (multiboot_info_t *boot_info)
30 if (!boot_info->flags & 2)
31 return 0;
33 /* get memory in MB */
34 mem_ext = ((boot_info->mem_lower + boot_info->mem_upper) / 1024);
36 /* first initialize all needed things */
37 init ((char *) boot_info->cmdline);
39 #else
40 int main ()
42 /* first initialize all needed things */
43 init ((char *) "");
44 #endif
45 /* kernel loop */
46 for (;;)
47 schedule ();
49 return 0;