Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Use the same instruction layout to map the ISA I/O....



details:   https://anonhg.NetBSD.org/src/rev/be33d0ffa821
branches:  trunk
changeset: 345662:be33d0ffa821
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sat Jun 04 10:19:09 2016 +0000

description:
Use the same instruction layout to map the ISA I/O. No functional
change.

The comment is still wrong: we are not on (4), we are actually below
the kernel area in physical memory. I'll fix that later.

diffstat:

 sys/arch/amd64/amd64/locore.S |  16 +++++++++-------
 sys/arch/i386/i386/locore.S   |  18 ++++++++++--------
 2 files changed, 19 insertions(+), 15 deletions(-)

diffs (83 lines):

diff -r 3e192fe36be6 -r be33d0ffa821 sys/arch/amd64/amd64/locore.S
--- a/sys/arch/amd64/amd64/locore.S     Sat Jun 04 10:02:12 2016 +0000
+++ b/sys/arch/amd64/amd64/locore.S     Sat Jun 04 10:19:09 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.S,v 1.100 2016/06/04 09:45:57 maxv Exp $        */
+/*     $NetBSD: locore.S,v 1.101 2016/06/04 10:19:09 maxv Exp $        */
 
 /*
  * Copyright-o-rama!
@@ -611,9 +611,9 @@
  * +------+--------+------+-----+--------+---------------------+----------
  *                             (1)      (2)                   (3)
  *
- * --------------+-----+-----+----+------------+
- * -> PROC0 STK -> L3 -> L2 -> L1 | ISA IO MEM |
- * --------------+-----+-----+----+------------+
+ * --------------+-----+-----+----+-------------+
+ * -> PROC0 STK -> L3 -> L2 -> L1 | ISA I/O MEM |
+ * --------------+-----+-----+----+-------------+
  *                               (4)
  *
  * PROC0 STK is obviously not linked as a page level. It just happens to be
@@ -718,9 +718,11 @@
        orl     $(PG_V|PG_KW),%eax
        fillkpt_nox
 
-       /* We are on (4). Map ISA I/O mem (later atdevbase) RWX. */
-       movl    $(IOM_BEGIN|PG_V|PG_KW/*|PG_N*/),%eax
-       movl    $(IOM_SIZE>>PGSHIFT),%ecx
+       /* We are on (4). Map ISA I/O MEM RWX. */
+       movl    $IOM_BEGIN,%eax
+       movl    $IOM_SIZE,%ecx  /* size of ISA I/O MEM */
+       shrl    $PGSHIFT,%ecx
+       orl     $(PG_V|PG_KW/*|PG_N*/),%eax
        fillkpt
 
        /*
diff -r 3e192fe36be6 -r be33d0ffa821 sys/arch/i386/i386/locore.S
--- a/sys/arch/i386/i386/locore.S       Sat Jun 04 10:02:12 2016 +0000
+++ b/sys/arch/i386/i386/locore.S       Sat Jun 04 10:19:09 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.S,v 1.129 2016/06/04 10:02:12 maxv Exp $        */
+/*     $NetBSD: locore.S,v 1.130 2016/06/04 10:19:09 maxv Exp $        */
 
 /*
  * Copyright-o-rama!
@@ -128,7 +128,7 @@
  */
 
 #include <machine/asm.h>
-__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.129 2016/06/04 10:02:12 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.130 2016/06/04 10:19:09 maxv Exp $");
 
 #include "opt_compat_oldboot.h"
 #include "opt_copy_symtab.h"
@@ -627,9 +627,9 @@
  * +------+--------+------+-----+--------+---------------------+-----------
  *                             (1)      (2)                   (3)
  *
- * -------+------------+
- * TABLES | ISA IO MEM |
- * -------+------------+
+ * -------+-------------+
+ * TABLES | ISA I/O MEM |
+ * -------+-------------+
  *       (4)
  *
  * PROC0 STK is obviously not linked as a page level. It just happens to be
@@ -753,9 +753,11 @@
        orl     $(PG_V|PG_KW),%eax
        fillkpt_nox
 
-       /* We are on (4). Map ISA I/O mem (later atdevbase) RWX. */
-       movl    $(IOM_BEGIN|PG_V|PG_KW/*|PG_N*/),%eax
-       movl    $(IOM_SIZE>>PGSHIFT),%ecx
+       /* We are on (4). Map ISA I/O MEM RWX. */
+       movl    $IOM_BEGIN,%eax
+       movl    $IOM_SIZE,%ecx  /* size of ISA I/O MEM */
+       shrl    $PGSHIFT,%ecx
+       orl     $(PG_V|PG_KW/*|PG_N*/),%eax
        fillkpt
 
        /*



Home | Main Index | Thread Index | Old Index