Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/arch/powerpc/powerpc Pull up revision 1.7 (requeste...



details:   https://anonhg.NetBSD.org/src/rev/48f6b83166d1
branches:  netbsd-1-5
changeset: 490303:48f6b83166d1
user:      he <he%NetBSD.org@localhost>
date:      Wed Dec 13 22:13:41 2000 +0000

description:
Pull up revision 1.7 (requested by mycroft):
  Make memory probing work correctly with the DIMMs in any order.

diffstat:

 sys/arch/powerpc/powerpc/ofw_machdep.c |  12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diffs (41 lines):

diff -r d2486bdb5541 -r 48f6b83166d1 sys/arch/powerpc/powerpc/ofw_machdep.c
--- a/sys/arch/powerpc/powerpc/ofw_machdep.c    Wed Dec 13 22:10:23 2000 +0000
+++ b/sys/arch/powerpc/powerpc/ofw_machdep.c    Wed Dec 13 22:13:41 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ofw_machdep.c,v 1.5.4.1 2000/10/18 17:14:11 tv Exp $   */
+/*     $NetBSD: ofw_machdep.c,v 1.5.4.2 2000/12/13 22:13:41 he Exp $   */
 
 /*
  * Copyright (C) 1996 Wolfgang Solfrank.
@@ -76,12 +76,13 @@
 
        /* Remove zero sized entry in the returned data. */
        cnt /= sizeof OFmem[0];
-       for (i = 0; i < cnt; i++)
+       for (i = 0; i < cnt; )
                if (OFmem[i].size == 0) {
                        bcopy(&OFmem[i + 1], &OFmem[i],
                              (cnt - i) * sizeof OFmem[0]);
                        cnt--;
-               }
+               } else
+                       i++;
 
        bzero(OFavail, sizeof OFavail);
        cnt = OF_getprop(phandle, "available",
@@ -90,12 +91,13 @@
                goto error;
 
        cnt /= sizeof OFavail[0];
-       for (i = 0; i < cnt; i++)
+       for (i = 0; i < cnt; )
                if (OFavail[i].size == 0) {
                        bcopy(&OFavail[i + 1], &OFavail[i],
                              (cnt - i) * sizeof OFavail[0]);
                        cnt--;
-               }
+               } else
+                       i++;
 
        *memp = OFmem;
        *availp = OFavail;



Home | Main Index | Thread Index | Old Index