Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/amd64/stand/prekern Sync comments with reality.



details:   https://anonhg.NetBSD.org/src/rev/d10cabde4594
branches:  trunk
changeset: 358329:d10cabde4594
user:      maxv <maxv%NetBSD.org@localhost>
date:      Fri Dec 22 07:37:27 2017 +0000

description:
Sync comments with reality.

diffstat:

 sys/arch/amd64/stand/prekern/locore.S |  13 ++++++-------
 sys/arch/amd64/stand/prekern/trap.S   |  17 ++++++++---------
 2 files changed, 14 insertions(+), 16 deletions(-)

diffs (65 lines):

diff -r 737f140dbcce -r d10cabde4594 sys/arch/amd64/stand/prekern/locore.S
--- a/sys/arch/amd64/stand/prekern/locore.S     Fri Dec 22 07:19:02 2017 +0000
+++ b/sys/arch/amd64/stand/prekern/locore.S     Fri Dec 22 07:37:27 2017 +0000
@@ -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 @@
  * ------------------+
  *                  (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). */
diff -r 737f140dbcce -r d10cabde4594 sys/arch/amd64/stand/prekern/trap.S
--- a/sys/arch/amd64/stand/prekern/trap.S       Fri Dec 22 07:19:02 2017 +0000
+++ b/sys/arch/amd64/stand/prekern/trap.S       Fri Dec 22 07:37:27 2017 +0000
@@ -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 @@
 
 /*
  * 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)



Home | Main Index | Thread Index | Old Index