From patchwork Sun Sep 9 06:18:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 967714 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 427Lc95RWfz9s2P for ; Sun, 9 Sep 2018 16:19:21 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="EKPQrI+a"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 427Lc93KrbzF31j for ; Sun, 9 Sep 2018 16:19:21 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="EKPQrI+a"; dkim-atps=neutral X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::643; helo=mail-pl1-x643.google.com; envelope-from=npiggin@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="EKPQrI+a"; dkim-atps=neutral Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 427Lc25hm0zF396 for ; Sun, 9 Sep 2018 16:19:14 +1000 (AEST) Received: by mail-pl1-x643.google.com with SMTP id f66-v6so156781plb.10 for ; Sat, 08 Sep 2018 23:19:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=XYLKzLK61EnNLiw3OFHhY+1vCqBA1zoNq08EOk8Gijw=; b=EKPQrI+ahti0QYyeMEb8ApTv0JUrt989wqHm7eTCyB5KY8zGjWD5Kj5MniB4a08ad4 88iv8OHPHA8LWv2WcLpZVDrJEOklWn5yv+RVz2WzzTSMtiVDVnxaatcVQhJykCTeobUV fO3ldHKmdQlXkkkzeZXEhKEaJPqR7CTaon7eU0uJXF/tWRBnDEGuaL6Pate5ylcDibwV Zd0i47Vx2R/94tmy5PJOGAHHMq7wGDUnvfbdsPKugAN/DFVrSeZlwHqVG4mFk4X5Ybac YUHk/XLgawfMjp5mpgrkS1OEkKg9xgdR35Iy9HIw6mMxU+2iT/uRENCiy1sOkE5kN/2I LJhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=XYLKzLK61EnNLiw3OFHhY+1vCqBA1zoNq08EOk8Gijw=; b=HLTcy/RIB6tbvYqt+1UDIAJH+50Mmh1DA9Kn6fXwSUkkMqKbJy2PAg8OnKR2KLQpls lJfJNgk3Ie4V4utYyP2EOcRQnU4QF/51y/YKQVgeEZFwLLLJqhcRIn4sLROsEowuWo0o 608T7w9TBXV5KSAIWoNJu0v3ykqJx8BpC5hVEWvAVWdwqOvC7F2xJ0Yag/Btn9a0RtZj UnZzZGs3/tsxVkDzCLbCT/tdFAiVKKIuihcLcTcg/bJ+2r9OxaQ8c+6jxl8Q1L1MRFuY peqSxfBCmDMIHlKjg20PQt7eziCOmpX8CyHn8gp6JStLGgXGs2EznxQ+8cjTAhTbqX9T PcqQ== X-Gm-Message-State: APzg51BVtNL1hKr81lm3YqXFGvPOE5xBofZbgvU8aJ+wEfXT+grjZZic j+QGYWfH3cJ3kBw8z+ite1BEN3vK X-Google-Smtp-Source: ANB0VdYRJX2XuP/lC1lwQhtEvrxZemieGgkoShB24UfAQaNIQHh8eLU/bpwe67qfDY/zWKaS4qfWZg== X-Received: by 2002:a17:902:b947:: with SMTP id h7-v6mr15864754pls.157.1536473952710; Sat, 08 Sep 2018 23:19:12 -0700 (PDT) Received: from roar.au.ibm.com (115-64-249-220.tpgi.com.au. [115.64.249.220]) by smtp.gmail.com with ESMTPSA id 82-v6sm16921870pfw.159.2018.09.08.23.19.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Sep 2018 23:19:12 -0700 (PDT) From: Nicholas Piggin To: pdbg@lists.ozlabs.org Date: Sun, 9 Sep 2018 16:18:59 +1000 Message-Id: <20180909061859.21445-2-npiggin@gmail.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180909061859.21445-1-npiggin@gmail.com> References: <20180909061859.21445-1-npiggin@gmail.com> Subject: [Pdbg] [PATCH 2/2] libpdbg/p9chip: MTNIA and MTMSR fixes X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nicholas Piggin MIME-Version: 1.0 Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" 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 Tested-by: Rashmica Gupta --- 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;