[OpenBIOS] [commit] r1078 - trunk/openbios-devel/arch/ppc/qemu

Segher Boessenkool segher at kernel.crashing.org
Wed Jan 9 23:30:43 CET 2013


> +/*
> + *  filll        ( addr len quad -- )
> + */
> +
> +static void ffilll(void)
> +{
> +    const u32 longval = POP();
> +    u32 len = POP();
> +    u32 *aaddr = (u32 *)cell2pointer(POP());
> +
> +    while (len--) {
> +        *aaddr++ = longval;
> +    }
> +}

This is wrong: the "len" parameter is a length _in bytes_.  If it's
not a multiple of four, Apple's implementation writes one to three
bytes too many.


Segher




More information about the OpenBIOS mailing list