[Pdbg] [PATCH 11/14] libpdbg: Remove enable_attn target command

Nicholas Piggin npiggin at gmail.com
Tue Mar 29 19:58:14 AEDT 2022


Excerpts from Joel Stanley's message of March 16, 2022 9:47 am:
> On Mon, 14 Mar 2022 at 04:18, Nicholas Piggin <npiggin at gmail.com> wrote:
>>
>> enable_attn is only used by gdbserver and it can be implemented with
>> existing target register access. Move it to gdbserver.
> 
> The downside of this is it moves chip-specific code into the proxy.
> Would it make sense to keep all hardware specific code in libpdbg?

Yeah, I'm not sure how best to split it up.

We almost need a middle-end for a given processor. The back-ends let
you do things like modify an SPR, but they don't necessarily know what
that SPR is for.

I tried the ->enable_attn route to start with, but then let's say
p9chip.c and p10chip.c will have copies, and then sbefifo will have
its own that will have to do differently depending on whether it's
a p9 or p10...

So I ended up just putting it in gdbserver for now.

I guess it's probably not _that_ complicated to do the right thing.
We'd have some helpers in the p*chip.c libs that do the SPR updates
via the backend accessors, and then call those. I just didn't get
that working yet.

Thanks,
Nick


More information about the Pdbg mailing list