[Skiboot] [PATCH 0/4] OPAL debugfs calls

Frederic Barrat fbarrat at linux.ibm.com
Tue Nov 24 20:55:53 AEDT 2020



On 05/11/2020 17:15, Cédric Le Goater wrote:
> Hello,
> 
> These patches add a couple of OPAL read/write calls which let the OPAL
> drivers expose any kind of low level information : configuration, HW
> registers, statistics. The write call can perform some reconfiguration.
> 
> I have been using them for a while on P9 and P10 to query XIVE internals,
> time statistics on HW procedures and to modify the allocation of XIVE
> resources for guests. It might be useful to others as debug or bringup
> extensions.
> 
> Last is the quickly-coded generic Linux driver.
> 
> One problem is our snprintf implementation in OPAL which does not
> return the number of bytes that would have been written if the buffer
> was large enough. It would help the Linux driver.
> 
> Thanks,
> 
> C.


This is interesting. I've played a bit with it with PHBs.
I can imagine it could be useful for debug when cronus is not around. 
I'm less convinced about the "write" feature, the interface feels not 
precise enough. I guess it's no coincidence that writing ends up being 
disabled on all the xive and phb data structures.

A few easy comments on some of the following patches.

   Fred




> 
> Changes since RFC:
> 
>   - introduced a list of opal_debug nodes
>   - included PHB debugfs entries
>   - removed statistics
> 
> Cédric Le Goater (4):
>    core: Add debugfs framework
>    phb4: Add debugfs entries for internal tables
>    xive/p9: Add debugfs entries for internal tables
>    xive/p9: Add debugfs entries for performance
> 
>   include/opal-api.h     |   4 +-
>   include/opal-debug.h   |  27 ++++++
>   include/xive-p9-regs.h |  14 +++
>   core/opal-debug.c      |  97 ++++++++++++++++++++
>   hw/phb4.c              | 118 ++++++++++++------------
>   hw/xive.c              | 198 +++++++++++++++++++++++++++++++++++++++++
>   core/Makefile.inc      |   1 +
>   7 files changed, 395 insertions(+), 64 deletions(-)
>   create mode 100644 include/opal-debug.h
>   create mode 100644 core/opal-debug.c
> 


More information about the Skiboot mailing list