[OpenBIOS] [RFC] Switch OFMEM to use phys_addr_t for physical addresses
Andreas Färber
andreas.faerber at web.de
Sun Nov 7 14:04:49 CET 2010
Am 07.11.2010 um 13:20 schrieb Mark Cave-Ayland:
> Andreas Färber wrote:
>
>> Looking good so far, except for one issue.
>>> Index: libopenbios/ofmem_common.c
>>> ===================================================================
>>> --- libopenbios/ofmem_common.c (revision 946)
>>> +++ libopenbios/ofmem_common.c (working copy)
>>> @@ -463,7 +463,7 @@
>>> }
>>>
>>> /* if align != 0, phys is ignored. Returns -1 on error */
>>> -ucell ofmem_claim_phys( ucell phys, ucell size, ucell align )
>>> +ucell ofmem_claim_phys( phys_addr_t phys, ucell size, ucell align )
>>> {
>>> OFMEM_TRACE("ofmem_claim phys=" FMT_ucellx " size=" FMT_ucellx
>>> " align=" FMT_ucellx "\n",
>> This will break the trace code on sparc32 and ppc64. We'll need
>> some target-specific define to replace FMT_ucellx in the trace code
>> for the "phys" parameter since it may be larger.
>
> Ah good spot - would FMT_phys_addr_t be a suitable name for this?
> I'll make the defaults for SPARC64 and PPC the same as those for
> ucell.
Judging by include/arch/ppc/types.h I'd prefer FMT_physaddrt (without
the trailing _t that makes it look like a type itself).
QEMU has TARGET_FMT_plx, so we might use FMT_plx (physical long
hexadecimal?).
Would be nice to have their introduction in a separate, preceding patch.
Andreas
More information about the OpenBIOS
mailing list