Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp19941ybz; Tue, 21 Apr 2020 14:17:19 -0700 (PDT) X-Google-Smtp-Source: APiQypJjUqh5ixGWdHad72kTtOkLVOjgHu5tdbSUeUx4ihNd5vWDDsI6SfINN5ExMcBiWVIlsAda X-Received: by 2002:a17:906:add7:: with SMTP id lb23mr24309370ejb.6.1587503839062; Tue, 21 Apr 2020 14:17:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587503839; cv=none; d=google.com; s=arc-20160816; b=y1e19Q1GJLsXh9g3/5vaXIMO0iix5SQ8y4j8eRlNp7VEdoFUF12IgGnv1LYm1GcYoz xmv5aHZK9KxDEajbEvBZfwnGBGBN27kM1yj7FzZYgmu0+gWh6wBgdLzOL8HPTTYsFCPz 15nkORJufPyyW76Z0FR+DpjNU4H7/QEVkM6cRN3edl4nk5fJeXqr1IBkcNLJvw5H8i7N RnenFO0IsX2JE69K+jS9o1YpKU5VRw3EFCiRSa995J8DECvk0gn4tG8kgnzJRhMxeyGE E51M5IQ8bSb0lwWeDgwYVGHfjY0rbU+OdwhnEB2A3Jdvkx+GPjShw/2LMd3OU2AHYxS8 v5kQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=aFTviJPrKuTMM7A/RFhxVuMj7vnHygi6BZ20JfR32qQ=; b=kCY9qpOMEGD9SFI3xTAIoohpnc1rx0H3tAh/KOcO8JmAbyLUX/3tcZ6x3kgCJyYofd 7wsqJ502g+P07y6s13bIyau0SZcvdzagU2wvd10/vSHl0PGHIlrO3dg1h50ywYXqPzAA nmqQQsm32hJ83jiyCUzcs6lodXxQGsgPJZqv3RlUd9XKUf58dI2W7rBAF/LloSl9kwn1 Ub4LGdfocUT+LJ9HMi/3S8+pU4LM/KWjJjVcC1FdS/tEfEczwGIkAlNq3auuuw3ecYyB VN5hpvjZqt9nCQOxwrUq7OyQO1vv8Ci+3PJIuDu/zCeEQGNpWWgs2eDy7IlQK7ZY95bc DxdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=DJykRx+t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a12si2404982edk.296.2020.04.21.14.16.54; Tue, 21 Apr 2020 14:17:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=DJykRx+t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726440AbgDUVPo (ORCPT + 99 others); Tue, 21 Apr 2020 17:15:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726384AbgDUVP2 (ORCPT ); Tue, 21 Apr 2020 17:15:28 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 908E3C03C1A6 for ; Tue, 21 Apr 2020 14:15:28 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id x26so7364999pgc.10 for ; Tue, 21 Apr 2020 14:15:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aFTviJPrKuTMM7A/RFhxVuMj7vnHygi6BZ20JfR32qQ=; b=DJykRx+tWWAumEWwnSE3iLPH/LZN5hsuI9JxuBHfkBbrifQ+PTh/SAy2vB0gT+4ZGT 41raTO+9jGi733au3YEoRUgZ+wWSdTJP4kiLGz5Yb/9nmsQWucxZEds8LBLzz7IE++R4 rwed5Me4aZ97tVLFx2HbojUAkouKfjL/0tU3k= 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:mime-version:content-transfer-encoding; bh=aFTviJPrKuTMM7A/RFhxVuMj7vnHygi6BZ20JfR32qQ=; b=bGM5E4npUoJ3I7anVMMeSE606JRVSKOBA+enH/I6blEgaOu0A5J66A+dJpgg7T5GM/ EUjar58P0v4qROTRatUX0JVVqUe+sTJr1js2TnRPtKHjCbVgyab9k7dLt2JOd0zRKWID /88QuXu0Xkx6v/ziZNGjjfuNbTCyr0e+sLR8+UeVZQK4mrTMef2xHjObmrU5EEkIIB6Y hGqtXq7Gpnnt8iOM2zRCzs2nHfT2p0ulUAHMxZy45YqsTlNr9eLjbQf6tbemG2uXgP7V 5hhx2gc4QKpktXaSNWcUc19qg08cr9jRIhOJINuSEb87DUJLRMKtJ4af+y/6bAeEvX4f B+oQ== X-Gm-Message-State: AGi0PuY/B3Xbi1NAoXfNic0MPUU1o7e9+MXk3gR/IMoyprhP84sox5tV uiO7p0d8/o62kQarey8YwVqWnA== X-Received: by 2002:a63:1506:: with SMTP id v6mr24334707pgl.365.1587503728073; Tue, 21 Apr 2020 14:15:28 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:1:24fa:e766:52c9:e3b2]) by smtp.gmail.com with ESMTPSA id c1sm3287880pfo.152.2020.04.21.14.15.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Apr 2020 14:15:27 -0700 (PDT) From: Douglas Anderson To: jason.wessel@windriver.com, daniel.thompson@linaro.org, gregkh@linuxfoundation.org Cc: kgdb-bugreport@lists.sourceforge.net, mingo@redhat.com, hpa@zytor.com, bp@alien8.de, linux-serial@vger.kernel.org, agross@kernel.org, tglx@linutronix.de, frowand.list@gmail.com, bjorn.andersson@linaro.org, jslaby@suse.com, catalin.marinas@arm.com, corbet@lwn.net, will@kernel.org, Douglas Anderson , Andrew Morton , Borislav Petkov , Juergen Gross , Mauro Carvalho Chehab , Pawan Gupta , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 7/9] Documentation: kgdboc: Document new earlycon_kgdboc parameter Date: Tue, 21 Apr 2020 14:14:45 -0700 Message-Id: <20200421141234.v2.7.I7d5eb42c6180c831d47aef1af44d0b8be3fac559@changeid> X-Mailer: git-send-email 2.26.1.301.g55bc3eb7cb9-goog In-Reply-To: <20200421211447.193860-1-dianders@chromium.org> References: <20200421211447.193860-1-dianders@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The recent patch ("kgdboc: Add earlycon_kgdboc to support early kgdb using boot consoles") adds a new kernel command line parameter. Document it. Note that the patch adding the feature does some comparing/contrasting of "earlycon_kgdboc" vs. the existing "ekgdboc". See that patch for more details, but briefly "ekgdboc" can be used _instead_ of "kgdboc" and just makes "kgdboc" do its normal initialization early (only works if your tty driver is already ready). The new "earlycon_kgdboc" works in combination with "kgdboc" and is backed by boot consoles. Signed-off-by: Douglas Anderson --- Changes in v2: None .../admin-guide/kernel-parameters.txt | 20 +++++++++++++++++++ Documentation/dev-tools/kgdb.rst | 14 +++++++++++++ 2 files changed, 34 insertions(+) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index f2a93c8679e8..588625ec2993 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -1132,6 +1132,22 @@ address must be provided, and the serial port must already be setup and configured. + earlycon_kgdboc= [KGDB,HW] + If the boot console provides the ability to read + characters and can work in polling mode, you can use + this parameter to tell kgdb to use it as a backend + until the normal console is registered. Intended to + be used together with the kgdboc parameter which + specifies the normal console to transition to. + + The the name of the early console should be specified + as the value of this parameter. Note that the name of + the early console might be different than the tty + name passed to kgdboc. If only one boot console with + a read() function is enabled it's OK to leave the + value blank and the first boot console that implements + read() will be picked. + earlyprintk= [X86,SH,ARM,M68k,S390] earlyprintk=vga earlyprintk=sclp @@ -1190,6 +1206,10 @@ This is designed to be used in conjunction with the boot argument: earlyprintk=vga + This parameter works in place of the kgdboc parameter + but can only be used if the backing tty is available + very early in the boot process. + edd= [EDD] Format: {"off" | "on" | "skip[mbr]"} diff --git a/Documentation/dev-tools/kgdb.rst b/Documentation/dev-tools/kgdb.rst index d38be58f872a..c0b321403d9a 100644 --- a/Documentation/dev-tools/kgdb.rst +++ b/Documentation/dev-tools/kgdb.rst @@ -274,6 +274,20 @@ don't like this are to hack gdb to send the :kbd:`SysRq-G` for you as well as on the initial connect, or to use a debugger proxy that allows an unmodified gdb to do the debugging. +Kernel parameter: ``earlycon_kgdboc`` +------------------------------------- + +If you specify the kernel parameter ``earlycon_kgdboc`` and your serial +driver registers a boot console that supports polling (doesn't need +interrupts and implements a nonblocking read() function) kgdb will attempt +to work using the boot console until it can transition to the regular +tty driver specified by the ``kgdboc`` parameter. + +Normally there is only one boot console (especially that implements the +read() function) so just adding ``earlycon_kgdboc`` on its own is +sufficient to make this work. If you have more than one boot console you +can add the boot console's name to differentiate. + Kernel parameter: ``kgdbwait`` ------------------------------ -- 2.26.1.301.g55bc3eb7cb9-goog