From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 3B87A209589CA for ; Wed, 9 Aug 2017 12:34:46 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 21A8F7DF39; Wed, 9 Aug 2017 19:37:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 21A8F7DF39 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=lersek@redhat.com Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-102.phx2.redhat.com [10.3.116.102]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4F2B65E243; Wed, 9 Aug 2017 19:37:02 +0000 (UTC) To: "Kinney, Michael D" , wang xiaofeng Cc: "edk2-devel@lists.01.org" References: <622959b9.707d.15dc5ea41ee.Coremail.winggundum82@163.com> From: Laszlo Ersek Message-ID: <077448df-35eb-47c9-3fe7-09d6fe921f9a@redhat.com> Date: Wed, 9 Aug 2017 21:37:01 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 09 Aug 2017 19:37:04 +0000 (UTC) Subject: Re: Qestion about how to debug OVMF with UDT on QEMU X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Aug 2017 19:34:46 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 08/09/17 20:21, Kinney, Michael D wrote: > Laszlo, > > I works really well for me using QEMU on Windows. > > * Build OVMF setting -D SOURCE_DEBUG_ENABLE and -D DEBUG_ON_SERIAL_PORT. > > * Configure The UDK Debugger SoftDebugger.ini file to use TCP port 20716 > > [Debug Port] > Channel = TCP > Server = localhost > Port = 20716 > > * Configure QEMU so the monitor and serial port > are redirected to a tcp ports 20717 and 20716. > > -monitor tcp:localhost:20717,server > -serial tcp:localhost:20716,server > > I use a batch file to launch the UDK debugger and > and terminal emulators immediately before running > QEMU because the tcp server in QEMU will > timeout of a connect does not happen quickly. > > start "Monitor" /B "c:\Program Files (x86)\teraterm\ttermpro.exe" localhost:20717 /nossh > start "Debugger" /B "C:\Program Files (x86)\Intel\Intel(R) UEFI Development Kit Debugger Tool\eXdi.exe" /LaunchWinDbg > start "Console" /B "c:\Program Files (x86)\teraterm\ttermpro.exe" localhost:20715 /nossh > > start "QEMU" /B "%QEMU_PATH%\qemu-system-i386w.exe" ^ > -machine q35,smm=on,accel=tcg -cpu Nehalem ^ > -global ICH9-LPC.disable_s3=1 ^ > -drive if=pflash,format=raw,unit=0,file=%EDKII_BUILD_OUTPUT%\FV\OVMF_CODE.fd,readonly=on ^ > -drive if=pflash,format=raw,unit=1,file=%EDKII_BUILD_OUTPUT%\FV\OVMF_VARS.fd ^ > -monitor tcp:localhost:20717,server ^ > -serial tcp:localhost:20716,server > > Since the serial connections are redirected to tcp ports > on the localhost, this actually provide an excellent > UDK Debugger experience. Thanks for the writeup. :) Maybe we should put this in the wiki (although I'm completely aware of how I would react if this was suggested to me in response to an email of mine :) ) And, perhaps I should give this another try sometime :) Thank you! Laszlo