[Pdbg] [PATCH v2] WIP: POWER8 SRESET

Alistair Popple alistair at popple.id.au
Fri Mar 8 15:39:35 AEDT 2019


Thanks for testing Artem, although as you point out this was a very work in 
progress patch and wasn't really complete/tested. However Nick's just posted a 
series with a heap of bugfixes and it seems to work much more reliably on my 
system at least so it would be worth giving that a shot.

Regards,

Alistair

On Thursday, 7 March 2019 11:58:48 AM AEDT Artem Senichev wrote:
> On Thu, Mar 07, 2019 at 04:43:34PM +1100, Alistair Popple wrote:
> > SRESET on POWER8 is made more complex because it can only be run if a
> > thread is in a powersave state. This makes getting an active thread
> > into SRESET hard because we need to emulate what the processor does
> > using instruction ramming.
> > 
> > This patch aims to implement this sequence. If a thread is in a nap
> > state it will just use the direct controls, however if it is in an
> > active state it will quiesce the thread and use instruction ramming to
> > put the thread at the 0x100 sreset exception vector.
> > 
> > Signed-off-by: Alistair Popple <alistair at popple.id.au>
> > ---
> > 
> >  libpdbg/chip.c   | 42 ++++++++++++++++++++++++++++++++++++++++++
> >  libpdbg/p8chip.c | 24 ++++++++++++++++++------
> >  src/thread.c     | 14 ++++++++++++++
> >  3 files changed, 74 insertions(+), 6 deletions(-)
> 
> Hi Alistair,
> I've tried the patch, just out of curiosity, it looks like two
> simultaneous sreset signal are send to the host, the kernel hangs with
> message:
> 
> cpu 0x0: Vector: 100 (System Reset) at [c000000001d07bb8]
>     pc: c0000000000a84d8: power7_idle_type+0x68/0x90
>     lr: c0000000000a84d8: power7_idle_type+0x68/0x90
>     sp: c000000001d07d30
>    msr: 9000000000001033
>   current = 0xc000000001cb1900
>   paca    = 0xc000000001f70000	 irqmask: 0x03	 irq_happened: 0x01
>     pid   = 0, comm = swapper/0
> Linux version 5.0.0 (art at art) (gcc version 8.3.0 (Buildroot
> 2019.05-git-01359-g9550765adb)) #2 SMP Thu Mar 7 10:39:05 MSK 2019 cpu
> 0x80: Vector: 100 (System Reset) at [c000003fcadb3bd8]
>     pc: c0000000000a84d8: power7_idle_type+0x68/0x90
>     lr: c0000000000a84d8: power7_idle_type+0x68/0x90
>     sp: c000003fcadb3d50
>    msr: 9000000000001033
>   current = 0xc000003fcad45600
>   paca    = 0xc000003fff6db880	 irqmask: 0x03	 irq_happened: 0x01
>     pid   = 0, comm = swapper/128
> Linux version 5.0.0 (art at art) (gcc version 8.3.0 (Buildroot
> 2019.05-git-01359-g9550765adb)) #2 SMP Thu Mar 7 10:39:05 MSK 2019
> 
> It happens when the target CPU thread is idle, with 100% loading there
> is still 'cpu 0x0: Vector: 400 (Instruction Access)' error.




More information about the Pdbg mailing list