Nigel
5051b8903c
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)
29 lines
561 B
C
29 lines
561 B
C
#pragma once
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
|
|
|
|
extern "C" const uint32_t kernel_begin;
|
|
extern "C" const uint32_t kernel_end;
|
|
struct BootInfoBlock {
|
|
bool MapIsInvalid;
|
|
uint32_t bootDeviceID ;
|
|
|
|
uint32_t GrubModuleCount;
|
|
|
|
bool ValidSymbolTable;
|
|
uint32_t SymbolTableAddr;
|
|
uint32_t SymbolTabSize;
|
|
uint32_t SymbolStrSize;
|
|
|
|
bool ValidELFHeader;
|
|
|
|
bool EnabledVBE;
|
|
|
|
bool PhysicalMemoryMapAvailable;
|
|
|
|
};
|
|
|
|
// Put the BootInfoBlock 1MB above the kernel.
|
|
const uint32_t BootInfoBlock_pptr = kernel_end - 0xC0000000 + 0x1000;
|