X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FKernel%2Farch%2Fx86_64%2Fmain.c;h=bd8bb4a4b04c16cf51ec6a8248b71306796fe831;hb=2d8cb31dfcae4c3097d4b1271186378b91038f01;hp=a855a47434edd6982a1937b38d7f21defc37ae84;hpb=b7f014bb53b817944bb14640ebf8cfc755d4ce56;p=tpg%2Facess2.git diff --git a/KernelLand/Kernel/arch/x86_64/main.c b/KernelLand/Kernel/arch/x86_64/main.c index a855a474..bd8bb4a4 100644 --- a/KernelLand/Kernel/arch/x86_64/main.c +++ b/KernelLand/Kernel/arch/x86_64/main.c @@ -19,7 +19,6 @@ // === IMPORTS === extern void Desctab_Init(void); extern void MM_InitVirt(void); -extern void Heap_Install(void); extern int Time_Setup(void); extern char gKernelEnd[]; @@ -53,7 +52,6 @@ void kmain(Uint MbMagic, void *MbInfoPtr) // Adjust Multiboot structure address mbInfo = (void*)( (Uint)MbInfoPtr + KERNEL_BASE ); gsBootCmdLine = (char*)( (Uint)mbInfo->CommandLine + KERNEL_BASE); - // TODO: ref above? nPMemMapEnts = Multiboot_LoadMemoryMap(mbInfo, KERNEL_BASE, pmemmap, MAX_PMEMMAP_ENTS, KERNEL_LOAD, (tVAddr)&gKernelEnd - KERNEL_BASE ); @@ -87,6 +85,8 @@ void kmain(Uint MbMagic, void *MbInfoPtr) Log_Log("Arch", "Starting VFS..."); VFS_Init(); + // Multiboot_InitFramebuffer(mbInfo); + gaArch_BootModules = Multiboot_LoadModules(mbInfo, KERNEL_BASE, &giArch_NumBootModules); *(Uint16*)(KERNEL_BASE|0xB8000) = 0x1F00|'Z'; @@ -117,13 +117,14 @@ void Arch_LoadBootModules(void) // Unmap and free numPages = (gaArch_BootModules[i].Size + ((Uint)gaArch_BootModules[i].Base&0xFFF) + 0xFFF) >> 12; - MM_UnmapHWPages( (tVAddr)gaArch_BootModules[i].Base, numPages ); + MM_UnmapHWPages( gaArch_BootModules[i].Base, numPages ); for( j = 0; j < numPages; j++ ) MM_DerefPhys( gaArch_BootModules[i].PBase + (j << 12) ); + // TODO: What the fuck? if( (tVAddr) gaArch_BootModules[i].ArgString < KERNEL_BASE ) - MM_UnmapHWPages( (tVAddr)gaArch_BootModules[i].ArgString, 2 ); + MM_UnmapHWPages( gaArch_BootModules[i].ArgString, 2 ); } Log_Log("Arch", "Boot modules loaded"); if( gaArch_BootModules )