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)
This commit is contained in:
		@ -1,6 +1,6 @@
 | 
			
		||||
#include "MBI_MMap.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
void mapMultibootMemoryMap( MemoryInfo* memInfo , multiboot_info_t *mbt) {
 | 
			
		||||
 | 
			
		||||
    printf("mmap_addr = 0x%x, mmap_length = 0x%x\n", (unsigned) mbt->mmap_addr , (unsigned) mbt->mmap_length );
 | 
			
		||||
@ -23,13 +23,13 @@ void mapMultibootMemoryMap( MemoryInfo* memInfo , multiboot_info_t *mbt) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
/**
 | 
			
		||||
 * @brief Debug Verbose functions
 | 
			
		||||
 * 
 | 
			
		||||
 * @param mmap 
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
void print_Multiboot_memory_Map(multiboot_memory_map_t* mmap) {
 | 
			
		||||
    printf(
 | 
			
		||||
        "size = 0x%x, base_addr = 0x%x%08x, length = 0x%x%08x, type = 0x%x\n",
 | 
			
		||||
@ -41,3 +41,4 @@ void print_Multiboot_memory_Map(multiboot_memory_map_t* mmap) {
 | 
			
		||||
        (unsigned) mmap->type
 | 
			
		||||
    );
 | 
			
		||||
}
 | 
			
		||||
*/
 | 
			
		||||
@ -1,16 +1,18 @@
 | 
			
		||||
#pragma once 
 | 
			
		||||
#include <stddef.h>
 | 
			
		||||
#include "../../multiboot.h"
 | 
			
		||||
//#include "../../multiboot.h"
 | 
			
		||||
#include "../memoryinfo.h"
 | 
			
		||||
 | 
			
		||||
void initialise_available_regions(uint32_t memoryMapAddr, uint32_t memoryMapLastAddr, uint32_t* memoryBitMap, int* used_blocks);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
void mapMultibootMemoryMap( MemoryInfo* memInfo , multiboot_info_t *mbt);
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
/**
 | 
			
		||||
 * @brief Debug Verbose Functions
 | 
			
		||||
 * 
 | 
			
		||||
 * @param mmap 
 | 
			
		||||
 */
 | 
			
		||||
/*
 | 
			
		||||
void print_Multiboot_memory_Map(multiboot_memory_map_t* mmap);
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user