Module Name:    src
Committed By:   maxv
Date:           Thu Jan 11 10:38:13 UTC 2018

Modified Files:
        src/sys/arch/amd64/amd64: machdep.c
        src/sys/arch/x86/include: pmap.h

Log Message:
Add ist0 to pcpu_entry.


To generate a diff of this commit:
cvs rdiff -u -r1.287 -r1.288 src/sys/arch/amd64/amd64/machdep.c
cvs rdiff -u -r1.73 -r1.74 src/sys/arch/x86/include/pmap.h

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.287 src/sys/arch/amd64/amd64/machdep.c:1.288
--- src/sys/arch/amd64/amd64/machdep.c:1.287	Thu Jan 11 10:30:26 2018
+++ src/sys/arch/amd64/amd64/machdep.c	Thu Jan 11 10:38:13 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.287 2018/01/11 10:30:26 maxv Exp $	*/
+/*	$NetBSD: machdep.c,v 1.288 2018/01/11 10:38:13 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.287 2018/01/11 10:30:26 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.288 2018/01/11 10:38:13 maxv Exp $");
 
 /* #define XENDEBUG_LOW  */
 
@@ -522,7 +522,11 @@ cpu_init_tss(struct cpu_info *ci)
 	cputss->tss.tss_iobase = IOMAP_INVALOFF << 16;
 
 	/* DDB stack */
+#ifdef __HAVE_PCPU_AREA
+	p = (vaddr_t)&pcpuarea->ent[cid].ist0;
+#else
 	p = uvm_km_alloc(kernel_map, PAGE_SIZE, 0, UVM_KMF_WIRED|UVM_KMF_ZERO);
+#endif
 	cputss->tss.tss_ist[0] = p + PAGE_SIZE - 16;
 
 	/* double fault */

Index: src/sys/arch/x86/include/pmap.h
diff -u src/sys/arch/x86/include/pmap.h:1.73 src/sys/arch/x86/include/pmap.h:1.74
--- src/sys/arch/x86/include/pmap.h:1.73	Fri Jan  5 08:04:21 2018
+++ src/sys/arch/x86/include/pmap.h	Thu Jan 11 10:38:13 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.73 2018/01/05 08:04:21 maxv Exp $	*/
+/*	$NetBSD: pmap.h,v 1.74 2018/01/11 10:38:13 maxv Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -160,6 +160,7 @@ struct bootspace {
 struct pcpu_entry {
 	uint8_t gdt[MAXGDTSIZ];
 	uint8_t tss[PAGE_SIZE];
+	uint8_t ist0[PAGE_SIZE];
 	uint8_t ist1[PAGE_SIZE];
 	uint8_t ist2[PAGE_SIZE];
 } __packed;

Reply via email to