Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/amd64/amd64 Use bootspace.head.va instead of the di...



details:   https://anonhg.NetBSD.org/src/rev/cbd95f3544aa
branches:  trunk
changeset: 357164:cbd95f3544aa
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sun Oct 29 10:25:28 2017 +0000

description:
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.

diffstat:

 sys/arch/amd64/amd64/machdep.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r b07dc67adf04 -r cbd95f3544aa sys/arch/amd64/amd64/machdep.c
--- a/sys/arch/amd64/amd64/machdep.c    Sun Oct 29 10:07:08 2017 +0000
+++ b/sys/arch/amd64/amd64/machdep.c    Sun Oct 29 10:25:28 2017 +0000
@@ -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 @@
        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;



Home | Main Index | Thread Index | Old Index