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);
39 Log("gsBootCmdLine = '%s'", gsBootCmdLine);
41 MM_InitPhys_Multiboot( mbInfo ); // Set up physical memory manager
44 Panic("Multiboot magic invalid %08x, expected %08x\n",
45 MbMagic, MULTIBOOT_MAGIC);
49 Log("gsBootCmdLine = '%s'", gsBootCmdLine);
51 *(Uint16*)(0xB8000) = 0x1F00|'D';
54 *(Uint16*)(0xB8000) = 0x1F00|'E';
55 Log_Log("Arch", "Starting threading...");
59 *(Uint16*)(0xB8000) = 0x1F00|'F';
61 Log_Log("Arch", "Starting VFS...");
62 // Load Virtual Filesystem
65 *(Uint16*)(0xB8000) = 0x1F00|'Z';
66 *(Uint16*)(0xB8002) = 0x1F00|'Z';
67 *(Uint16*)(0xB8004) = 0x1F00|'Z';
68 *(Uint16*)(0xB8006) = 0x1F00|'Z';
70 // Pass on to Independent Loader
71 Log_Log("Arch", "Starting system");
72 System_Init(gsBootCmdLine);
74 // Sleep forever (sleeping beauty)
79 void Arch_LoadBootModules(void)
84 void StartupPrint(char *String)