[Pdbg] [PATCH 2/2] libpdbg/p9chip: MTNIA and MTMSR fixes
Rashmica Gupta
rashmica.g at gmail.com
Mon Sep 10 09:34:55 AEST 2018
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 at gmail.com>
> Signed-off-by: Nicholas Piggin <npiggin at 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;
>
More information about the Pdbg
mailing list