2020-02-06 20:20:58 +00:00
|
|
|
#include <kernel/chroma.h>
|
|
|
|
|
2020-08-22 23:48:49 +00:00
|
|
|
/************************
|
|
|
|
*** Team Kitty, 2020 ***
|
|
|
|
*** Chroma ***
|
|
|
|
***********************/
|
|
|
|
|
|
|
|
/* This file is the entry point to the system.
|
|
|
|
* It dictates the order of operations of everything the kernel actually does.
|
|
|
|
* If a function isn't fired here, directly or indirectly, it is not run.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-04-11 21:59:39 +00:00
|
|
|
size_t KernelAddr = (size_t) &LoadAddr;
|
|
|
|
size_t KernelEnd = (size_t) &end;
|
|
|
|
|
2020-02-06 20:20:58 +00:00
|
|
|
|
|
|
|
void _start(void) {
|
|
|
|
|
2020-04-11 21:59:39 +00:00
|
|
|
|
2020-02-06 20:20:58 +00:00
|
|
|
SerialPrintf("\r\nBooting Chroma..\r\n");
|
2020-04-11 21:59:39 +00:00
|
|
|
SerialPrintf("Kernel loaded at 0x%p, ends at 0x%p, is %d bytes long.\r\n", KernelAddr, KernelEnd, KernelEnd - KernelAddr);
|
|
|
|
|
|
|
|
ListMemoryMap();
|
|
|
|
|
2020-02-06 20:20:58 +00:00
|
|
|
InitPrint();
|
|
|
|
|
2020-04-11 21:59:39 +00:00
|
|
|
WriteStringWithFont("Initty Testing");
|
|
|
|
|
2020-02-06 20:20:58 +00:00
|
|
|
SetupInitialGDT();
|
|
|
|
SetupIDT();
|
|
|
|
InitInterrupts();
|
|
|
|
|
2020-08-23 01:32:47 +00:00
|
|
|
PCIEnumerate();
|
|
|
|
|
2020-02-06 20:20:58 +00:00
|
|
|
InitMemoryManager();
|
|
|
|
MemoryTest();
|
|
|
|
|
|
|
|
InitPaging();
|
|
|
|
|
2020-04-11 21:59:39 +00:00
|
|
|
|
2020-02-06 20:20:58 +00:00
|
|
|
for(;;) { }
|
|
|
|
|
|
|
|
}
|