diff options
author | Guido Günther <agx@sigxcpu.org> | 2011-06-19 14:17:53 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2011-06-19 14:29:03 +0200 |
commit | bb6bd2f7ea37c471c9a6747e1473c7ad1f00a499 (patch) | |
tree | 1ca093019ea99b2a358243fad64e6284cf77b21e /ext2load/loader.c | |
parent | 83171b606a49b7e7b68c86901a12f7e5eded96aa (diff) |
Reduced amount of #ifdef'ed code
Diffstat (limited to 'ext2load/loader.c')
-rw-r--r-- | ext2load/loader.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/ext2load/loader.c b/ext2load/loader.c index 44203b6..1feb6ba 100644 --- a/ext2load/loader.c +++ b/ext2load/loader.c @@ -20,6 +20,7 @@ #include "arcboot.h" #include <subarch.h> +#include <debug.h> #define KSEG0ADDR(addr) (((addr) & 0x1fffffff) | 0x80000000) @@ -76,9 +77,7 @@ void InitMalloc(void) { MEMORYDESCRIPTOR *current = NULL; ULONG stack = (ULONG) ¤t; -#ifdef DEBUG - printf("stack starts at: 0x%lx\n\r", stack); -#endif + debug_printf("stack starts at: 0x%lx\n\r", stack); current = ArcGetMemoryDescriptor(current); if(! current ) { @@ -96,10 +95,8 @@ void InitMalloc(void) ULONG start = KSEG0ADDR(current->BasePage * PAGE_SIZE); ULONG end = start + (current->PageCount * PAGE_SIZE); -#if DEBUG - printf("Free Memory(%u) segment found at (0x%lx,0x%lx).\n\r", + debug_printf("Free Memory(%u) segment found at (0x%lx,0x%lx).\n\r", current->Type, start, end); -#endif /* Leave some space for our stack */ if ((stack >= start) && (stack < end)) @@ -118,10 +115,8 @@ void InitMalloc(void) + kernel_load[SUBARCH].reserved ))) end = kernel_load[SUBARCH].base; if (end > start) { -#ifdef DEBUG - printf("Adding %lu bytes at 0x%lx to the list of available memory\n\r", + debug_printf("Adding %lu bytes at 0x%lx to the list of available memory\n\r", end-start, start); -#endif arclib_malloc_add(start, end - start); } } @@ -561,10 +556,8 @@ void _start(LONG argc, CHAR *argv[], CHAR *envp[]) if (OSLoadPartition == NULL) Fatal("Invalid load partition\n\r"); -#if DEBUG - printf("OSLoadPartition: %s\n\r", OSLoadPartition); - printf("OSLoadFilename: %s\n\r", OSLoadFilename); -#endif + debug_printf("OSLoadPartition: %s\n\r", OSLoadPartition); + debug_printf("OSLoadFilename: %s\n\r", OSLoadFilename); /* * XXX: let's play stupid for now: assume /etc/arcboot.conf * is on OSLoadPartition |