[OpenBIOS] [RFC v2] WIP fix for /memory reg property
Andreas Färber
andreas.faerber at web.de
Thu Nov 4 01:52:20 CET 2010
Am 04.11.2010 um 01:25 schrieb Andreas Färber:
> v2:
> * Use my-#acells for address size.
> * Introduce my-#scells for size size.
> * Confine special-handling of "available" to /memory and MMU.
> ---
> Hi,
>
> How can we determine the cell size within Forth?
>
> 64bit? wouldn't work as criteria for ppc64.
> Is an explicit [IFDEF] CONFIG_{SPARC64,PPC64} the only way here?
>
> Thanks,
> Andreas
>
> arch/ppc/qemu/init.c | 14 +++++++++-----
> forth/admin/devices.fs | 40 ++++++++++++++++++++++++++++++++
> +-------
> forth/device/property.fs | 16 +++++++++++++++-
> 3 files changed, 57 insertions(+), 13 deletions(-)
Sorry, too tired... I merged the wrong patches. Above question still
applies to the v2 "Pretty-print reg property" though!
Below is my obviously-to-be-cleaned-up fix for the ppc /memory reg
property, which my other patch pretty-prints to properly debug such
issues. ;)
Andreas
> diff --git a/arch/ppc/qemu/init.c b/arch/ppc/qemu/init.c
> index 08eb59c..d7ebc15 100644
> --- a/arch/ppc/qemu/init.c
> +++ b/arch/ppc/qemu/init.c
> @@ -774,15 +774,19 @@ arch_of_init( void )
>
> /* all memory */
>
> - PUSH(ram_size >> 32);
> - fword("encode-int");
> - PUSH(ram_size & 0xffffffff);
> - fword("encode-int");
> + PUSH(0);
> + fword("encode-phys");
> +#if 0
> fword("encode+");
> PUSH(0);
> fword("encode-int");
> fword("encode+");
> - PUSH(0);
> +#endif
> +#if 0
> + PUSH(ram_size >> 32);
> + fword("encode-int");
> +#endif
> + PUSH(ram_size & 0xffffffff);
> fword("encode-int");
> fword("encode+");
> push_str("reg");
More information about the OpenBIOS
mailing list