ranges_bitmap

Frank Wille <[email protected]> Sun, 17 Jan 2010 16:45:55 +0100
Newsgroups gmane.os.netbsd.ports.ofppc
Organization Privates Internet Ostwestfalen/Lippe e.V.
Message-ID <[email protected]>
Hi,

I'm currently fixing a bug in ranges_bitmap() from ofwoea_machdep.c, which
ignored modeldata.ranges_offset, so the bitmap was completely wrong for
Firepower and Powerstack machines.

Apart from that I'm wondering whether the following section from
ranges_bitmap() is correct:

        for (i=0; i < (mlen/4)/reclen; i++) {
                addr = map[reclen * i + acells];
                len = map[reclen * i + reclen - 1];
                for (j = 0; j < len / 0x10000000; j++)
                        bitmap |= 1 << ((addr+j*0x10000000) >>28);
                bitmap |= 1 << (addr >> 28);
        }

This code leaves out the last 256MB region of a range, as long as it is not
the first one. Was that intended?

-- 
Frank Wille