* x86 Kernel Main
* arch/x86/main.c
*/
-#include <common.h>
+#include <acess.h>
#include <mboot.h>
#include <init.h>
#include <mm_virt.h>
extern void MM_PreinitVirtual();
extern void MM_Install(tMBoot_Info *MBoot);
extern void MM_InstallVirtual();
-extern void Proc_Start();
+extern void Threads_Init();
+extern int Time_Setup();
extern Uint Proc_Clone(Uint *Err, Uint Flags);
-extern void Proc_Sleep();
-extern void Proc_Exit();
+extern void Threads_Sleep();
+extern void Threads_Exit();
// === GLOBALS ===
Log("Starting Multitasking...");
// Start Multitasking
- Proc_Start();
+ Threads_Init();
+
+ // Start Timers
+ Time_Setup();
Log("Starting VFS...");
// Load Virtual Filesystem
VFS_Init();
- Log("Loading Modules...");
+ Log("Loading Modules... (%i of them)", MbInfo->ModuleCount);
// Load initial modules
mods = (void*)( MbInfo->Modules + KERNEL_BASE );
- for(i=0;i<MbInfo->ModuleCount;i++)
+ Log("MbInfo = %p", MbInfo);
+ for( i = 0; i < MbInfo->ModuleCount; i ++ )
{
// Adjust into higher half
mods[i].Start += KERNEL_BASE;
{
Warning("Unable to load module\n");
}
+ Log("Done. (MbInfo = %p)", MbInfo);
}
// Pass on to Independent Loader
System_Init( (char*)(MbInfo->CommandLine + KERNEL_BASE) );
// Sleep forever (sleeping beauty)
- for(;;) Proc_Sleep();
+ for(;;)
+ Threads_Sleep();
return 0;
}