diff options
author | neal <neal> | 2008-06-29 12:29:22 +0000 |
---|---|---|
committer | neal <neal> | 2008-06-29 12:29:22 +0000 |
commit | b80a1c88a925afa8de0c6fd2b70d7bdecc15750e (patch) | |
tree | 50dfd2a711b19f16d7fab0357e52099821161556 /laden | |
parent | 487881d4231269e7cc5482ec9197c6a831df56ad (diff) |
2008-06-29 Neal H. Walfield <neal@gnu.org>
* ia32-cmain.c (debug_dump): Don't include redundant \n's in
debugging output.
(modules_relocate): Likewise.
* kip-fixup.c (kip_fixup): Likewise.
* laden.c (main): Likewise.
* loader.c (mem_check): Likewise.
(loader_add_region): Likewise.
(loader_regions_reserve): Likewise.
Diffstat (limited to 'laden')
-rw-r--r-- | laden/ChangeLog | 11 | ||||
-rw-r--r-- | laden/ia32-cmain.c | 10 | ||||
-rw-r--r-- | laden/kip-fixup.c | 18 | ||||
-rw-r--r-- | laden/laden.c | 4 | ||||
-rw-r--r-- | laden/loader.c | 20 |
5 files changed, 37 insertions, 26 deletions
diff --git a/laden/ChangeLog b/laden/ChangeLog index fd843ce..5a6555e 100644 --- a/laden/ChangeLog +++ b/laden/ChangeLog @@ -1,3 +1,14 @@ +2008-06-29 Neal H. Walfield <neal@gnu.org> + + * ia32-cmain.c (debug_dump): Don't include redundant \n's in + debugging output. + (modules_relocate): Likewise. + * kip-fixup.c (kip_fixup): Likewise. + * laden.c (main): Likewise. + * loader.c (mem_check): Likewise. + (loader_add_region): Likewise. + (loader_regions_reserve): Likewise. + 2008-06-27 Neal H. Walfield <neal@gnu.org> * output.h (debug): Don't define. diff --git a/laden/ia32-cmain.c b/laden/ia32-cmain.c index da02c2e..c2288c8 100644 --- a/laden/ia32-cmain.c +++ b/laden/ia32-cmain.c @@ -152,10 +152,10 @@ debug_dump (void) multiboot_info_t *mbi = (multiboot_info_t *) boot_info; if (CHECK_FLAG (mbi->flags, 9)) - debug (1, "Booted by %s\n", (char *) mbi->boot_loader_name); + debug (1, "Booted by %s", (char *) mbi->boot_loader_name); if (CHECK_FLAG (mbi->flags, 0)) - debug (1, "Memory: Lower %u KB, Upper %u KB\n", + debug (1, "Memory: Lower %u KB, Upper %u KB", mbi->mem_lower, mbi->mem_upper); if (CHECK_FLAG (mbi->flags, 3)) @@ -164,7 +164,7 @@ debug_dump (void) int nr; for (nr = 0; nr < mbi->mods_count; nr++) - debug (1, "Module %i: Start 0x%x, End 0x%x, Cmd %s\n", + debug (1, "Module %i: Start 0x%x, End 0x%x, Cmd %s", nr + 1, mod[nr].mod_start, mod[nr].mod_end, (char *) mod[nr].string); } @@ -178,7 +178,7 @@ debug_dump (void) (uint32_t) mmap < mbi->mmap_addr + mbi->mmap_length; mmap = (memory_map_t *) ((uint32_t) mmap + mmap->size + sizeof (mmap->size))) - debug (1, "Memory Map %i: Type %i, Base 0x%llx, Length 0x%llx\n", + debug (1, "Memory Map %i: Type %i, Base 0x%llx, Length 0x%llx", nr++, mmap->type, mmap->base_addr, mmap->length); } } @@ -230,7 +230,7 @@ modules_relocate (const char *name, /* Number of modules. */ l4_word_t count = ((l4_word_t) cookie) & ((1 << 16) - 1); l4_word_t offset = new_start - start; - debug (1, "Moving modules %d-%d from 0x%x-0x%x to 0x%x (+0x%x)\n", + debug (1, "Moving modules %d-%d from 0x%x-0x%x to 0x%x (+0x%x)", i, i + count, start, end, new_start, offset); while (count) { diff --git a/laden/kip-fixup.c b/laden/kip-fixup.c index d74632e..f26d3d4 100644 --- a/laden/kip-fixup.c +++ b/laden/kip-fixup.c @@ -34,8 +34,8 @@ kip_fixup (void) kip = (l4_kip_t) (((l4_word_t) kip) + 0x1000); if ((l4_word_t) kip >= kernel.high) - panic ("No KIP found in the kernel.\n"); - debug (1, "KIP found at address %p.\n", kip); + panic ("No KIP found in the kernel."); + debug (1, "KIP found at address %p.", kip); kip2 = kip + 0x1000; while ((l4_word_t) kip2 < kernel.high @@ -44,7 +44,7 @@ kip_fixup (void) kip2 = (l4_kip_t) (((l4_word_t) kip2) + 0x1000); if ((l4_word_t) kip2 < kernel.high) - panic ("More than one KIP found in kernel.\n"); + panic ("More than one KIP found in kernel."); l4_api_version_t api_version = l4_api_version_from (kip); switch (api_version.version) @@ -53,14 +53,14 @@ kip_fixup (void) case L4_API_VERSION_2: case L4_API_VERSION_2PP: /* Booting a v2 kernel. */ - debug (1, "Booting a v2 kernel.\n"); + debug (1, "Booting a v2 kernel."); break; #endif #ifdef _L4_X2 case L4_API_VERSION_X2: /* Booting an x2 kernel. */ - debug (1, "Booting an x2 kernel.\n"); + debug (1, "Booting an x2 kernel."); break; #endif @@ -76,12 +76,12 @@ kip_fixup (void) /* FIXME: We should be able to specify the UTCB area for the rootserver here, but L4 lacks this feature. */ - debug (1, "Sigma0: Low 0x%x, High 0x%x, IP 0x%x, SP 0x%x\n", + debug (1, "Sigma0: Low 0x%x, High 0x%x, IP 0x%x, SP 0x%x", sigma0.low, sigma0.high, sigma0.ip, sigma0.sp); if (kip->sigma1.low) - debug (1, "Sigma1: Low 0x%x, High 0x%x, IP 0x%x, SP 0x%x\n", + debug (1, "Sigma1: Low 0x%x, High 0x%x, IP 0x%x, SP 0x%x", sigma1.low, sigma1.high, sigma1.ip, sigma1.sp); - debug (1, "Root: Low 0x%x, High 0x%x, IP 0x%x, SP 0x%x\n", + debug (1, "Root: Low 0x%x, High 0x%x, IP 0x%x, SP 0x%x", rootserver.low, rootserver.high, rootserver.ip, rootserver.sp); /* Load the memory map into the KIP. */ @@ -99,7 +99,7 @@ kip_fixup (void) #endif for (nr = 0; nr < memory_map_size; nr++) - debug (1, "Memory Map %i: Type %i/%i, Low 0x%llx, High 0x%llx\n", + debug (1, "Memory Map %i: Type %i/%i, Low 0x%llx, High 0x%llx", nr + 1, memory_map[nr].type, memory_map[nr].subtype, (unsigned long long) (memory_map[nr].low << 10), (unsigned long long) (memory_map[nr].high << 10)); diff --git a/laden/laden.c b/laden/laden.c index 4e78f2b..70d1ba8 100644 --- a/laden/laden.c +++ b/laden/laden.c @@ -200,7 +200,7 @@ main (int argc, char *argv[]) { parse_args (argc, argv); - debug (1, "%s " PACKAGE_VERSION "\n", program_name); + debug (1, "%s " PACKAGE_VERSION, program_name); find_components (); @@ -210,7 +210,7 @@ main (int argc, char *argv[]) kip_fixup (); - debug (1, "Entering kernel at address 0x%x...\n", kernel.ip); + debug (1, "Entering kernel at address 0x%x...", kernel.ip); output_deinit (); diff --git a/laden/loader.c b/laden/loader.c index 5cec081..0651c07 100644 --- a/laden/loader.c +++ b/laden/loader.c @@ -81,7 +81,7 @@ mem_check (const char *name, l4_word_t start, l4_word_t end) && end <= l4_memory_desc_high (memdesc)) { debug (1, "Memory 0x%x-0x%x fits in conventional memory map %d " - "(0x%x-0x%x)\n", + "(0x%x-0x%x)", start, end, nr, l4_memory_desc_low (memdesc), l4_memory_desc_high (memdesc)); @@ -100,7 +100,7 @@ mem_check (const char *name, l4_word_t start, l4_word_t end) && end > l4_memory_desc_high (memdesc))) { debug (1, "Memory 0x%x-0x%x conflicts with non-conventional " - "memory map %d (0x%x-0x%x)\n", + "memory map %d (0x%x-0x%x)", start, end, nr, l4_memory_desc_low (memdesc), l4_memory_desc_high (memdesc)); @@ -158,7 +158,7 @@ loader_add_region (const char *name, l4_word_t start, l4_word_t end, relocate_region rr, void *cookie, int desc_type) { - debug (1, "Protected Region: %s (0x%x - 0x%x)\n", name, start, end); + debug (1, "Protected Region: %s (0x%x - 0x%x)", name, start, end); if (start >= end) panic ("Region %s has a start address following the end address", name); @@ -212,7 +212,7 @@ loader_add_region (const char *name, l4_word_t start, l4_word_t end, used_regions[i].name, mstart, mend); debug (1, "%s (0x%x - 0x%x) conflicts with %s (0x%x - 0x%x);" - " moving latter\n", + " moving latter", used_regions[region].name, start, end, used_regions[i].name, mstart, mend); @@ -223,7 +223,7 @@ loader_add_region (const char *name, l4_word_t start, l4_word_t end, l4_word_t mem_low = l4_memory_desc_low (memdesc); l4_word_t mem_high = l4_memory_desc_high (memdesc); - debug (1, "consider memory_map: %d, %d, 0x%x-0x%x\n", + debug (1, "consider memory_map: %d, %d, 0x%x-0x%x", j, memory_map[j].type, mem_low, mem_high); if (memory_map[j].type == L4_MEMDESC_CONVENTIONAL @@ -232,7 +232,7 @@ loader_add_region (const char *name, l4_word_t start, l4_word_t end, there is a non-conflicting, contiguous space of SIZE bytes. */ { - debug (1, "Considering memory (0x%x-0x%x)\n", + debug (1, "Considering memory (0x%x-0x%x)", mem_low, mem_high); /* Start with the lowest address. */ @@ -255,20 +255,20 @@ loader_add_region (const char *name, l4_word_t start, l4_word_t end, /* There is overlap, take the end of the conflicting region as our new start and restart. */ { - debug (1, "Can't use 0x%x, %s(0x%x-0x%x) in way\n", + debug (1, "Can't use 0x%x, %s(0x%x-0x%x) in way", ns, used_regions[k].name, used_regions[k].start, used_regions[k].end); /* Try the page aligned after the end of this region. */ ns = (used_regions[k].end + 1 + 0xfff) & ~0xfff; - debug (1, "Trying address 0x%x\n", ns); + debug (1, "Trying address 0x%x", ns); goto restart; } if (k == nr_regions && ns + msize - 1 <= mem_high) /* NS is a good new start! */ { - debug (1, "Moving %s(%d) from 0x%x-0x%x to 0x%x-0x%x\n", + debug (1, "Moving %s(%d) from 0x%x-0x%x to 0x%x-0x%x", used_regions[i].name, i, used_regions[i].start, used_regions[i].end, ns, ns + msize - 1); @@ -329,7 +329,7 @@ loader_regions_reserve (void) /* Round up. */ l4_word_t end = ((used_regions[i].end + 0x3ff - 1) & ~0x3ff) - 1; - debug (1, "Reserving memory 0x%x-0x%x (%s)\n", + debug (1, "Reserving memory 0x%x-0x%x (%s)", start, end, used_regions[i].name); add_memory_map (start, end, used_regions[i].desc_type, 0); |