Module Name:    src
Committed By:   maxv
Date:           Sun Oct 29 11:38:43 UTC 2017

Modified Files:
        src/sys/arch/amd64/stand/prekern: elf.c mm.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/amd64/stand/prekern/elf.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/amd64/stand/prekern/mm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/amd64/stand/prekern/elf.c
diff -u src/sys/arch/amd64/stand/prekern/elf.c:1.4 src/sys/arch/amd64/stand/prekern/elf.c:1.5
--- src/sys/arch/amd64/stand/prekern/elf.c:1.4	Sun Oct 29 11:28:30 2017
+++ src/sys/arch/amd64/stand/prekern/elf.c	Sun Oct 29 11:38:43 2017
@@ -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 @@ elf_build_head(vaddr_t headva)
 	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 @@ elf_build_boot(vaddr_t bootva, paddr_t b
 	/* 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 @@ elf_build_boot(vaddr_t bootva, paddr_t b
 			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 @@ elf_build_boot(vaddr_t bootva, paddr_t b
 	/* 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;

Index: src/sys/arch/amd64/stand/prekern/mm.c
diff -u src/sys/arch/amd64/stand/prekern/mm.c:1.6 src/sys/arch/amd64/stand/prekern/mm.c:1.7
--- src/sys/arch/amd64/stand/prekern/mm.c:1.6	Sun Oct 29 11:28:30 2017
+++ src/sys/arch/amd64/stand/prekern/mm.c	Sun Oct 29 11:38:43 2017
@@ -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 @@ mm_map_kernel()
 {
 	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");
 }
 

Reply via email to