[OpenBIOS] [commit] r949 - in trunk/openbios-devel/include/arch: amd64 ia64 ppc sparc32 sparc64 x86

Blue Swirl blauwirbel at gmail.com
Tue Nov 9 18:32:33 CET 2010


On Mon, Nov 8, 2010 at 9:31 PM, Andreas Färber <andreas.faerber at web.de> wrote:
> Am 08.11.2010 um 22:17 schrieb Blue Swirl:
>
>> On Mon, Nov 8, 2010 at 9:12 PM, repository service <svn at openbios.org>
>> wrote:
>>>
>>> Author: afaerber
>>> Date: Mon Nov  8 22:12:36 2010
>>> New Revision: 949
>>> URL: http://tracker.coreboot.org/trac/openbios/changeset/949
>>>
>>> Log:
>>> Introduce FMT_plx for phys_addr_t
>>>
>>> Define a zero-padded format string to be used for phys_addr_t arguments.
>>> Introduce PRIx{32,64} macros as needed.
>>>
>>> v2:
>>> * Also define PRIx32 for sparc32 and sparc64, requested by Blue.
>>
>> What I meant was that all PRIx* macros should be defined for all
>> architectures for consistency.
>
> So in particular you mean PRIx16 and PRIx8? ppc, sparc32 and sparc64 are in
> fact consistent now in defining both PRIx32 and PRIx64.

I don't think PRIx16 or PRIx8 will be used, maybe not even PRIx32. But
for consistency, all architectures should have PRIx64 defined. If
PRIx32 is useful, then it should also be available always.

> x86, amd64 and ia64 use the system headers, so we shouldn't define any such
> macro there, just like we don't do in the bootstrap code path.

That's a bug. System headers may not be used, except for Unix target.
Consider for example 'errno', which may be defined by system headers
as a macro evaluating to a function call to libc:
#   define errno (*__errno_location ())



More information about the OpenBIOS mailing list