[OpenBIOS] [PATCH 10/10] Adding filll Forth primitive (v2)

Andreas Färber andreas.faerber at web.de
Tue Aug 23 22:16:36 CEST 2011


William,

Am 22.08.2011 um 05:14 schrieb William Hahne:

> This is a forth word that is required by BootX. It just fills some
> specified memory address and length with 32 bit integers. It is a
> non-standard addition and therefore isn't documented. Thanks to Segher
> Boessenkool for the corrected for loop.

This is still missing a Signed-off-by line!

Compare QEMU's http://wiki.qemu.org/Contribute/SubmitAPatch

I'd like to compile-test and commit the patch(es), but I cannot  
copy&paste this from my mailer (leading spaces get stripped).
Best use git-am compatible email format or please supply me with the  
patch as an attachment or download. Thanks!

Andreas

$ git am ../mac_10.eml
Applying: Adding filll Forth primitive (v2)
error: ppc/qemu/init.c        (working copy): does not exist in index
Patch failed at 0001 Adding filll Forth primitive (v2)
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".


> Index: arch/ppc/qemu/init.c
> ===================================================================
> --- arch/ppc/qemu/init.c        (revision 1047)
> +++ arch/ppc/qemu/init.c        (working copy)
> @@ -539,6 +539,7 @@
> }
>
> static void go(void);
> +static void filll(void);
>
> static void
> go(void)
> @@ -551,6 +552,23 @@
>     call_elf(0, 0, addr);
> }
>
> +/* This is an Apple specific word that fills a specified location  
> and length
> +   of memory with 32bit integers.
> +
> +   ( dest count value -- ) */
> +static void
> +filll(void)
> +{
> +    uint32_t value = POP();
> +    int count = POP();
> +    uint32_t *dest = (uint32_t*)cell2pointer(POP());
> +
> +    int i;
> +    for (i = count; i > 0; i -= sizeof(uint32_t)) {
> +        *dest++ = value;
> +    }
> +}
> +
> static void kvm_of_init(void)
> {
>     char hypercall[4 * 4];
> @@ -879,4 +897,5 @@
>
>     bind_func("platform-boot", boot);
>     bind_func("(go)", go);
> +    bind_func("filll", filll);
> }
>
> -- 
> OpenBIOS                 http://openbios.org/
> Mailinglist:  http://lists.openbios.org/mailman/listinfo
> Free your System - May the Forth be with you




More information about the OpenBIOS mailing list