[Skiboot] [RFC PATCH 2/2] EXAMPLE: Print full DT path when adding a node

Stewart Smith stewart at linux.vnet.ibm.com
Thu Mar 8 13:10:38 AEDT 2018


Oliver <oohall at gmail.com> writes:
> On Thu, Mar 8, 2018 at 12:09 PM, Stewart Smith
> <stewart at linux.vnet.ibm.com> wrote:
>> Oliver O'Halloran <oohall at gmail.com> writes:
>>> An example of how to use the custom printf specifiers. In this case it
>>> will print out the full node path when adding a node to
>>> the device-tree, like so:
>>>
>>> [    0.001493894,3] Added /ibm,opal to tree
>>> [    0.001504982,3] Added /ibm,opal/event to tree
>>> [    0.001512892,3] Added /ibm,opal/firmware to tree
>>> [    0.001521920,3] Added /ibm,opal/firmware/exports to tree
>>> [    0.001535936,3] Added /ibm,opal/power-mgt to tree
>>
>> Immediate uses I could see would be replacing the PHB(DBG|INFO|ERR)
>> macros that do the PHB#%04x[%d:%d]: printing, the lock printing code,
>> the mbox-flash window printing code, and some of the FSP message logging
>> stuff.
>>
>> We can probably end up unit testing this code too without *tooo* much
>> swearing.
>
> Due to the stupid linker trick I was doing unit testing this is a bit
> hard. I was
> going to rework it at some point but haven't gotten around to it yet.
>
> things_to_do++

I'm pretty sure that variable just overflowed.

-- 
Stewart Smith
OPAL Architect, IBM.



More information about the Skiboot mailing list