Port-ofppc archive

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

Re: Pegasos boots with 512MB! (was: SmartFirmware /memory)



Tim Rightnour wrote:

>> Is restricting RTAS to the lowest 256MB ok for all ofppc platforms? Then
>> I will work out a solution and check it in.
> 
> Actually.. it's probably better that it is restricted to that region. It's
> generally more likely that that region is mapped on most ofppc machines.

Done. Now we only have to find a smart way to add the missing memory
segment.

Based on the code of Matthew Green I inserted the following block into
mem_regions():

#define AVAIL_THRESH (0x10000000-1)
     if (((OFavail[cnt-1].start + OFavail[cnt-1].size + AVAIL_THRESH)
        & ~AVAIL_THRESH) <
        (OFmem[regcnt-1].start + OFmem[regcnt-1].size)) {

        OFavail[cnt].start = (OFavail[cnt-1].start +
            OFavail[cnt-1].size + AVAIL_THRESH) & ~AVAIL_THRESH;
        OFavail[cnt].size =
            OFmem[regcnt-1].size - OFavail[cnt].start;
        printf("WARNING: add memory segment %lx - %lx,",
            (unsigned long)OFavail[cnt].start,
            (unsigned long)OFavail[cnt].start + OFavail[cnt].size);
        printf("WARNING: which was not recognized by the Firmware.\n");
        cnt++;
    }

The original code had the problem that it would add everything following the
last available segment, which is dangerous, because it ended at 0x0fc00000.
The area from 0xfc00000 to 0x10000000 is used by OF and must not be included.

Do you think that rounding up to the next 256MB boundary could be a solution
(for all platforms)?

-- 
    _  Frank Wille (frank%phoenix.owl.de@localhost)
 _ //  http://sun.hasenbraten.de/~frank/
 \X/   Phx @ #AmigaGer



Home | Main Index | Thread Index | Old Index