| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
This copies the special wakeup release logic from p9chip.c
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
|
|
|
|
|
|
| |
This reverts commit 3ce2bc04c70bf6f961a62a380f7b4459445ed2da.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
| |
This reverts commit eb1d866e30a1f8488fb794776bb5a1e0bc42d2e5.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
|
|
| |
This reverts commit 7de0ee34699e297f1f224fce1790c3cd03bc2f32. The
incorrect version of "libpdbg/p8chip.c: release special wakeups for
P8" was applied, the next patch will commit the correct version.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
|
|
|
|
|
| |
Based on patch from Alistair, some fixes and changes:
- account HILE bit, set/clear MSR_LE
- clear MSR_PR
- don't use raw ramming (clearer this way, not perf critical)
At the moment, must manually stop all threads in the core, and manually
restart them. Can change behaviour depending on what exactly we want
(e.g., sreset all threads may be good for debugging).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes a few changes to stop and ram procedure.
First of all, the existing thread_stop procedure is also setting up some
of the ram state. Change that to just do the stop sequence from the
workbook, and move the ram stuff into ram setup and destroy.
The workbook calls for inactive threads being rammed to set a thread
active state before ram mode is exited, in order for GPRs modified by
ramming to avoid getting lost. Currently the code does that in the
stop sequence before ram mode is activated.
The code also currently deasserts the thread active bit after exiting
ram mode, which is not part of the workbook, so this is no longer done.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
|
|
|
|
|
|
| |
This copies the special wakeup release logic from p9chip.c
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
|
|
|
|
|
|
|
|
|
| |
The workbook recipe is to write SP_STOP once, then poll for status.
Also add a small delay between polling to give a reasonable timeout
and avoid hitting the scom bus hard for no good reason.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
Rework the target compatible code to reuse existing libpdbg code where
possible. Renames and exports these functions for use by external
libraries.
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>
|
|
|
|
|
| |
Signed-off-by: Rashmica Gupta <rashmica.g@gmail.com>
Reviewed-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
| |
Signed-off-by: Rashmica Gupta <rashmica.g@gmail.com>
|
|
|
|
|
| |
Signed-off-by: Rashmica Gupta <rashmica.g@gmail.com>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
p9chip.c called the probe function directly. Better to call pdbg_target_probe()
so that any intermediate targets can also be probed.
p8chip.c didn't probe the threads at all prior to use, so do that.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
|
| |
This correctly restores the MR_THREAD_IN_DEBUG bit rather than always
clearing it after.
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
|
|
|
|
|
| |
Currently attempting to do a './pdbg -p x -c x -t x sreset'
segfaults as there is no sreset function defined for p8. Apparently
we can't easily sreset on p8, so add in function that always fails
as this is better than segfaulting.
Signed-off-by: Rashmica Gupta <rashmica.g@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is currently no abstraction of thread status between library and
application. It just passes the hardware specific values down. There is
also no interface exported in the library headers to read status.
This makes it difficult to implement more advanced functionality in the
application as there is no way hardware agnostic way to determine if a
thread is in powersave mode or not for example.
Instead introduce a hardware agnostic thread state so that we can implement
more advanced functionality such as automatically stopping threads if
required.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
| |
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
| |
This uses ramming to pull out most registers. There are more
SPRs to left to add.
Ramming remains set over all register extraction, by keeping
ram_is_setup target attribut. This helps to speed things up
and minimise disturbance to the host.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
|
|
|
|
| |
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Thread status can return the current hardware smt state of a thread
pretty easily, the information is in POW_STATUS_REG which we already
read.
It should be noted that the value read by the scom has nothing to do
with the ppc64_cpu --smt value. The value returned by the hardware is
really how the hardware is operating, it will happy be in SMT1 and
having a thread using the entire core. The other threads to not need to
be asleep for SMT1 to be reported, something like the Linux idle loop
(but without sleep states) will do it. This means that an SMT1 thread
with three others active threads spinning could at any time jump report
SMT4 depending on the load of the system.
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>
|
|
|
|
|
|
|
|
| |
A core is a specific subset of chiplets so rename the existing usage of chiplet
to core so that we may add other types of chiplets to the system. No functional
change.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
|
|
|
|
| |
The existing API between libpdbg and pdbg was poorly defined. Other
programs are beginning to utilise libpdbg so a more strictly defined API
would be beneficial. This patch introduces a new header (libpdbg.h) which
includes the definition of a public API for libpdbg and updates pdbg to
only depend on this.
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>
|
|
This patch adds support for starting and stopping threads on POWER9 as well as
instruction ramming which is required to read/write GPRs, etc.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|