2019-06-27 18:57:54 +00:00
|
|
|
/************************
|
|
|
|
*** Team Kitty, 2019 ***
|
2019-07-17 01:04:04 +00:00
|
|
|
*** Sync ***
|
2019-06-27 18:57:54 +00:00
|
|
|
***********************/
|
2019-04-03 21:46:58 +00:00
|
|
|
|
2019-07-22 21:32:35 +00:00
|
|
|
/*
|
|
|
|
* Sync main..
|
|
|
|
*
|
|
|
|
* Going off the back of Syncboot, the UEFI bootloader which currently only supports x86_64,
|
|
|
|
* this kernel is to be rewritten. The kernel is started in Long Mode, with interrupts enabled.
|
|
|
|
*
|
|
|
|
* Therefore, most of the checks are no longer needed, as they are performed by Syncboot for us.
|
|
|
|
* So, this becomes an exercise in time saving.
|
|
|
|
*
|
2019-07-17 01:04:04 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2019-06-25 21:31:26 +00:00
|
|
|
//#include <stdio.h>
|
2019-06-27 18:57:54 +00:00
|
|
|
#include <kernel.h>
|
2019-06-25 21:31:26 +00:00
|
|
|
|
|
|
|
void gdb_end() {} /* GDB Debugging stump */
|
|
|
|
|
2019-07-23 22:01:12 +00:00
|
|
|
int kernel_main(FILELOADER_PARAMS* FLOP) {
|
2019-07-22 21:32:35 +00:00
|
|
|
/* The kernel is started in 64-bit Long Mode by Syncboot. */
|
|
|
|
/* Here, we start by drawing a splash, then loading a GDT and IDT into the placeholder UEFI gives us. */
|
|
|
|
|
2019-04-07 14:34:15 +00:00
|
|
|
|
2019-07-22 21:32:35 +00:00
|
|
|
/* Not sure how well serial would work in UEFI. */
|
|
|
|
// TODO: look at this.
|
2019-07-23 22:01:12 +00:00
|
|
|
PrepareSystem(FLOP);
|
2019-07-22 21:32:35 +00:00
|
|
|
|
2019-06-25 21:31:26 +00:00
|
|
|
gdb_end(); /* The first important step. Waypoint it for gdb debugging. */
|
|
|
|
|
|
|
|
return 0;
|
2019-04-03 21:46:58 +00:00
|
|
|
}
|
2019-06-25 21:31:26 +00:00
|
|
|
|