From 4cf1d784cb119f1f9e9075b316ffffb6a945dc55 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Wed, 28 Nov 2012 12:07:34 +0800 Subject: [PATCH] Kernel/x86_64 - Cleanup and pondering mboot framebuffer --- KernelLand/Kernel/arch/x86_64/main.c | 3 ++- KernelLand/Kernel/arch/x86_64/proc.c | 7 ++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/KernelLand/Kernel/arch/x86_64/main.c b/KernelLand/Kernel/arch/x86_64/main.c index a855a474..f4c4a818 100644 --- a/KernelLand/Kernel/arch/x86_64/main.c +++ b/KernelLand/Kernel/arch/x86_64/main.c @@ -53,7 +53,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 +86,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'; diff --git a/KernelLand/Kernel/arch/x86_64/proc.c b/KernelLand/Kernel/arch/x86_64/proc.c index 48504a8b..2a38d621 100644 --- a/KernelLand/Kernel/arch/x86_64/proc.c +++ b/KernelLand/Kernel/arch/x86_64/proc.c @@ -457,9 +457,8 @@ void Proc_ClearThread(tThread *Thread) tTID Proc_NewKThread(void (*Fcn)(void*), void *Data) { Uint rsp; - tThread *newThread, *cur; + tThread *newThread; - cur = Proc_GetCurThread(); newThread = Threads_CloneTCB(0); if(!newThread) return -1; @@ -536,11 +535,9 @@ tTID Proc_Clone(Uint Flags) */ tThread *Proc_SpawnWorker(void (*Fcn)(void*), void *Data) { - tThread *new, *cur; + tThread *new; Uint stack_contents[3]; - cur = Proc_GetCurThread(); - // Create new thread new = Threads_CloneThreadZero(); if(!new) { -- 2.20.1