summaryrefslogblamecommitdiff
path: root/Source/Kernel/Core/.kmain.wtf.cpp.swp
blob: 48496789a403da20ee7bdaa678050878b012ea4a (plain) (tree)
1
2
3
4
5
6
7
8
9
10









                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
b0VIM 7.2�X�J��<alexis211cartman~alexis211/Programmation/Melon/Source/Kernel/Core/kmain.wtf.cpputf-8
3210#"! Utp�iadk#i�����_>���~\;�
�
�
�
�
�
�
Q
P



��S7	��@�
�
�
o
:
7
6
 
�	�	�	�	J		������x=�:���|nmC����gED ����tVU.
������sO@=%#"}	PANIC("END OF KMAIN");	}		*kvt << ".";		Task::currentThread->sleep(1000);	while(1) {	asm volatile("sti");	*kvt << "OK.\n";	Task::initialize(String((char*)mbd->cmdline));	*kvt << "OK.\n> Initializing multitasking...";	Dev::registerDevice(new Timer());	*kvt << "OK.\n> Initializing PIT...";	Dev::registerDevice(vgaout);	*kvt << "\n> Registering vgaout...";			(s32int)PhysMem::total();	*kvt << "- Free frames : " << (s32int)PhysMem::free() << "/" << 	*kvt << "OK.\n";	Mem::createHeap();	*kvt << "OK.\n> Creating heap...";	PhysMem::removeTemporaryPages();	*kvt << "> GDT OK. Cleaning page directory...";	GDT::init();	*kvt << "OK.\n- Total ram : " << (s32int)(totalRam / 1024) << "k.\n";	PhysMem::initPaging(totalRam);	u32int totalRam = ((mbd->mem_upper + 1024) * 1024);	*kvt << "OK.\n> Initializing paging...";	IDT::init();	*kvt << "> Loading IDT...";	*kvt << "- Placement address : " << (u32int)Mem::placementAddress << "\n";	*kvt << "- Modules@" << (u32int)mbd->mods_addr << ", mbd@" << (u32int)mbd << "\n";	*kvt << "- Kernel command line @ " << (u32int)mbd->cmdline << "\n";	*kvt << "- Lower ram : " << (s32int)mbd->mem_lower << "k, upper : " << (s32int)mbd->mem_upper << "k.\n";	*kvt << "* Kernel initializing in HIGHER HALF!\n";	kvt->map(melonLogoLines + 4);	VirtualTerminal *kvt = new VirtualTerminal(12, 40, 0, 7);	//Create a VT for logging what kernel does	melonLogoVT->map(2);	}		}			melonLogoVT->putChar(i, j, melonLogo[i][j]);		for (int j = 0; j < melonLogoCols; j++) {	for (int i = 0; i < melonLogoLines; i++) {	VirtualTerminal *melonLogoVT = new VirtualTerminal(melonLogoLines, melonLogoCols, 7, 0);	//Create a VT for handling the Melon bootup logo	Disp::setDisplay(vgaout);	VGATextOutput *vgaout = new VGATextOutput();	//Create text output	}			Mem::placementAddress = mods[i].mod_end + 0x1000;		if (mods[i].mod_end > Mem::placementAddress) 		mods[i].mod_end += 0xC0000000;		mods[i].mod_start += 0xC0000000;	for (u32int i = 0; i < mbd->mods_count; i++) {	module_t *mods = (module_t*)mbd->mods_addr;	mbd->cmdline += 0xC0000000; mbd->mods_addr += 0xC0000000; //Take stuff into acount	Mem::placementAddress = (u32int)&end;	//Setup placement address so that we can use new without overwriting modules		}		PANIC("Error with multiboot header.");		Disp::setDisplay(vgaout);		VGATextOutput *vgaout = new VGATextOutput();		Mem::placementAddress = (u32int)&end;	//Setup basic stuff so that PANIC will work	if (magic != MULTIBOOT_BOOTLOADER_MAGIC) {	DEBUG("Entering kmain.");void kmain(multiboot_info_t* mbd, u32int magic) {extern "C" void kmain(multiboot_info_t* mbd, u32int magic);extern u32int end;	//Placement address#include <Ressources/logo.cd>#include <Library/wchar.class.h>#include <Library/String.class.h>#include <SyscallManager/IDT.ns.h>#include <TaskManager/Task.ns.h>#include <MemoryManager/GDT.ns.h>#include <MemoryManager/PageAlloc.ns.h>#include <MemoryManager/PhysMem.ns.h>#include <VTManager/VirtualTerminal.class.h>#include <DeviceManager/Dev.ns.h>#include <DeviceManager/Disp.ns.h>#include <Devices/Timer.class.h>#include <Devices/Display/VGATextOutput.class.h>#include <Core/multiboot.wtf.h>#include <Core/common.wtf.h>//This file contains the kernel's main procedure