From 4b24541f245688c7524f1b66de27423eb9226d3a Mon Sep 17 00:00:00 2001 From: Vercas Date: Mon, 9 Nov 2015 11:34:28 +0000 Subject: [PATCH] Removed debug messages Hopefully no longer needed. --- beelzebub/arc/amd64/src/ap_bootstrap.s | 22 ++++++++++---------- beelzebub/arc/x86/src/kernel.cpp | 28 +++++++++++++------------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/beelzebub/arc/amd64/src/ap_bootstrap.s b/beelzebub/arc/amd64/src/ap_bootstrap.s index a65afed..71fa18a 100644 --- a/beelzebub/arc/amd64/src/ap_bootstrap.s +++ b/beelzebub/arc/amd64/src/ap_bootstrap.s @@ -52,7 +52,7 @@ ApBootstrapBegin: mov edi, edx ; The NX bit support (bit 20) and PGE (bit 26) are needed. - debugchar 'A' + ;debugchar 'A' ;breakpoint dummy mov eax, cr4 @@ -68,13 +68,13 @@ ApBootstrapBegin: mov cr4, eax ; And flush. - debugchar 'B' + ;debugchar 'B' mov eax, [BootstrapPml4Address - ApBootstrapBegin + PHYSADDR] mov cr3, eax ; Load the PML4. - debugchar 'C' + ;debugchar 'C' mov ecx, 0xC0000080 rdmsr @@ -90,7 +90,7 @@ ApBootstrapBegin: wrmsr ; Writes the value to IA32_EFER - debugchar 'D' + ;debugchar 'D' mov eax, cr0 bts eax, 0 @@ -98,12 +98,12 @@ ApBootstrapBegin: mov cr0, eax ; Protected mode and paging. - debugchar 'E' + ;debugchar 'E' lgdt [cs:ApBootstrapGdt64R - ApBootstrapBegin + PHYSADDR] ; Load a GDT which contains long mode segments. - debugchar 'F' + ;debugchar 'F' jmp 0x08:.long - ApBootstrapBegin + PHYSADDR ; Long jump into protected mode! @@ -111,7 +111,7 @@ ApBootstrapBegin: bits 64 ; Then long mode directly. .long: - debugchar 'G' + ;debugchar 'G' mov ax, 0x10 mov ds, ax @@ -122,25 +122,25 @@ bits 64 ; Then long mode directly. ; Make sure the data segments are correct. ; The following code involves data fetching, so better safe than sorry? - debugchar 'H' + ;debugchar 'H' mov rax, KernelGdtPointer lgdt [rax] ; Load the GDT for domain 0. - debugchar 'I' + ;debugchar 'I' mov rax, ApStackTopPointer mov rsp, qword [rax] ; The entry point will surely need a stack. - debugchar 'J' + ;debugchar 'J' mov rax, ApInitializationLock mov dword [rax], 0 ; Tell the BSP that initialization is complete. - debugchar 'K' + ;debugchar 'K' mov rax, kmain_ap jmp rax diff --git a/beelzebub/arc/x86/src/kernel.cpp b/beelzebub/arc/x86/src/kernel.cpp index 4546287..039e95a 100644 --- a/beelzebub/arc/x86/src/kernel.cpp +++ b/beelzebub/arc/x86/src/kernel.cpp @@ -612,15 +612,15 @@ Handle InitializeProcessingUnits() memcpy((void *)bootstrapVaddr, &ApBootstrapBegin, (uintptr_t)&ApBootstrapEnd - (uintptr_t)&ApBootstrapBegin); // This makes sure the code can be executed by the AP. - msg("AP bootstrap code @ %Xp:%us%n" - , &ApBootstrapBegin, (size_t)((uintptr_t)&ApBootstrapEnd - (uintptr_t)&ApBootstrapBegin)); + //msg("AP bootstrap code @ %Xp:%us%n" + // , &ApBootstrapBegin, (size_t)((uintptr_t)&ApBootstrapEnd - (uintptr_t)&ApBootstrapBegin)); KernelGdtPointer = GdtRegister::Retrieve(); BREAKPOINT_SET_AUX((int volatile *)((uintptr_t)&ApBreakpointCookie - (uintptr_t)&ApBootstrapBegin + bootstrapVaddr)); int_cookie_t const int_cookie = Interrupts::PushEnable(); - msg("Auxiliary breakpoint pointer @ %Xp.%n", breakpointEscapedAux); + //msg("Auxiliary breakpoint pointer @ %Xp.%n", breakpointEscapedAux); MainTerminal->WriteFormat("%n PML4 addr: %XP, GDT addr: %Xp; BSP LAPIC ID: %u4" , BootstrapPml4Address, KernelGdtPointer.Pointer, Lapic::GetId()); @@ -671,7 +671,7 @@ Handle InitializeProcessingUnits() , "Failed to unmap unneeded page at %Xp (%XP) for init code: %H%n" , bootstrapVaddr, bootstrapPaddr, res); - msg("Got %us cores.", Cpu::Count.Load()); + //msg("Got %us cores.", Cpu::Count.Load()); return HandleResult::Okay; } @@ -711,7 +711,7 @@ Handle InitializeAp(uint32_t const lapicId ApStackTopPointer = vaddr + PageSize; ApInitializationLock = 1; - msg("Stack for AP #%us is at %Xp (%Xp, %XP).%n", apIndex, ApStackTopPointer, vaddr, paddr); + //msg("Stack for AP #%us is at %Xp (%Xp, %XP).%n", apIndex, ApStackTopPointer, vaddr, paddr); memset((void *)vaddr, 0xF0, PageSize); // Make sure it's writable. @@ -724,17 +724,17 @@ Handle InitializeAp(uint32_t const lapicId //for(;;) CpuInstructions::Halt(); - msg("Sending INIT IPI to %u4...", lapicId); + //msg("Sending INIT IPI to %u4...", lapicId); Lapic::SendIpi(initIcr); - msg(" Waiting..."); + //msg(" Waiting..."); Wait(10 * 1000); // Much more than the recommended amount, but this may be handy for busy // virtualized environments. - msg(" Done.%n"); + //msg(" Done.%n"); LapicIcr startupIcr = LapicIcr(0) .SetDeliveryMode(InterruptDeliveryModes::StartUp) @@ -743,29 +743,29 @@ Handle InitializeAp(uint32_t const lapicId .SetVector(0x1000 >> 12) .SetDestination(lapicId); - msg("Sending first startup IPI to %u4...", lapicId); + //msg("Sending first startup IPI to %u4...", lapicId); Lapic::SendIpi(startupIcr); - msg(" Waiting..."); + //msg(" Waiting..."); Wait(10 * 1000); - msg(" Done.%n"); + //msg(" Done.%n"); if (ApInitializationLock != 0) { // It should be ready. Let's try again. - msg("Sending second startup IPI to %u4...", lapicId); + //msg("Sending second startup IPI to %u4...", lapicId); Lapic::SendIpi(startupIcr); - msg(" Waiting..."); + //msg(" Waiting..."); Wait(1000 * 1000); - msg(" Done.%n"); + //msg(" Done.%n"); if (ApInitializationLock != 0) return HandleResult::Timeout;