Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/i386/i386 Define killkpt, and don't use _RELOC. Sam...
details: https://anonhg.NetBSD.org/src/rev/e60504eaaaf3
branches: trunk
changeset: 345235:e60504eaaaf3
user: maxv <maxv%NetBSD.org@localhost>
date: Sat May 14 06:49:34 2016 +0000
description:
Define killkpt, and don't use _RELOC. Same as amd64.
diffstat:
sys/arch/i386/i386/locore.S | 22 +++++++++++++++-------
1 files changed, 15 insertions(+), 7 deletions(-)
diffs (57 lines):
diff -r 194e2eb4427e -r e60504eaaaf3 sys/arch/i386/i386/locore.S
--- a/sys/arch/i386/i386/locore.S Sat May 14 00:33:02 2016 +0000
+++ b/sys/arch/i386/i386/locore.S Sat May 14 06:49:34 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.S,v 1.117 2016/05/13 14:03:00 maxv Exp $ */
+/* $NetBSD: locore.S,v 1.118 2016/05/14 06:49:34 maxv Exp $ */
/*
* Copyright-o-rama!
@@ -128,7 +128,7 @@
*/
#include <machine/asm.h>
-__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.117 2016/05/13 14:03:00 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.118 2016/05/14 06:49:34 maxv Exp $");
#include "opt_compat_oldboot.h"
#include "opt_copy_symtab.h"
@@ -196,6 +196,17 @@
addl $PAGE_SIZE,%eax ; /* next phys page */ \
loop 1b ;
+/*
+ * killkpt - Destroy a kernel page table
+ * ebx = page table address
+ * ecx = number of pages to destroy
+ */
+#define killkpt \
+1: movl $0,(PDE_SIZE-4)(%ebx) ; /* upper bits (for PAE) */ \
+ movl $0,(%ebx) ; \
+ addl $PDE_SIZE,%ebx ; \
+ loop 1b ;
+
#ifdef XEN
/*
@@ -647,7 +658,7 @@
andl $~PGOFSET,%edx
/* Skip the first MB. */
- movl $_RELOC(KERNTEXTOFF),%eax
+ movl $(KERNTEXTOFF - KERNBASE),%eax
movl %eax,%ecx
shrl $(PGSHIFT-2),%ecx /* ((n >> PGSHIFT) << 2) for # PDEs */
#ifdef PAE
@@ -743,10 +754,7 @@
movl _C_LABEL(nkptp)+1*4,%ecx
leal (PROC0_PDIR_OFF)(%esi),%ebx /* old, phys address of PDIR */
addl $(KERNBASE), %ebx /* new, virt address of PDIR */
-1: movl $0,(PDE_SIZE-4)(%ebx) /* upper bits (for PAE) */
- movl $0,(%ebx)
- addl $PDE_SIZE,%ebx
- loop 1b
+ killkpt
/* Relocate atdevbase. */
movl $KERNBASE,%edx
Home |
Main Index |
Thread Index |
Old Index