patch-2.1.97 linux/arch/sparc/prom/memory.c

Next file: linux/arch/sparc/prom/misc.c
Previous file: linux/arch/sparc/prom/init.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.96/linux/arch/sparc/prom/memory.c linux/arch/sparc/prom/memory.c
@@ -1,8 +1,9 @@
-/* $Id: memory.c,v 1.12 1997/05/27 06:45:57 davem Exp $
+/* $Id: memory.c,v 1.13 1998/01/30 10:59:03 jj Exp $
  * memory.c: Prom routine for acquiring various bits of information
  *           about RAM on the machine, both virtual and physical.
  *
  * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
+ * Copyright (C) 1997 Michael A. Griffith (grif@acm.org)
  */
 
 #include <linux/config.h>
@@ -10,6 +11,7 @@
 #include <linux/init.h>
 
 #include <asm/openprom.h>
+#include <asm/sun4prom.h>
 #include <asm/oplib.h>
 
 /* This routine, for consistency, returns the ram parameters in the
@@ -177,6 +179,21 @@
 		prom_sortmemlist(prom_phys_avail);
 		break;
 
+	case PROM_SUN4:
+#ifdef CONFIG_SUN4	
+		/* how simple :) */
+		prom_phys_total[0].start_adr = 0x0;
+		prom_phys_total[0].num_bytes = *(sun4_romvec->memorysize);
+		prom_phys_total[0].theres_more = 0x0;
+		prom_prom_taken[0].start_adr = 0x0; 
+		prom_prom_taken[0].num_bytes = 0x0;
+		prom_prom_taken[0].theres_more = 0x0;
+		prom_phys_avail[0].start_adr = 0x0;
+		prom_phys_avail[0].num_bytes = *(sun4_romvec->memoryavail);
+		prom_phys_avail[0].theres_more = 0x0;
+#endif
+		break;
+
         case PROM_AP1000:
 #if CONFIG_AP1000
 		/* really simple memory map */
@@ -189,9 +206,6 @@
 		prom_phys_avail[0].start_adr = 0x00000000;
 		prom_phys_avail[0].num_bytes = prom_phys_total[0].num_bytes;
 		prom_phys_avail[0].theres_more = 0x0;
-		prom_sortmemlist(prom_phys_total);
-		prom_sortmemlist(prom_prom_taken);
-		prom_sortmemlist(prom_phys_avail);
 #endif
 	default:
 		break;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov