2 * Acess2 x86_64 Project
8 extern void Desctab_Init(void);
9 extern void MM_InitVirt(void);
10 extern void Heap_Install(void);
11 extern void Threads_Init(void);
12 //extern void Time_Setup(void);
13 extern void System_Init(char *Commandline);
15 extern void MM_InitPhys_Multiboot(tMBoot_Info *MBoot);
20 char *gsBootCmdLine = NULL;
23 void kmain(Uint MbMagic, void *MbInfoPtr)
30 *(Uint16*)(0xB8000) = 0x1F00|'C';
36 // Adjust Multiboot structure address
37 mbInfo = (void*)( (Uint)MbInfoPtr + KERNEL_BASE );
38 gsBootCmdLine = (char*)( (Uint)mbInfo->CommandLine + KERNEL_BASE);
40 MM_InitPhys_Multiboot( mbInfo ); // Set up physical memory manager
43 Panic("Multiboot magic invalid %08x, expected %08x\n",
44 MbMagic, MULTIBOOT_MAGIC);
48 *(Uint16*)(0xB8000) = 0x1F00|'D';
51 *(Uint16*)(0xB8000) = 0x1F00|'E';
52 Log_Log("Arch", "Starting threading...");
56 *(Uint16*)(0xB8000) = 0x1F00|'F';
58 Log_Log("Arch", "Starting VFS...");
59 // Load Virtual Filesystem
62 *(Uint16*)(0xB8000) = 0x1F00|'Z';
63 *(Uint16*)(0xB8002) = 0x1F00|'Z';
64 *(Uint16*)(0xB8004) = 0x1F00|'Z';
65 *(Uint16*)(0xB8006) = 0x1F00|'Z';
67 // Pass on to Independent Loader
68 Log_Log("Arch", "Starting system");
69 System_Init(gsBootCmdLine);
71 // Sleep forever (sleeping beauty)
76 void Arch_LoadBootModules(void)
81 void StartupPrint(char *String)