BarinkOS/source/kernel/kernel.h
Nigel 5051b8903c Divided the kernel into seperate distinct phases
The first stage after GRUB will be Pre-Kernel. This stage will organize the
information we receive from the bootloader. (in our case that will be grub)

The second stage is for now called early_main. The program will at this
point already be running in virtual higher-half / higher-quarter address space.
The goal of the second stage is to set up the kernel in such a way that we are
ready to jump in to usermode.

The third stage is for now called kernel_main. This stage will jump us into
usermode and load the startup programs.

- Added a GRUB entry for tests
- Started writing the pre-kernel stage
- Removed knowledge of multiboot from early_main
- Edited the linkerscript to link variables in pre-kernel to
	lower address space. ( from 1MB and up)
2022-08-22 21:16:34 +02:00

41 lines
838 B
C

#pragma once
extern "C"
{
#include "Lib/string.h"
}
#include "definitions.h"
#include "Drivers/VGA/VBE.h"
#include "Terminal/kterm.h"
#include "bootinfo.h"
#include "Memory/PhysicalMemoryManager.h"
#include "Memory/memoryinfo.h"
#include "Memory/VirtualMemoryManager.h"
#include "Memory/GDT/gdtc.h"
#include "Interrupts/idt/idt.h"
#include "Drivers/PIT/pit.h"
#include "io.h"
#include "cpu.h"
#include "serial.h"
#include "time.h"
#include "SuperVisorTerminal/superVisorTerminal.h"
#include "PreKernel/bootstructure.h"
#define CHECK_FLAG(flag, bit) ( flag & (1 << bit ))
#define PANIC(message) {return;}
void map_multiboot_info_structure(unsigned long addr);
extern "C" void kernel_main ();
extern "C" uint32_t boot_page_directory;
extern "C" uint32_t multiboot_page_table;
const uint32_t KERNEL_BASE_ADDR = 0xC0000000;