Module Name:    src
Committed By:   rin
Date:           Mon Mar 29 14:21:08 UTC 2021

Modified Files:
        src/sys/arch/evbppc/conf: files.walnut
        src/sys/arch/evbppc/walnut: machdep.c

Log Message:
Use ibm40x_machdep.c.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/evbppc/conf/files.walnut
cvs rdiff -u -r1.59 -r1.60 src/sys/arch/evbppc/walnut/machdep.c

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/evbppc/conf/files.walnut
diff -u src/sys/arch/evbppc/conf/files.walnut:1.17 src/sys/arch/evbppc/conf/files.walnut:1.18
--- src/sys/arch/evbppc/conf/files.walnut:1.17	Mon Jun 20 17:44:33 2011
+++ src/sys/arch/evbppc/conf/files.walnut	Mon Mar 29 14:21:08 2021
@@ -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/autoconf.c
 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

Index: src/sys/arch/evbppc/walnut/machdep.c
diff -u src/sys/arch/evbppc/walnut/machdep.c:1.59 src/sys/arch/evbppc/walnut/machdep.c:1.60
--- src/sys/arch/evbppc/walnut/machdep.c:1.59	Thu Jun 11 19:20:43 2020
+++ src/sys/arch/evbppc/walnut/machdep.c	Mon Mar 29 14:21:08 2021
@@ -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 @@ void initppc(vaddr_t, vaddr_t, char *, v
 
 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 @@ initppc(vaddr_t startkernel, vaddr_t end
 	/* 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 @@ initppc(vaddr_t startkernel, vaddr_t end
 	}
 
 	/* 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 @@ cpu_reboot(int howto, char *what)
 #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)
 {

Reply via email to