patch-2.1.9 linux/arch/sparc/prom/memory.c
Next file: linux/arch/sparc/prom/misc.c
Previous file: linux/arch/sparc/prom/devops.c
Back to the patch index
Back to the overall index
- Lines: 51
- Date:
Sat Nov 9 10:12:26 1996
- Orig file:
v2.1.8/linux/arch/sparc/prom/memory.c
- Orig date:
Thu Apr 25 13:22:06 1996
diff -u --recursive --new-file v2.1.8/linux/arch/sparc/prom/memory.c linux/arch/sparc/prom/memory.c
@@ -1,10 +1,11 @@
-/* $Id: memory.c,v 1.7 1996/04/25 06:09:46 davem Exp $
+/* $Id: memory.c,v 1.8 1996/07/12 05:14:56 tridge 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)
*/
+#include <linux/config.h>
#include <linux/kernel.h>
#include <asm/openprom.h>
@@ -178,21 +179,22 @@
break;
case PROM_AP1000:
- /* really simple memory map */
- prom_phys_total[0].start_adr = 0x00000000;
- prom_phys_total[0].num_bytes = 0x01000000; /* 16MB */
- prom_phys_total[0].theres_more = 0x0;
- prom_prom_taken[0].start_adr = 0x00000000;
- prom_prom_taken[0].num_bytes = 0x00000000;
- prom_prom_taken[0].theres_more = 0x0;
- prom_phys_avail[0].start_adr = 0x00000000;
- prom_phys_avail[0].num_bytes = 0x01000000; /* 16MB */
- prom_phys_avail[0].theres_more = 0x0;
- prom_sortmemlist(prom_phys_total);
- prom_sortmemlist(prom_prom_taken);
- prom_sortmemlist(prom_phys_avail);
- printk("Initialised AP1000 memory lists (forced 16MB)\n");
- break;
+#if CONFIG_AP1000
+ /* really simple memory map */
+ prom_phys_total[0].start_adr = 0x00000000;
+ prom_phys_total[0].num_bytes = ap_memory_size();
+ prom_phys_total[0].theres_more = 0x0;
+ prom_prom_taken[0].start_adr = 0x00000000;
+ prom_prom_taken[0].num_bytes = 0x00000000;
+ prom_prom_taken[0].theres_more = 0x0;
+ 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
+ break;
};
/* Link all the lists into the top-level descriptor. */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov