This commit is contained in:
Adrien Bourmault 2019-03-18 17:49:34 +01:00
parent e7909bcdf7
commit 78e72e6c8a
3 changed files with 5 additions and 4 deletions

View File

@ -30,7 +30,7 @@
// //
// Returns a pointer to the first entry of the memory map // Returns a pointer to the first entry of the memory map
// //
multiboot_memory_map_t *GetMemoryMap(void); void *GetMemoryMap(void);
// //
// Initializes the memory map structure // Initializes the memory map structure

View File

@ -40,8 +40,6 @@ noreturn void StartKern(multiboot_info_t *mbInfo, int mbMagic)
//Memory mapping //Memory mapping
InitMemoryMap(mbInfo); InitMemoryMap(mbInfo);
KernLog("InitMemoryMap : %p, %x\n", GetCurMemMap().addr, GetCurMemMap().length );
// We're out // We're out
KernLog("Yup, we have magic : %x", mbMagic); KernLog("Yup, we have magic : %x", mbMagic);
CrashSystem(); //yay CrashSystem(); //yay

View File

@ -24,14 +24,17 @@
#include <kernel/mm.h> #include <kernel/mm.h>
#include <multiboot/multiboot.h> #include <multiboot/multiboot.h>
#include <kernel/term.h>
void InitMemoryMap(multiboot_info_t *mbInfo) void InitMemoryMap(multiboot_info_t *mbInfo)
{ {
memTab.addr = (void*)mbInfo->mmap_addr; memTab.addr = (void*)mbInfo->mmap_addr;
memTab.length = (int)mbInfo->mmap_length; memTab.length = (int)mbInfo->mmap_length;
KernLog("[InitMemoryMap] Address: %p, Length: %d\n", GetCurMemMap().addr, GetCurMemMap().length );
} }
multiboot_memory_map_t *GetMemoryMap(void) void *GetMemoryMap(void)
{ {
return (void*)GetCurMemMap().addr; return (void*)GetCurMemMap().addr;
} }