[Pdbg] [PATCH 6/8] libpdbg: Implement state method for sbefifo thread
Joel Stanley
joel at jms.id.au
Fri Oct 9 23:47:20 AEDT 2020
On Fri, 9 Oct 2020 at 04:01, Amitay Isaacs <amitay at ozlabs.org> wrote:
>
> Currently only p9 is supported for sbefifo thread.
>
> Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
Reviewed-by: Joel Stanley <joel at jms.id.au>
> ---
> libpdbg/sbefifo.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c
> index 9d68853..8c9f467 100644
> --- a/libpdbg/sbefifo.c
> +++ b/libpdbg/sbefifo.c
> @@ -25,6 +25,7 @@
> #include "hwunit.h"
> #include "debug.h"
> #include "sprs.h"
> +#include "chip.h"
>
> static int sbefifo_op_getmem(struct mem *sbefifo_mem,
> uint64_t addr, uint8_t *data, uint64_t size,
> @@ -320,6 +321,11 @@ static int sbefifo_thread_op(struct thread *thread, uint32_t oper)
> mode);
> }
>
> +static struct thread_state sbefifo_thread_state(struct thread *thread)
> +{
> + return p9_thread_state(thread);
> +}
> +
> static int sbefifo_thread_start(struct thread *thread)
> {
> return sbefifo_thread_op(thread, SBEFIFO_INSN_OP_START);
> @@ -714,6 +720,7 @@ static struct thread sbefifo_thread = {
> .probe = sbefifo_thread_probe,
> .release = sbefifo_thread_release,
> },
> + .state = sbefifo_thread_state,
> .start = sbefifo_thread_start,
> .stop = sbefifo_thread_stop,
> .step = sbefifo_thread_step,
> --
> 2.26.2
>
> --
> Pdbg mailing list
> Pdbg at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/pdbg
More information about the Pdbg
mailing list