root/Whitix/trunk/kernel/main.c
| Revision 2054, 1.9 KB (checked in by mwhitworth, 3 years ago) |
|---|
| Line | |
|---|---|
| 1 | /* This file is part of Whitix. |
| 2 | * |
| 3 | * Whitix is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License as published by |
| 5 | * the Free Software Foundation; either version 2 of the License, or |
| 6 | * (at your option) any later version. |
| 7 | * |
| 8 | * Whitix is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
| 12 | * |
| 13 | * You should have received a copy of the GNU General Public License |
| 14 | * along with Whitix; if not, write to the Free Software |
| 15 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 16 | * |
| 17 | */ |
| 18 | |
| 19 | #include <console.h> |
| 20 | #include <sched.h> |
| 21 | #include <string.h> |
| 22 | #include <task.h> |
| 23 | #include <typedefs.h> |
| 24 | #include <fs/vfs.h> |
| 25 | #include <time.h> |
| 26 | #include <print.h> |
| 27 | #include <sched.h> |
| 28 | #include <sections.h> |
| 29 | |
| 30 | /* Init declarations. */ |
| 31 | extern int EarlyConsoleInit(); |
| 32 | extern int ArchInit(); |
| 33 | extern int ThrEarlyInit(); |
| 34 | extern int TimeInit(); |
| 35 | extern int ShutdownInit(); |
| 36 | extern int ModulesBootLoad(); |
| 37 | extern int SlabInit(); |
| 38 | extern int VmInit(); |
| 39 | extern int IcInit(); |
| 40 | extern int MMapInit(); |
| 41 | extern int VfsInit(); |
| 42 | extern int LoadInit(); |
| 43 | extern int DevFsInit(); |
| 44 | extern int DeviceInit(); |
| 45 | extern int SlabInfoInit(); |
| 46 | |
| 47 | void KernelMain() |
| 48 | { |
| 49 | EarlyConsoleInit(); |
| 50 | ArchInit(); |
| 51 | ThrEarlyInit(); |
| 52 | TimeInit(); |
| 53 | ShutdownInit(); |
| 54 | |
| 55 | /* Set up the device-related subsystems. */ |
| 56 | IcInit(); |
| 57 | |
| 58 | /* Once we've set up the ICFS framework, there are several |
| 59 | * areas of Whitix (like the slab code) that need to expose |
| 60 | * their internal information. |
| 61 | */ |
| 62 | |
| 63 | SlabInfoInit(); |
| 64 | |
| 65 | ModuleInfoInit(); |
| 66 | |
| 67 | ThrInit(); |
| 68 | |
| 69 | VfsInit(); |
| 70 | DevFsInit(); |
| 71 | DeviceInit(); |
| 72 | |
| 73 | MiscInit(); |
| 74 | |
| 75 | LoadInit(); |
| 76 | |
| 77 | GcInit(); |
| 78 | SaveInit(); |
| 79 | |
| 80 | StartInit(); |
| 81 | |
| 82 | /* This is where the idle thread idles, after returning from StartInit in startup.c */ |
| 83 | ThrIdleFunc(); |
| 84 | } |
Note: See TracBrowser
for help on using the browser.
