Module Name:    src
Committed By:   maxv
Date:           Fri Dec 22 07:37:27 UTC 2017

Modified Files:
        src/sys/arch/amd64/stand/prekern: locore.S trap.S

Log Message:
Sync comments with reality.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/amd64/stand/prekern/locore.S
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/amd64/stand/prekern/trap.S

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/locore.S
diff -u src/sys/arch/amd64/stand/prekern/locore.S:1.6 src/sys/arch/amd64/stand/prekern/locore.S:1.7
--- src/sys/arch/amd64/stand/prekern/locore.S:1.6	Sun Nov 26 10:21:20 2017
+++ src/sys/arch/amd64/stand/prekern/locore.S	Fri Dec 22 07:37:27 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.6 2017/11/26 10:21:20 maxv Exp $	*/
+/*	$NetBSD: locore.S,v 1.7 2017/12/22 07:37:27 maxv Exp $	*/
 
 /*
  * Copyright (c) 1998, 2000, 2007, 2008, 2016, 2017 The NetBSD Foundation, Inc.
@@ -349,18 +349,17 @@ no_NOX:
  * ------------------+
  *                  (5)
  *
- * Virtual address space of the prekern:
- * +---------------+----------+------------------+-------------+
- * | PREKERN IMAGE |**UNUSED**| BOOTSTRAP TABLES | ISA I/O MEM |
- * +---------------+----------+------------------+-------------+
+ * The virtual address space is the same, since it is identity-mapped (va = pa).
+ * However, the KERNEL IMAGE is mapped as read-only: the prekern reads it, but
+ * won't write to it. (Needed when relocating the kernel.)
  *
  * PROC0 STK is obviously not linked as a page level. It just happens to be
  * caught between L4 and L3.
  *
  * (PROC0 STK + L4 + L3 + L2 + L1) is later referred to as BOOTSTRAP TABLES.
  *
- * Important note: the kernel segments are properly 4k-aligned
- * (see kern.ldscript), so there's no need to enforce alignment.
+ * Important note: the prekern segments are properly 4k-aligned
+ * (see prekern.ldscript), so there's no need to enforce alignment.
  */
 
 	/* Find end of the prekern image; brings us on (1). */

Index: src/sys/arch/amd64/stand/prekern/trap.S
diff -u src/sys/arch/amd64/stand/prekern/trap.S:1.1 src/sys/arch/amd64/stand/prekern/trap.S:1.2
--- src/sys/arch/amd64/stand/prekern/trap.S:1.1	Tue Oct 10 09:29:14 2017
+++ src/sys/arch/amd64/stand/prekern/trap.S	Fri Dec 22 07:37:27 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.S,v 1.1 2017/10/10 09:29:14 maxv Exp $	*/
+/*	$NetBSD: trap.S,v 1.2 2017/12/22 07:37:27 maxv Exp $	*/
 
 /*
  * Copyright (c) 2017 The NetBSD Foundation, Inc. All rights reserved.
@@ -178,15 +178,14 @@ IDTVEC_END(exceptions)
 
 /*
  * Arguments pushed on the stack:
- *  tf_trapno
- *  tf_err: Dummy inserted if not defined
- *  tf_rip
- *  tf_cs
- *  tf_rflags
- *  tf_rsp
- *  tf_ss
+ *  sf_trapno
+ *  sf_err  (dummy inserted if not defined)
+ *  sf_rip
+ *  sf_cs
+ *  sf_rflags
+ *  sf_rsp
+ *  sf_ss
  */
-
 NENTRY(alltraps)
 	movq	%rsp,%rdi
 	call	_C_LABEL(trap)

Reply via email to