| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
The dt_prop functions were copied over from Skiboot. Rework and rename
these to make use of the existing libpdbg property functions. These
should not have been used by external projects so maintaining
backwards compatibility is not a concern.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Reviewed-by: Amitay Isaacs <amitay@ozlabs.org>
|
|
|
|
|
|
|
|
| |
Clean up the target addressing functions and rename them to be
consistent with other libpdbg function names.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Reviewed-by: Amitay Isaacs <amitay@ozlabs.org>
|
|
|
|
|
|
|
|
| |
Functions were added to allow a targets parents to be traversed until a parent
of the correct class is found. Switch to using those instead of blindly assuming
a particular node is always a child of the desired class.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
| |
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
| |
This allows the compiler to warn about mismatched types in printf
arguments.
Without this we don't get warnings from the logging macros when format
specifiers and arguments don't match up, and instead you get segfaults.
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
| |
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When libpdbg runs though the device tree and calls probe() on all the
targets it marks any node (and all its children) which fails to probe
as "disabled".
When pdbg recieves arguments to specifiy a pib, core or thread (-p -c
-t) it runs though the device tree and marks nodes which do not match
the specified -p -c or -t as "disabled".
These two scenarios are related - that is we don't want to be operating
on any disabled nodes. However, they are not the same.
Consider HTM wanting to know if the machine has powersave disabled. A
simple way would be to loop through all the threads and if any of them
are not in "active" state then powersave must be enabled. In this
scenario HTM want to be able to get the status of every thread on the
machine regardless of -p -c -t flags but if the machine isn't fully
speced out and has cores which didn't probe, HTM wants to know to
ignore those threads.
This patch introduces a "nonexistant" pdbg target status which is set
during libpdbg probe() time. Later pdbg can mark nodes to targets that
do 'exist' but it would like to avoid as "disabled".
Attempting to solve the above problem with only a "nonexistant" flag
would also require everything to be probed before selecting out chips
and threads that the user is not interested in. This would be highly
inefficient.
This patch probes the system lazily.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Currently we have this terrible mess of dt_nodes pointing to targets
and targets pointing to dt_nodes. This has been the cause of bugs due
to folling NULL pointers from a target expecting a node and vice versa.
Consolidating these structs means that there must be a node for a
target.
Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prior to every pib read and write we would reset the fsi2pib engine. This
was primarily added to improve reliability on P8 BMC's which do not allow
exclusive access to the GPIO registers for bitbanging FSI.
Newer BMC's have a built in kernel driver to allow FSI access and this
reset causes the fsi2pib engine to loose existing settings such as the true
mask register. To avoid this only reset the PIB master interface once at
startup.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
|
| |
In preparation for a better defined libpdbg API rename "struct target" to
something less generic so that we can export the name.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
|
| |
Several minor fixes were required to enable building on both x64 and ARM with
-Wall -Werror, mostly related to unused variables and bad printf string formats.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
|
|
| |
Errors on the hmfsi port can cause them to be disabled. So rather than relying
on the host to enable the corresponding FSI ports enable them during probing of
the downstream FSI link.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
|
|
|
|
| |
The previous implementation of targeting was hardcoded, cumbersome
and difficult to reconfigure for different chip types. This moves to a
method of configuring targets using device-tree which is much easier
to maintain and allows methods to be added to support operations like
getmem on POWER9.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
|
| |
Support detecting different chip types so we enable chip type
dependent behaviour.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
This includes better support for selecting targets, probing thread
status and a number of other minor bugfixes. Also adds an option to
print version numbers.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|