2 * Acess2 x86_64 Project
9 #define MAX_PMEMMAP_ENTS 16
12 extern void Desctab_Init(void);
13 extern void MM_InitVirt(void);
14 extern void Heap_Install(void);
15 extern int Time_Setup(void);
17 extern void MM_InitPhys_Multiboot(tMBoot_Info *MBoot);
20 void kmain(Uint MbMagic, void *MbInfoPtr);
23 char *gsBootCmdLine = NULL;
26 void kmain(Uint MbMagic, void *MbInfoPtr)
30 LogF("%s\r\n", gsBuildInfo);
35 *(Uint16*)(KERNEL_BASE|0xB8000) = 0x1F00|'C';
41 // Adjust Multiboot structure address
42 mbInfo = (void*)( (Uint)MbInfoPtr + KERNEL_BASE );
43 gsBootCmdLine = (char*)( (Uint)mbInfo->CommandLine + KERNEL_BASE);
44 MM_InitPhys_Multiboot( mbInfo ); // Set up physical memory manager
47 Panic("Multiboot magic invalid %08x, expected %08x\n",
48 MbMagic, MULTIBOOT_MAGIC);
52 Log("gsBootCmdLine = '%s'", gsBootCmdLine);
54 *(Uint16*)(KERNEL_BASE|0xB8000) = 0x1F00|'D';
57 *(Uint16*)(KERNEL_BASE|0xB8000) = 0x1F00|'E';
61 *(Uint16*)(KERNEL_BASE|0xB8000) = 0x1F00|'F';
63 // Load Virtual Filesystem
64 Log_Log("Arch", "Starting VFS...");
67 *(Uint16*)(KERNEL_BASE|0xB8000) = 0x1F00|'Z';
69 // Pass on to Independent Loader
70 Log_Log("Arch", "Starting system");
71 System_Init(gsBootCmdLine);
73 // Sleep forever (sleeping beauty)
78 void Arch_LoadBootModules(void)
83 void StartupPrint(const char *String)