[U-Boot] [PATCH v2 01/40] vsprintf: Add modifier for phys_addr_t

Thierry Reding thierry.reding at gmail.com
Wed Aug 27 09:01:20 CEST 2014


On Tue, Aug 26, 2014 at 11:04:56AM -0600, Stephen Warren wrote:
> On 08/26/2014 09:33 AM, Thierry Reding wrote:
> >From: Thierry Reding <treding at nvidia.com>
> >
> >Provide a new modifier to vsprintf() to print phys_addr_t variables to
> >avoid having to cast or #ifdef when printing them out. The %pa modifier
> >is used for this purpose, so phys_addr_t variables need to be passed by
> >reference, like so:
> >
> >	phys_addr_t start = 0;
> >
> >	printf("start: %pa\n", &start);
> >
> >Depending on the size of phys_addr_t this will print out the address
> >with 8 or 16 hexadecimal digits following a 0x prefix.
> 
> The series,
> 
> Tested-by: Stephen Warren <swarren at nvidia.com>
> 
> Note that I did see the following printed a couple of times when I executed
> "run bootcmd_pxe":
> 
> pci_hose_bus_to_phys: invalid physical address
> 
> ... but everything worked perfectly, so I guess we can track that down
> later.

Yes, it should definitely be tracked down. I don't see that message on
my setup. I've seen it for example when noncached_alloc() fails and
returns 0, but in that case everything shouldn't be working perfectly.

It would be helpful if that message showed what physical address was
considered invalid.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140827/70108926/attachment.pgp>


More information about the U-Boot mailing list