Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/amd64/stand/prekern Fix a few error messages, and b...



details:   https://anonhg.NetBSD.org/src/rev/64978e9e16cc
branches:  trunk
changeset: 827467:64978e9e16cc
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sun Oct 29 11:38:43 2017 +0000

description:
Fix a few error messages, and be a little more verbose.

diffstat:

 sys/arch/amd64/stand/prekern/elf.c |  14 +++++++-------
 sys/arch/amd64/stand/prekern/mm.c  |   5 ++++-
 2 files changed, 11 insertions(+), 8 deletions(-)

diffs (73 lines):

diff -r d4d877b40525 -r 64978e9e16cc sys/arch/amd64/stand/prekern/elf.c
--- a/sys/arch/amd64/stand/prekern/elf.c        Sun Oct 29 11:28:30 2017 +0000
+++ b/sys/arch/amd64/stand/prekern/elf.c        Sun Oct 29 11:38:43 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: elf.c,v 1.4 2017/10/29 11:28:30 maxv Exp $     */
+/*     $NetBSD: elf.c,v 1.5 2017/10/29 11:38:43 maxv Exp $     */
 
 /*
  * Copyright (c) 2017 The NetBSD Foundation, Inc. All rights reserved.
@@ -285,7 +285,7 @@
        eif.shdr = (Elf_Shdr *)((uint8_t *)eif.ehdr + eif.ehdr->e_shoff);
 
        if (elf_check_header() == -1) {
-               fatal("elf_build_info: wrong kernel ELF header");
+               fatal("elf_build_head: wrong kernel ELF header");
        }
 }
 
@@ -508,10 +508,10 @@
        /* Locate the section names */
        j = eif.ehdr->e_shstrndx;
        if (j == SHN_UNDEF) {
-               fatal("elf_build_info: shstrtab not found");
+               fatal("elf_build_boot: shstrtab not found");
        }
        if (j >= eif.ehdr->e_shnum) {
-               fatal("elf_build_info: wrong shstrtab index");
+               fatal("elf_build_boot: wrong shstrtab index");
        }
        eif.shstrtab = (char *)((uint8_t *)eif.ehdr + eif.shdr[j].sh_offset);
        eif.shstrsz = eif.shdr[j].sh_size;
@@ -522,7 +522,7 @@
                        break;
        }
        if (i == eif.ehdr->e_shnum) {
-               fatal("elf_build_info: symtab not found");
+               fatal("elf_build_boot: symtab not found");
        }
        eif.symtab = (Elf_Sym *)((uint8_t *)eif.ehdr + eif.shdr[i].sh_offset);
        eif.symcnt = eif.shdr[i].sh_size / sizeof(Elf_Sym);
@@ -530,10 +530,10 @@
        /* Also locate the string table */
        j = eif.shdr[i].sh_link;
        if (j == SHN_UNDEF || j >= eif.ehdr->e_shnum) {
-               fatal("elf_build_info: wrong strtab index");
+               fatal("elf_build_boot: wrong strtab index");
        }
        if (eif.shdr[j].sh_type != SHT_STRTAB) {
-               fatal("elf_build_info: wrong strtab type");
+               fatal("elf_build_boot: wrong strtab type");
        }
        eif.strtab = (char *)((uint8_t *)eif.ehdr + eif.shdr[j].sh_offset);
        eif.strsz = eif.shdr[j].sh_size;
diff -r d4d877b40525 -r 64978e9e16cc sys/arch/amd64/stand/prekern/mm.c
--- a/sys/arch/amd64/stand/prekern/mm.c Sun Oct 29 11:28:30 2017 +0000
+++ b/sys/arch/amd64/stand/prekern/mm.c Sun Oct 29 11:38:43 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mm.c,v 1.6 2017/10/29 11:28:30 maxv Exp $      */
+/*     $NetBSD: mm.c,v 1.7 2017/10/29 11:38:43 maxv Exp $      */
 
 /*
  * Copyright (c) 2017 The NetBSD Foundation, Inc. All rights reserved.
@@ -385,7 +385,10 @@
 {
        memset(&bootspace, 0, sizeof(bootspace));
        mm_map_head();
+       print_state(true, "Head region mapped");
        mm_map_segments();
+       print_state(true, "Segments mapped");
        mm_map_boot();
+       print_state(true, "Boot region mapped");
 }
 



Home | Main Index | Thread Index | Old Index