From 7aea8d20ec8816759c8439fc39d90579fc37e18b Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Wed, 27 Aug 2014 23:10:04 +0200 Subject: cleanup and switched logging to vesa mode console! --- kernel/mem.c | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) (limited to 'kernel/mem.c') diff --git a/kernel/mem.c b/kernel/mem.c index 68880be..b2e674e 100644 --- a/kernel/mem.c +++ b/kernel/mem.c @@ -1,6 +1,9 @@ #define MEM_PRINT_MEMORYMAP #include "kernel.h" +#include "../lib/logger/log.h" // logger facilities +#define FOOLOS_MODULE_NAME "mem" + //! 8 blocks per byte #define PMMNGR_BLOCKS_PER_BYTE 8 @@ -208,11 +211,10 @@ void mem_test(int start, int end, int steps) void mem_init(uint16_t *memmap,uint16_t entries) { - scr_put_string("mem: the memory map contains "); - scr_put_hex(entries); - scr_put_string_nl(" entries."); + log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"the memory map contains %d entries.",entries); // hardcoded memory bitmap!!??! + // todo: fix! _mmngr_memory_map=0x9000; mem_free_blocks=0; pmmngr_init (); @@ -229,21 +231,11 @@ void mem_init(uint16_t *memmap,uint16_t entries) #ifdef MEM_PRINT_MEMORYMAP - scr_put_hex(memmap[8]); - scr_put_string(" : "); - - - scr_put_hex(memmap[1]); - scr_put_string(" "); - scr_put_hex(memmap[0]); - scr_put_string(" "); - - scr_put_string(" - "); - scr_put_hex(memmap[5]); - scr_put_string(" "); - scr_put_hex(memmap[4]); - - scr_put_string_nl(""); + log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"%x : 0x%08x - 0x%08x", + memmap[8], + (((uint32_t)memmap[1])<<16)+memmap[0], + (((uint32_t)memmap[1])<<16)+memmap[0] + +(((uint32_t)memmap[5])<<16)+memmap[4]); #endif -- cgit v1.2.3