From patchwork Tue May 31 09:14:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 1637269 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=fl2TRUze; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LC67p4LgWz9s1l for ; Tue, 31 May 2022 19:15:34 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4LC67p3Ftfz3bgC for ; Tue, 31 May 2022 19:15:34 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=fl2TRUze; dkim-atps=neutral X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::1035; helo=mail-pj1-x1035.google.com; envelope-from=npiggin@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=fl2TRUze; dkim-atps=neutral Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4LC67h1hJWz3bkQ for ; Tue, 31 May 2022 19:15:27 +1000 (AEST) Received: by mail-pj1-x1035.google.com with SMTP id v5-20020a17090a7c0500b001df84fa82f8so1678270pjf.5 for ; Tue, 31 May 2022 02:15:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3+x5cIv7M5fDzddG56XzhHsgcD1hdyGBhuQgGAfs3Bw=; b=fl2TRUzedZOOI1VHnBlQ/61uGHYbaKP2p+FEDUDL4oFLPL+juDN7LXCCU4ymmNLj+8 UgLFKglDIeVZH3BO/7jeCbtgGGUu6XlIHQLhThAkIpyFje5b/SvzYfeDxXKD71fvFDY3 GZhS9U+AR0aPL5UBqMpi0buRlrsBy+ZBmMawEmgWxwS2P3e0S7r/XRhLPuP3yPmW3+2R kOrmEJFrCCeNwGjFQx+/UM5K27hMOn5TvhyPAhkAKfhxxggkZQZKRf7C/AB6QjIxs8lZ S5VSTx403mJCB9D3VrMKIc/ju+LX+k5pse+IIAGXDmbbXpwaPMS3wzKAp5+rAnYQB0aC 1W0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3+x5cIv7M5fDzddG56XzhHsgcD1hdyGBhuQgGAfs3Bw=; b=7fttZhu1vaxuAO6MRyg6TL5sKSKW7S8KMN91bv5de1q5Rzit+GiNLZ8y9c4gl5jArS sDqmMuVoNON9ydtFDeSY7PNhkgDd8f7EPxiwLM3sj1rXYKxhrLpHY8/8Dc6gFPJMu1eo 8WKDXTiQcje4L2d+fA6sCo3JZol3xIP2HWqBqGgyrb1Gl4QNLst1v84Ss9ncKR+FTC/E c7919ziKKjcMKBJn4NaIpVv2dqyQMnv83a90+jycsOBkVeJjzeHXyKxjUoul6vxVVn37 01yHdep4bisTKce/QxPsjOxub4PgFEU5tT8SWGBkX1vQ9ckjhq8HRAJeALoA/mW+Snid 0ADw== X-Gm-Message-State: AOAM531pqXrWOeJDOOKUekAcwnynrKe1HUxb7DHAdS9u2SvQ0bll9RzM Zhj59Q4h2MOgfG6ZEoecGHtHZ9aWVczm8A== X-Google-Smtp-Source: ABdhPJzukavlMsq6l8Led2CUpl5X2fdtXE+krcAho5usDtDPxWggUnR+DKOcUEW2hN23yTljStyWKg== X-Received: by 2002:a17:902:e552:b0:163:6a5e:4e08 with SMTP id n18-20020a170902e55200b001636a5e4e08mr27364847plf.130.1653988525797; Tue, 31 May 2022 02:15:25 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (220-245-15-130.tpgi.com.au. [220.245.15.130]) by smtp.gmail.com with ESMTPSA id t10-20020a17090a950a00b001e2ebcce5d5sm1282857pjo.37.2022.05.31.02.15.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 May 2022 02:15:25 -0700 (PDT) From: Nicholas Piggin To: pdbg@lists.ozlabs.org Date: Tue, 31 May 2022 19:14:57 +1000 Message-Id: <20220531091457.2208488-11-npiggin@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220531091457.2208488-1-npiggin@gmail.com> References: <20220531091457.2208488-1-npiggin@gmail.com> MIME-Version: 1.0 Subject: [Pdbg] [PATCH 10/10] gdbserver: Add a note about the attn_handler service on the BMC 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" gdbserver's use of attn for breakpoints is not well integrated into the rest of the firmware stack at the moment. attn firing can cause the BMC to perform error handling (e.g., PEL, reboot). Add a note to the README to disable the attn_handler.service if breakpoints are to be used with gdbserver. While we're here update the documentation to reflect that we no longer have to stop all threads before running gdbserver. Signed-off-by: Nicholas Piggin --- README.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f97b6824..338dba2e 100644 --- a/README.md +++ b/README.md @@ -540,12 +540,15 @@ Memory access can only be performed on kernel memory. To run a gdbserver on a machine from a BMC running OpenBMC: -Stop all the threads of the core(s) you want to look at. Ideally all -threads in the machine should be debugged: +* Read NOTES and set up the BMC and host as recommended. + +* (Optional) Stop the threads of the core(s) you want to look at. Ideally + all threads in the machine should be debugged: $ ./pdbg -a stop -Run gdbserver on the target threads, accessible through port 44 +* Run gdbserver on the target threads, accessible through port 44 + $ ./pdbg -a gdbserver 44 The thread-id tid is set to the PIR of the corresponding thread, the @@ -580,6 +583,12 @@ good idea. misbehaving, booting Linux with powersave=off is the first thing to try. 5. attn instructions seem to cause host hangs on POWER9. gdb breakpoints should not be used. +6. attn instructions can cause the service processor to begin error handling. + If breakpoints are to be used, the attn handler service on the BMC should + be stopped first (don't forget to start it again when done). + + systemctl stop attn_handler.service + ## Submitting patches