Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3791769yba; Tue, 23 Apr 2019 09:40:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqxtX2LwyIfQnbvQDGvIur33qtrPrIGA9U4YWvWsK7j8yiV4FHzStY7PNHH6yGreTNTfIgkz X-Received: by 2002:a63:f809:: with SMTP id n9mr25040660pgh.201.1556037604920; Tue, 23 Apr 2019 09:40:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556037604; cv=none; d=google.com; s=arc-20160816; b=oWBtGsdy/KR/zy6ySRnBHekEQEgr/HHLJVLloelSn8DRs1RysxbPdQI5Z2ByHqk4jK egbJ8N0SOcHccA4GIm5Uv2542CSnaHurW9RPymhxBW1V/cHcIUdJ0Dl7qqlK4L+1qsVs X30FLlqbBkmSARCtjJaPHKQRdDM+qRarX7rDC+n5cQXzqqNgi7pXyXZT3VR23CByXZKQ fo6Mg9tgJNkMYM/RvcG687iGYJ3p+Piad/VovcXTBvVcOOap79O6MWn4z3ftEoMOL38D wJ6SUeDhgdA4ayTumagQDn9vG1Bru85EfSLCDMoaSlIcIIS06wY70GFmo7blSZ/0AUjP gG1Q== 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=XTxWAkITaeuXkEicHzgb86kvZ4CtkW/rQaAM31H+6pk=; b=jZuUlpe9RDD6LPS2hkIfXK4srbz8i9WtqshjXaRncoW6jroORZaSysnTjKUgqBNGxI npFJnKJXB55HySYK4QHapvG6qxre9XSmzr/fYya6dacRchEvn8mtq9ZkK9EK24EMLKe5 4YWEFgRIUdlBVxRD/dyApmmexKli9sRRjO+PQmBSpRT76na+ETbQCl7PtXs9izxlHfik dLAOzzNC2tvhE//a9QZOgphtfVx7+nv4SjyWY+rvQez4G2hKSHjfkEA3WaXbW7SgvvYB czycTDG3oQpF81AsFY5HoR7q0WpseeQ/16t6C9bU3Ln2Tk4NVcqAtQF1AdInPCHoeivM z8jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eCiNdsu6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h29si17145543pfd.180.2019.04.23.09.39.48; Tue, 23 Apr 2019 09:40:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eCiNdsu6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729323AbfDWQhf (ORCPT + 99 others); Tue, 23 Apr 2019 12:37:35 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:33908 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728560AbfDWQhe (ORCPT ); Tue, 23 Apr 2019 12:37:34 -0400 Received: by mail-pg1-f194.google.com with SMTP id v12so7894436pgq.1; Tue, 23 Apr 2019 09:37: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:in-reply-to:references :mime-version:content-transfer-encoding; bh=XTxWAkITaeuXkEicHzgb86kvZ4CtkW/rQaAM31H+6pk=; b=eCiNdsu6+WsWsnughnjrVWSGiV78Aj4u6TzDcIJXQxaGjmBFblUZvNFfWA09+0kmL9 8fP6mWrIjKmuzVEygYbJPteG90WmilTSL/qi9t36gkH9YXG8prEpQ3WYP2xc8Pf9DL4P 0Qn57e/UltVviGuYURQcjbVbrUtn8kqZypF2CdcASLlaOjinHz8X6fewYJq9oPmrqZcb p0I3zdEU+FmutX6PpxW+tnXmfmUv0fW78pBTezP6rBNNiHhvVmWZkDhMq5P+p+ZZy9ov LzWf2S3JSyYkkCAuOpRsF5U3a9+FZEetKJ0gbL0Pr0CEzEE/mJoSoOXv3SUKbJVuENvF rPlw== 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=XTxWAkITaeuXkEicHzgb86kvZ4CtkW/rQaAM31H+6pk=; b=Zzpn0XuI/EG+Jn6Gbpql9VZhdKNn3F4pwI4RfIEXjOpFBYk0xwd5sNi6dIcDzYG1Si PoNHU25QsVuCVCV1/4JeAHeGvHng7HMLfcUqQtQTqnkxjuaGFEPk4sMpSBoAMAmKwHSW hst0yRwti80AoMLVHiCTsxd+UPrVP4F7LgU8BLwB6ar2KhV1SdwgZEQlr6xGAoHKex6O OcrhppCSnkesnh4E/lcJ5nS29plPoZvcdHhDfK8nDRc1S6NK+TbwBOvqMUZ4E1D0z/BL zsqJb0OKWPMTaPBthSxjijfxVJ8wL/6xVaqay5gWzpuvkyQOL23qj9VcCC6z0O+m0poY Waog== X-Gm-Message-State: APjAAAXuyslB+PIkGu0rdUexwcoIvAcJs3eQL0EmhWwivU98U0YYQd92 gTRujuUoAAO0hKGGW3f6rzMPH7a5 X-Received: by 2002:a63:330e:: with SMTP id z14mr25407161pgz.4.1556037452484; Tue, 23 Apr 2019 09:37:32 -0700 (PDT) Received: from localhost.localdomain ([104.238.181.70]) by smtp.gmail.com with ESMTPSA id v1sm24364801pff.81.2019.04.23.09.37.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Apr 2019 09:37:31 -0700 (PDT) From: Changbin Du To: Jonathan Corbet Cc: Bjorn Helgaas , rjw@rjwysocki.net, linux-pci@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, x86@kernel.org, fenghua.yu@intel.com, linuxppc-dev@lists.ozlabs.org, linux-acpi@vger.kernel.org, linux-gpio@vger.kernel.org, mchehab+samsung@kernel.org, Changbin Du Subject: [PATCH v4 43/63] Documentation: x86: convert earlyprintk.txt to reST Date: Wed, 24 Apr 2019 00:29:12 +0800 Message-Id: <20190423162932.21428-44-changbin.du@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190423162932.21428-1-changbin.du@gmail.com> References: <20190423162932.21428-1-changbin.du@gmail.com> 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 This converts the plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Changbin Du --- Documentation/x86/earlyprintk.rst | 148 ++++++++++++++++++++++++++++++ Documentation/x86/earlyprintk.txt | 141 ---------------------------- Documentation/x86/index.rst | 1 + 3 files changed, 149 insertions(+), 141 deletions(-) create mode 100644 Documentation/x86/earlyprintk.rst delete mode 100644 Documentation/x86/earlyprintk.txt diff --git a/Documentation/x86/earlyprintk.rst b/Documentation/x86/earlyprintk.rst new file mode 100644 index 000000000000..519402451f9c --- /dev/null +++ b/Documentation/x86/earlyprintk.rst @@ -0,0 +1,148 @@ +.. SPDX-License-Identifier: GPL-2.0 + +============ +Early Printk +============ + +Mini-HOWTO for using the earlyprintk=dbgp boot option with a +USB2 Debug port key and a debug cable, on x86 systems. + +You need two computers, the 'USB debug key' special gadget and +and two USB cables, connected like this:: + + [host/target] <-------> [USB debug key] <-------> [client/console] + +There are a number of specific hardware requirements +==================================================== + + a) Host/target system needs to have USB debug port capability. + + You can check this capability by looking at a 'Debug port' bit in + the lspci -vvv output:: + + # lspci -vvv + ... + 00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03) (prog-if 20 [EHCI]) + Subsystem: Lenovo ThinkPad T61 + Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx- + Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- /grub.cfg.) + + On systems with more than one EHCI debug controller you must + specify the correct EHCI debug controller number. The ordering + comes from the PCI bus enumeration of the EHCI controllers. The + default with no number argument is "0" or the first EHCI debug + controller. To use the second EHCI debug controller, you would + use the command line: "earlyprintk=dbgp1" + + NOTE: normally earlyprintk console gets turned off once the + regular console is alive - use "earlyprintk=dbgp,keep" to keep + this channel open beyond early bootup. This can be useful for + debugging crashes under Xorg, etc. + + b) On the client/console system: + + You should enable the following kernel config option:: + + CONFIG_USB_SERIAL_DEBUG=y + + On the next bootup with the modified kernel you should + get a /dev/ttyUSBx device(s). + + Now this channel of kernel messages is ready to be used: start + your favorite terminal emulator (minicom, etc.) and set + it up to use /dev/ttyUSB0 - or use a raw 'cat /dev/ttyUSBx' to + see the raw output. + + c) On Nvidia Southbridge based systems: the kernel will try to probe + and find out which port has a debug device connected. + +Testing that it works fine +========================== + + You can test the output by using earlyprintk=dbgp,keep and provoking + kernel messages on the host/target system. You can provoke a harmless + kernel message by for example doing:: + + echo h > /proc/sysrq-trigger + + On the host/target system you should see this help line in "dmesg" output:: + + SysRq : HELP : loglevel(0-9) reBoot Crashdump terminate-all-tasks(E) memory-full-oom-kill(F) kill-all-tasks(I) saK show-backtrace-all-active-cpus(L) show-memory-usage(M) nice-all-RT-tasks(N) powerOff show-registers(P) show-all-timers(Q) unRaw Sync show-task-states(T) Unmount show-blocked-tasks(W) dump-ftrace-buffer(Z) + + On the client/console system do:: + + cat /dev/ttyUSB0 + + And you should see the help line above displayed shortly after you've + provoked it on the host system. + +If it does not work then please ask about it on the linux-kernel@vger.kernel.org +mailing list or contact the x86 maintainers. diff --git a/Documentation/x86/earlyprintk.txt b/Documentation/x86/earlyprintk.txt deleted file mode 100644 index 46933e06c972..000000000000 --- a/Documentation/x86/earlyprintk.txt +++ /dev/null @@ -1,141 +0,0 @@ - -Mini-HOWTO for using the earlyprintk=dbgp boot option with a -USB2 Debug port key and a debug cable, on x86 systems. - -You need two computers, the 'USB debug key' special gadget and -and two USB cables, connected like this: - - [host/target] <-------> [USB debug key] <-------> [client/console] - -1. There are a number of specific hardware requirements: - - a.) Host/target system needs to have USB debug port capability. - - You can check this capability by looking at a 'Debug port' bit in - the lspci -vvv output: - - # lspci -vvv - ... - 00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03) (prog-if 20 [EHCI]) - Subsystem: Lenovo ThinkPad T61 - Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx- - Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- /grub.cfg.) - - On systems with more than one EHCI debug controller you must - specify the correct EHCI debug controller number. The ordering - comes from the PCI bus enumeration of the EHCI controllers. The - default with no number argument is "0" or the first EHCI debug - controller. To use the second EHCI debug controller, you would - use the command line: "earlyprintk=dbgp1" - - NOTE: normally earlyprintk console gets turned off once the - regular console is alive - use "earlyprintk=dbgp,keep" to keep - this channel open beyond early bootup. This can be useful for - debugging crashes under Xorg, etc. - - b.) On the client/console system: - - You should enable the following kernel config option: - - CONFIG_USB_SERIAL_DEBUG=y - - On the next bootup with the modified kernel you should - get a /dev/ttyUSBx device(s). - - Now this channel of kernel messages is ready to be used: start - your favorite terminal emulator (minicom, etc.) and set - it up to use /dev/ttyUSB0 - or use a raw 'cat /dev/ttyUSBx' to - see the raw output. - - c.) On Nvidia Southbridge based systems: the kernel will try to probe - and find out which port has a debug device connected. - -3. Testing that it works fine: - - You can test the output by using earlyprintk=dbgp,keep and provoking - kernel messages on the host/target system. You can provoke a harmless - kernel message by for example doing: - - echo h > /proc/sysrq-trigger - - On the host/target system you should see this help line in "dmesg" output: - - SysRq : HELP : loglevel(0-9) reBoot Crashdump terminate-all-tasks(E) memory-full-oom-kill(F) kill-all-tasks(I) saK show-backtrace-all-active-cpus(L) show-memory-usage(M) nice-all-RT-tasks(N) powerOff show-registers(P) show-all-timers(Q) unRaw Sync show-task-states(T) Unmount show-blocked-tasks(W) dump-ftrace-buffer(Z) - - On the client/console system do: - - cat /dev/ttyUSB0 - - And you should see the help line above displayed shortly after you've - provoked it on the host system. - -If it does not work then please ask about it on the linux-kernel@vger.kernel.org -mailing list or contact the x86 maintainers. diff --git a/Documentation/x86/index.rst b/Documentation/x86/index.rst index 8a666c5abc85..7b8388ebd43d 100644 --- a/Documentation/x86/index.rst +++ b/Documentation/x86/index.rst @@ -13,3 +13,4 @@ Linux x86 Support exception-tables kernel-stacks entry_64 + earlyprintk -- 2.20.1