[Pdbg] [PATCH 13/19] pdbg/gdbserver: Add in basic skeleton for a gdbserver on p8
Nicholas Piggin
npiggin at gmail.com
Thu Aug 30 20:01:45 AEST 2018
On Thu, 30 Aug 2018 10:18:30 +1000
Rashmica <rashmica.g at gmail.com> wrote:
> On 29/08/18 18:36, Nicholas Piggin wrote:
>
> > On Wed, 29 Aug 2018 11:50:41 +1000
> > Rashmica Gupta <rashmica.g at gmail.com> wrote:
> >
> >> From: Alistair Popple <alistair at popple.id.au>
> >>
> >> I have changed a few bits here and there but this patch is largely
> >> authored by Alistair Popple.
> > So what's missing for P9? enable_attn? Anything else?
>
> There's a couple of things that I'm trying to work out regarding P9.
>
> - we can't mtnia from an arbitrary register in ramming mode (can only do it
> from the link register).
I had a bit of a hack at this. I'll try to dig it out.
>
> - p9 doesn't play happily with breakpoints yet. I have tried clearing
> the icache as you suggested below but that didn't seem to help.
Yeah I didn't *think* icache flush would be an issue but it was worth
a quick try. PC workbook doesn't seem to give any insight. Could make
the break point facility optional until we sort it out?
>
> I think there was something else, but it escapes me atm.
Okay well that answers my question. You needn't get P9 working
before the P8 support is merged.
> > How does
> > this work here, do we save the instruction, replace it with break, and
> > then restore the instruction after the break?
>
> GDB handles this for us. GDB reads and saves the value at the addr. It asks us
> to write the attn instruction to the addr, and then tells us to continue execution.
> When we detect that we have paused (in the SIGNAL_WAIT case of the poll function)
> we send a trap signal to GDB. GDB then asks us to write back the original value
> at the address.
Okay cool.
> >> + assert(!strcmp(target->class, "thread"));
> >> + // Temporary until I can get this working a bit smoother on p9
> >> + if (strcmp(target->compatible, "ibm,power8-thread")) {
> >> + PR_ERROR("GDBSERVER is only tested on POWER8\n");
> >> + return -1;
> >> + }
> > I would say since making a lot of improvements to power9 direct
> > controls, this should just about work out of the box there too.
>
> What are the direct controls?
Oh just all the stop/start/ram etc scoms.
Thanks,
Nick
More information about the Pdbg
mailing list