Module Name: src
Committed By: maxv
Date: Sun Oct 29 10:25:28 UTC 2017
Modified Files:
src/sys/arch/amd64/amd64: machdep.c
Log Message:
Use bootspace.head.va instead of the direct map. Otherwise there's the
assumption that the offsets contained in sh_offset in physical memory are
equal to the offsets in virtual memory, which won't be true in the future.
To generate a diff of this commit:
cvs rdiff -u -r1.273 -r1.274 src/sys/arch/amd64/amd64/machdep.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/amd64/machdep.c
diff -u src/sys/arch/amd64/amd64/machdep.c:1.273 src/sys/arch/amd64/amd64/machdep.c:1.274
--- src/sys/arch/amd64/amd64/machdep.c:1.273 Sun Oct 29 10:01:21 2017
+++ src/sys/arch/amd64/amd64/machdep.c Sun Oct 29 10:25:28 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.273 2017/10/29 10:01:21 maxv Exp $ */
+/* $NetBSD: machdep.c,v 1.274 2017/10/29 10:25:28 maxv Exp $ */
/*
* Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
@@ -110,7 +110,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.273 2017/10/29 10:01:21 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.274 2017/10/29 10:25:28 maxv Exp $");
/* #define XENDEBUG_LOW */
@@ -1481,8 +1481,8 @@ init_x86_64_ksyms(void)
symtab = lookup_bootinfo(BTINFO_SYMTAB);
if (symtab) {
#ifdef KASLR
- tssym = PMAP_DIRECT_MAP((paddr_t)symtab->ssym);
- tesym = PMAP_DIRECT_MAP((paddr_t)symtab->esym);
+ tssym = bootspace.head.va;
+ tesym = bootspace.head.va; /* (unused...) */
#else
tssym = (vaddr_t)symtab->ssym + KERNBASE;
tesym = (vaddr_t)symtab->esym + KERNBASE;