diff options
| author | Michal Idziorek <m.i@gmx.at> | 2014-08-27 23:10:04 +0200 |
|---|---|---|
| committer | Michal Idziorek <m.i@gmx.at> | 2014-08-27 23:10:04 +0200 |
| commit | 7aea8d20ec8816759c8439fc39d90579fc37e18b (patch) | |
| tree | f59d354ea1ad128929e0e810da0fa78bab00537b /kernel/mem.c | |
| parent | d680d4c641c085e7a31d19fe2d01f528e96d2ced (diff) | |
cleanup and switched logging to vesa mode console!
Diffstat (limited to 'kernel/mem.c')
| -rw-r--r-- | kernel/mem.c | 28 |
1 files changed, 10 insertions, 18 deletions
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 |
