Message ID | 20180909061859.21445-2-npiggin@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | [1/2] libpdbg/chip: implement putnia with a sequence compatible with P9 | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | master/apply_patch Successfully applied |
snowpatch_ozlabs/build-multiarch | fail | Test build-multiarch on branch master |
On Sun, 2018-09-09 at 16:18 +1000, Nicholas Piggin wrote: > This adjusts P9 MTNIA and MTMSR opcodes to match the workbook. Also > allows MTNIA now that the driver uses a P9 compatible sequence. > Tested-by: Rashmica Gupta <rashmica.g@gmail.com> > Signed-off-by: Nicholas Piggin <npiggin@gmail.com> > --- > libpdbg/p9chip.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/libpdbg/p9chip.c b/libpdbg/p9chip.c > index 189d80a..7e5a638 100644 > --- a/libpdbg/p9chip.c > +++ b/libpdbg/p9chip.c > @@ -291,10 +291,9 @@ static int __p9_ram_instruction(struct thread > *thread, uint64_t opcode, uint64_t > > switch(opcode & OPCODE_MASK) { > case MTNIA_OPCODE: > + opcode = 0x4c0000a4; > + opcode |= 0x001E0000; > predecode = 8; > - > - /* Not currently supported as we can only MTNIA from > LR */ > - PR_ERROR("MTNIA is not currently supported\n"); > break; > > case MFNIA_OPCODE: > @@ -303,6 +302,7 @@ static int __p9_ram_instruction(struct thread > *thread, uint64_t opcode, uint64_t > break; > > case MTMSR_OPCODE: > + opcode |= 0x001E0000; > predecode = 8; > break; >
diff --git a/libpdbg/p9chip.c b/libpdbg/p9chip.c index 189d80a..7e5a638 100644 --- a/libpdbg/p9chip.c +++ b/libpdbg/p9chip.c @@ -291,10 +291,9 @@ static int __p9_ram_instruction(struct thread *thread, uint64_t opcode, uint64_t switch(opcode & OPCODE_MASK) { case MTNIA_OPCODE: + opcode = 0x4c0000a4; + opcode |= 0x001E0000; predecode = 8; - - /* Not currently supported as we can only MTNIA from LR */ - PR_ERROR("MTNIA is not currently supported\n"); break; case MFNIA_OPCODE: @@ -303,6 +302,7 @@ static int __p9_ram_instruction(struct thread *thread, uint64_t opcode, uint64_t break; case MTMSR_OPCODE: + opcode |= 0x001E0000; predecode = 8; break;
This adjusts P9 MTNIA and MTMSR opcodes to match the workbook. Also allows MTNIA now that the driver uses a P9 compatible sequence. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> --- libpdbg/p9chip.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)