changelog shortlog tags branches changeset file revisions annotate raw help

Mercurial > hg > plan9front / sys/src/9/bcm/main.c

revision 7234: fc141b91ed8a
parent 7159: 66132ebbe687
     1.1--- a/sys/src/9/bcm/main.c
     1.2+++ b/sys/src/9/bcm/main.c
     1.3@@ -18,7 +18,6 @@
     1.4 uintptr kseg0 = KZERO;
     1.5 Mach*	machaddr[MAXMACH];
     1.6 Conf	conf;
     1.7-ulong	memsize = 128*1024*1024;
     1.8 
     1.9 void
    1.10 machinit(void)
    1.11@@ -241,7 +240,7 @@ void
    1.12 confinit(void)
    1.13 {
    1.14 	int i, userpcnt;
    1.15-	ulong kpages;
    1.16+	ulong kpages, memsize = 0;
    1.17 	uintptr pa;
    1.18 	char *p;
    1.19 
    1.20@@ -257,12 +256,10 @@ confinit(void)
    1.21 	else
    1.22 		userpcnt = 0;
    1.23 
    1.24-	if((p = getconf("*maxmem")) != nil){
    1.25+	if(p = getconf("*maxmem"))
    1.26 		memsize = strtoul(p, 0, 0) - PHYSDRAM;
    1.27-		if (memsize < 16*MB)		/* sanity */
    1.28-			memsize = 16*MB;
    1.29-	}
    1.30-
    1.31+	if (memsize < 16*MB)		/* sanity */
    1.32+		memsize = 16*MB;
    1.33 	getramsize(&conf.mem[0]);
    1.34 	if(conf.mem[0].limit == 0){
    1.35 		conf.mem[0].base = PHYSDRAM;