From patchwork Sat Oct 17 03:19:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Smarduch X-Patchwork-Id: 7421751 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AD7F89F36A for ; Sat, 17 Oct 2015 03:22:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C66A52063E for ; Sat, 17 Oct 2015 03:22:58 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DD14E2063D for ; Sat, 17 Oct 2015 03:22:57 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZnI3B-00084y-Pe; Sat, 17 Oct 2015 03:20:53 +0000 Received: from mailout1.w2.samsung.com ([211.189.100.11] helo=usmailout1.samsung.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZnI37-00083l-Pz for linux-arm-kernel@lists.infradead.org; Sat, 17 Oct 2015 03:20:50 +0000 Received: from uscpsbgex2.samsung.com (u123.gpu85.samsung.co.kr [203.254.195.123]) by mailout1.w2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NWC00H1IHA2GZ00@mailout1.w2.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 16 Oct 2015 23:20:26 -0400 (EDT) X-AuditID: cbfec37b-f79926d0000060e9-2f-5621be7abb3a Received: from usmmp1.samsung.com ( [203.254.195.77]) by uscpsbgex2.samsung.com (USCPEXMTA) with SMTP id 70.35.24809.A7EB1265; Fri, 16 Oct 2015 23:20:26 -0400 (EDT) Received: from sisasmtp.sisa.samsung.com ([105.144.21.116]) by usmmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NWC008D3HA1TA80@usmmp1.samsung.com>; Fri, 16 Oct 2015 23:20:26 -0400 (EDT) Received: from mjsmard-530U3C-530U4C-532U3C.sisa.samsung.com (105.145.28.253) by SISAEX02SJ.sisa.samsung.com (105.144.21.116) with Microsoft SMTP Server (TLS) id 14.3.224.2; Fri, 16 Oct 2015 20:20:24 -0700 From: Mario Smarduch To: will.deacon@arm.com, andre.przywara@arm.com, peter.maydell@linaro.org, grant.likely@secretlab.ca, robherring2@gmail.com, christoffer.dall@linaro.org, marc.zyngier@arm.com, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Subject: [PATCH] KVM/arm: kernel low level debug suport for ARM32 virtual platforms Date: Fri, 16 Oct 2015 20:19:59 -0700 Message-id: <1445051999-24360-1-git-send-email-m.smarduch@samsung.com> X-Mailer: git-send-email 1.9.1 MIME-version: 1.0 X-Originating-IP: [105.145.28.253] X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrILMWRmVeSWpSXmKPExsVy+t9hX92qfYphBg3LRS1WzPvJaPF+WQ+j xYvX/xgtXp3ZyGYxZ2qhxcdTx9ktNj2+xmpx+zKvxd87/4DCZx6wWHz/9o3N4uXHEywOPB5r 5q1h9Ghp7mHz2DnrLrvHnWt72DzOb1rD7LF5Sb3Hz5c6Hp83yQVwRHHZpKTmZJalFunbJXBl XDz3m7HgjEDFrGm8DYzzebsYOTkkBEwkGqb9ZYewxSQu3FvP1sXIxSEksIxR4s2vqcwQThOT xKMLR9ghnIuMEs0LDzGCtLAJ6Ersv7cRLCEi8INRYsuDmUD9HBzMAsUSB+ZagdQIC4RKtG2e yAISZhFQlfg90QIkzCvgJnF9/UY2iM1yEiePTWaFiAtK/Jh8jwViioTE889KIGEhoM5tN58z goQlBJQkdmzXnsAoMAtJwyyEhgWMTKsYxUqLkwuKk9JTK4z0ihNzi0vz0vWS83M3MUIionoH 492vNocYBTgYlXh4FdoUw4RYE8uKK3MPMUpwMCuJ8B6OAgrxpiRWVqUW5ccXleakFh9ilOZg URLnvSMhFyokkJ5YkpqdmlqQWgSTZeLglGpgtHB1eHM0pWD1VuUnZx5uTd+zU+5d4uzg2/I/ bCeoT7/dl8VkI8HVkvPgNyfPBJuLPm9uNU/LN0jg2Ph5lt3PFVuKgvmvRPo/ckucffN+6IUV 274b3/n9O+CtmXn9CWFX1g3c5bJnLW82vzldUfXlSdVul9ypxdIaur6y+nfY/FaJLFoYYrnI T4mlOCPRUIu5qDgRAO9IkeeEAgAA X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151016_202049_939401_4F694C88 X-CRM114-Status: GOOD ( 10.43 ) X-Spam-Score: -6.9 (------) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: catalin.marinas@arm.com, linux@arm.linux.org.uk, kvm@vger.kernel.org, Mario Smarduch Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When booting a VM using QEMU or Kvmtool there are no clear ways to enable low level debugging for these virtual platforms. some menu port choices are not supported by the virtual platforms at all. And there is no help on the location of physical and virtual addresses for the ports. This may lead to wrong debug port and a frozen VM with a blank screen. This patch adds menu selections for QEMU and Kvmtool virtual platforms for low level kernel print debugging. Help section displays port physical and virutal addresses. ARM reference models use the MIDR register to run-time select UART port address (for ARCH_VEXPRESS) based on A9 or A15 part numbers. Looked for a same approach but couldn't find a way to differentiate between virtual platforms, something like a platform register. Signed-off-by: Mario Smarduch Acked-by: Christoffer Dall --- arch/arm/Kconfig.debug | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index a2e16f9..d126bd4 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -1155,6 +1155,28 @@ choice This option selects UART0 on VIA/Wondermedia System-on-a-chip devices, including VT8500, WM8505, WM8650 and WM8850. + config DEBUG_VIRT_UART_QEMU + bool "Kernel low-level debugging on QEMU Virtual Platform" + depends on ARCH_VIRT + select DEBUG_UART_PL01X + help + Say Y here if you want the debug print routines to direct + their output to PL011 UART port on QEMU Virtual Platform. + Appropriate address values are: + PHYS VIRT + 0x9000000 0xf8090000 + + config DEBUG_VIRT_UART_KVMTOOL + bool "Kernel low-level debugging on Kvmtool Virtual Platform" + depends on ARCH_VIRT + select DEBUG_UART_8250 + help + Say Y here if you want the debug print routines to direct + their output to 8250 UART port on Kvmtool Virtual + Platform. Appropriate address values are: + PHYS VIRT + 0x3f8 0xf80903f8 + config DEBUG_ICEDCC bool "Kernel low-level debugging via EmbeddedICE DCC channel" help