Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/macppc/macppc Use battable to map obio space rather...



details:   https://anonhg.NetBSD.org/src/rev/60b447f33604
branches:  trunk
changeset: 477158:60b447f33604
user:      tsubai <tsubai%NetBSD.org@localhost>
date:      Wed Oct 13 03:51:32 1999 +0000

description:
Use battable to map obio space rather than using bat1 registers statically.

diffstat:

 sys/arch/macppc/macppc/locore.S  |   8 +++++++-
 sys/arch/macppc/macppc/machdep.c |  15 ++++++++-------
 2 files changed, 15 insertions(+), 8 deletions(-)

diffs (65 lines):

diff -r 0344f246b11c -r 60b447f33604 sys/arch/macppc/macppc/locore.S
--- a/sys/arch/macppc/macppc/locore.S   Wed Oct 13 03:27:47 1999 +0000
+++ b/sys/arch/macppc/macppc/locore.S   Wed Oct 13 03:51:32 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.S,v 1.15 1999/04/30 04:35:35 tsubai Exp $       */
+/*     $NetBSD: locore.S,v 1.16 1999/10/13 03:51:32 tsubai Exp $       */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -183,6 +183,12 @@
        lwz     4,openfirmware_entry@l(4)
        mtlr    4
 
+       li      0,0                     /* clear battable translations */
+       mtdbatu 2,0
+       mtdbatu 3,0
+       mtibatu 2,0
+       mtibatu 3,0
+
        lis     4,ofmsr@ha              /* Open Firmware msr */
        lwz     4,ofmsr@l(4)
        mtmsr   4
diff -r 0344f246b11c -r 60b447f33604 sys/arch/macppc/macppc/machdep.c
--- a/sys/arch/macppc/macppc/machdep.c  Wed Oct 13 03:27:47 1999 +0000
+++ b/sys/arch/macppc/macppc/machdep.c  Wed Oct 13 03:51:32 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.55 1999/10/13 03:27:48 tsubai Exp $      */
+/*     $NetBSD: machdep.c,v 1.56 1999/10/13 03:51:33 tsubai Exp $      */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -180,6 +180,12 @@
        battable[9].batu = BATU(0x90000000);
 
        /*
+        * Map obio devices.
+        */
+       battable[0xf].batl = BATL(0xf0000000, BAT_I);
+       battable[0xf].batu = BATU(0xf0000000);
+
+       /*
         * Now setup fixed bat registers
         *
         * Note that we still run in real mode, and the BAT
@@ -190,11 +196,6 @@
                      "mtdbatl 0,%0; mtdbatu 0,%1;"
                      :: "r"(battable[0].batl), "r"(battable[0].batu));
 
-       /* BAT1 statically maps obio devices */
-       /* 0xf0000000-0xf7ffffff (128MB) --> 0xf0000000- */
-       asm volatile ("mtdbatl 1,%0; mtdbatu 1,%1"
-                     :: "r"(0xf0000002 | BAT_I), "r"(0xf0000ffe));
-
        chosen = OF_finddevice("/chosen");
        save_ofw_mapping();
 
@@ -371,7 +372,7 @@
                vaddr_t va = ofw_mapping[i].va;
                int size = ofw_mapping[i].len;
 
-               if (va < 0xf8000000)                    /* XXX */
+               if (va < 0xf0000000)                    /* XXX */
                        continue;
 
                while (size > 0) {



Home | Main Index | Thread Index | Old Index