From patchwork Tue Mar 12 01:49:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 1055018 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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44JHw527lCz9s7h for ; Tue, 12 Mar 2019 12:49:41 +1100 (AEDT) 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="YSGac1sz"; 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 44JHw46XLDzDqFh for ; Tue, 12 Mar 2019 12:49:40 +1100 (AEDT) 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::430; helo=mail-pf1-x430.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="YSGac1sz"; dkim-atps=neutral Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 44JHvy0ylLzDqDP for ; Tue, 12 Mar 2019 12:49:33 +1100 (AEDT) Received: by mail-pf1-x430.google.com with SMTP id s22so609301pfh.4 for ; Mon, 11 Mar 2019 18:49:33 -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:mime-version :content-transfer-encoding; bh=cqX2qfvNKxCnabWV3sbrvJyduadbZCfVoOTp+fWkQl8=; b=YSGac1szn2rf/7LqUCXWtykhCqYJNuEqtBONjRobLs8Fu/be3HplUsiEJUIHfWX0l9 XZmiJmDiPoXX6Lrqql3AN0m1oFGCjoGxeeHWL7T5pqUmh2xlXqVt/zE+43oNFx6lthDP VwRrN1K4lsMxmvLCYb59An4/ebz+Mxp+fjskbRGGKcgDbKQemAy6PlmZrZJLa+X8hRN/ CjBAj4OtQMj7/oJjcyr614l6tyoicZ+19zyrd1masOolXzDpy7Sdotbz5qHhzOhAlhcL px3OBLHwPwBnWqdz6Dk35Hh9hPheoVVZAeUF08z2qBVIuBj6tOq+vy9a+txkE1VZ++9M U+rA== 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:mime-version :content-transfer-encoding; bh=cqX2qfvNKxCnabWV3sbrvJyduadbZCfVoOTp+fWkQl8=; b=avEtXiZGU4TGK0kHA3cOnzCPlv+t4sgUpbeT1Hnu1bbKS6slYtFBZN4+vEL2fCK7OI iZXIV0Vyc6gfq6o0vJH8Jc4cEFDf71AqCMhw5SC6kIUxiiBROaVPUaOq8An1TfXYEtPf SzXePiAbYLCePnl4fp4/vT3IlM7E9wDem3xDLnU3LUOvE6k27pdMm1EOqL681IYAZ5Nr BwfBnEvTDGatYqPRCFI4uY9ujqvkEKNy67/shwB7RnMZLBypuRS6lzfei0Zan7AUvyl/ JCbIYlvRwG6B2k1VWBvUS3CItyM2hW++1WL1Y2xzdfi4zTSlo9S5W6TtE9ZcBAJHa0xS iujg== X-Gm-Message-State: APjAAAUEksATqor9DklNhVtlXj070zI1T2hX2oARQuaJnSYExQMicTYf k+WSTlKyEDw+kkHGIvshvqjYi44n X-Google-Smtp-Source: APXvYqzFkqqckhRvbygFBQQhQnE7d3lU45d2W95yf8uSLLY6QIcbyGx16wAQ5H84wvxCXdHjZhzU3A== X-Received: by 2002:a63:d502:: with SMTP id c2mr11123085pgg.290.1552355370129; Mon, 11 Mar 2019 18:49:30 -0700 (PDT) Received: from bobo.ibm.com ([1.132.158.219]) by smtp.gmail.com with ESMTPSA id m9sm10592891pfi.31.2019.03.11.18.49.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Mar 2019 18:49:29 -0700 (PDT) From: Nicholas Piggin To: pdbg@lists.ozlabs.org Date: Tue, 12 Mar 2019 11:49:13 +1000 Message-Id: <20190312014920.25368-1-npiggin@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Pdbg] [PATCH v2 0/7] sreset support for P8 systems X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.29 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 Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" This is a bit more polished, with some debug code and "just in case" things removed, and some bugs fixed. It is more stable now in basic testing, but have not stress tested it. Main bug fixed was to destory the ram mode after successful sreset emulation. Without this, things would sometimes work and sometimes crash very badly. I added code to automatically quiesce siblings as needed and resume them, in order to make emulated sreset command behave the same way as direct sreset (e.g., you have to stop only the target thread explicitly). Probably ready for a bit wider review and testing now. Thanks, Nick Nicholas Piggin (7): libpdbg: Fix CHECK_ERR macro to evaluate once in error case libpdbg/p8chip.c: read status from correct target libpdbg/p8chip.c: Only write the SP_STOP bit once libpdbg/p8chip.c: release special wakeups for P8 libpdbg: use MTMSRD opcode rather than MTMSR libpdbg/p8chip.c: ram state setup sequence match workbook libpdbg/p8chip.c: Emulate sreset using ramming for active threads libpdbg/operations.h | 7 +- libpdbg/p8chip.c | 241 ++++++++++++++++++++++++++++++++++++------- 2 files changed, 205 insertions(+), 43 deletions(-)