Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/evbppc Use ibm40x_machdep.c.



details:   https://anonhg.NetBSD.org/src/rev/69b381da004d
branches:  trunk
changeset: 960806:69b381da004d
user:      rin <rin%NetBSD.org@localhost>
date:      Mon Mar 29 14:21:08 2021 +0000

description:
Use ibm40x_machdep.c.

diffstat:

 sys/arch/evbppc/conf/files.walnut |   3 ++-
 sys/arch/evbppc/walnut/machdep.c  |  28 +++++-----------------------
 2 files changed, 7 insertions(+), 24 deletions(-)

diffs (87 lines):

diff -r a33efa69ddea -r 69b381da004d sys/arch/evbppc/conf/files.walnut
--- a/sys/arch/evbppc/conf/files.walnut Mon Mar 29 13:59:15 2021 +0000
+++ b/sys/arch/evbppc/conf/files.walnut Mon Mar 29 14:21:08 2021 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.walnut,v 1.17 2011/06/20 17:44:33 matt Exp $
+#      $NetBSD: files.walnut,v 1.18 2021/03/29 14:21:08 rin Exp $
 #
 # walnut-specific configuration info
 
@@ -6,6 +6,7 @@
 file   arch/evbppc/walnut/consinit.c
 file   arch/evbppc/walnut/machdep.c
 file   arch/powerpc/ibm4xx/ibm4xx_autoconf.c
+file   arch/powerpc/ibm4xx/ibm40x_machdep.c
 file   arch/powerpc/ibm4xx/ibm4xx_machdep.c
 
 # Memory Disk for install kernel
diff -r a33efa69ddea -r 69b381da004d sys/arch/evbppc/walnut/machdep.c
--- a/sys/arch/evbppc/walnut/machdep.c  Mon Mar 29 13:59:15 2021 +0000
+++ b/sys/arch/evbppc/walnut/machdep.c  Mon Mar 29 14:21:08 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.59 2020/06/11 19:20:43 ad Exp $  */
+/*     $NetBSD: machdep.c,v 1.60 2021/03/29 14:21:08 rin Exp $ */
 
 /*
  * Copyright 2001, 2002 Wasabi Systems, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.59 2020/06/11 19:20:43 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.60 2021/03/29 14:21:08 rin Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_ddb.h"
@@ -142,10 +142,6 @@
 
 static void dumpsys(void);
 
-#define MEMREGIONS     8
-struct mem_region physmemr[MEMREGIONS];                /* Hard code memory */
-struct mem_region availmemr[MEMREGIONS];       /* Who's supposed to set these up? */
-
 struct board_cfg_data board_data;
 
 void
@@ -160,13 +156,7 @@
        /* Save info block */
        memcpy(&board_data, info_block, sizeof(board_data));
 
-       memset(physmemr, 0, sizeof physmemr);
-       memset(availmemr, 0, sizeof availmemr);
-       physmemr[0].start = 0;
-       physmemr[0].size = board_data.mem_size & ~PGOFSET;
-       /* Lower memory reserved by eval board BIOS */
-       availmemr[0].start = startkernel;
-       availmemr[0].size = board_data.mem_size - availmemr[0].start;
+       ibm40x_memsize_init(board_data.mem_size, startkernel);
 
        /* Linear map kernel memory */
        for (vaddr_t va = 0; va < endkernel; va += TLB_PG_SIZE) {
@@ -174,7 +164,8 @@
        }
 
        /* Map console after physmem (see pmap_tlbmiss()) */
-       ppc4xx_tlb_reserve(0xef000000, roundup(physmemr[0].size, TLB_PG_SIZE),
+       ppc4xx_tlb_reserve(0xef000000,
+           roundup(board_data.mem_size, TLB_PG_SIZE),
            TLB_PG_SIZE, TLB_I | TLB_G);
 
        mtspr(SPR_TCR, 0);      /* disable all timers */
@@ -389,15 +380,6 @@
 #endif
 }
 
-void
-mem_regions(struct mem_region **mem, struct mem_region **avail)
-{
-
-       *mem = physmemr;
-       *avail = availmemr;
-}
-
-
 int
 ibm4xx_pci_bus_maxdevs(void *v, int busno)
 {



Home | Main Index | Thread Index | Old Index