[OpenBIOS] SOLVED: the mystery of Solaris on SPARC32 and the missing Forth arguments

Andreas Färber andreas.faerber at web.de
Tue Nov 2 20:34:06 CET 2010


Am 02.11.2010 um 11:04 schrieb Mark Cave-Ayland:

> Hmmm. It look as if this part of map_reg in drivers/obio.c is  
> totally wrong, at least for SPARC32:
>
>    if (map) {
>        unsigned long addr;
>
>        addr = (unsigned long)map_io(base + offset, size);
>
>        PUSH(addr);
>        fword("encode-int");
>        PUSH(4);
>        fword("encode-int");
>        fword("encode+");
>        push_str("address");
>        fword("property");
>        return addr;
>    }
>    return 0;
>
> I'd probably say that based upon the output above we should probably  
> remove the second PUSH() and encode-int/encode+ completely, but it  
> must have been added for a reason.

Fwiw I initially thought the same about ppc code. I guess these are  
symptoms of copy and paste between unrelated parts of code. The reg  
property of the /memory node on ppc is similarly bogus, still need to  
clean up my patch for review.

In some places the IEEE 1275 spec (or was it the platform binding?)  
has some nice examples of how they would typically be set up.

Andreas



More information about the OpenBIOS mailing list