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 BCAF08206F for ; Tue, 14 Feb 2017 10:16:46 -0800 (PST) Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 27D8CC05AA52; Tue, 14 Feb 2017 18:16:47 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-95.phx2.redhat.com [10.3.116.95]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v1EIGjoI018207; Tue, 14 Feb 2017 13:16:46 -0500 To: Nikolay Bodunov , edk2-devel@ml01.01.org References: From: Laszlo Ersek Message-ID: <485eda84-7d3c-cbcf-6dbe-bc302aa8e3c0@redhat.com> Date: Tue, 14 Feb 2017 19:16:44 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 14 Feb 2017 18:16:47 +0000 (UTC) Subject: =?UTF-8?B?UmU6IERFQlVHKCkgbWFjcm9zIGluIERYRSBkcml2ZXI6IGNhbuKAmXQgbWFrZSBpdCB3b3JrIGluIFFFTVU=?= X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Feb 2017 18:16:46 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Hi Nikolay, On 02/14/17 18:55, Nikolay Bodunov wrote: > Hello > > > I compiled DXE Driver, in DEBUG_GCC49 mode, but I can’t print any debug > message. > DEBUG((-1, “Print test”)) does nothing. Exactly as > DebugPrint(EFI_D_ERROR, “Print Test); (1) Please always terminate the debug message with a newline ("\n") once you are done with it. (It's okay to format a single message with several DEBUG calls of course, and terminate only the last DEBUG with a newline.) (2) Please use DEBUG_ERROR as the symbolic constant for the error mask. > > However, I see “Print Test” string in my *.efi binary. > I use QEMU + OMVF (OVMF was also recompliled in DEBUG_GCC49 mode, to be > sure). Serial port output is redirected to a file: > qemu-system-x86_64 -L . --bios /…/FV/OVMF.fd -hda hdd.img -serial > file:./serial_file (3) DEBUG output from OVMF is by default not written to the serial port, it is written to the QEMU debug port. Please consult OvmfPkg/README for specifics, namely under "Capturing OVMF debug messages on qemu". Hope this helps, Laszlo > > All I see in output file is EFI shell output messages, include one that my > driver was succesfully loaded. But no messages from DEBUG(). > > > My conditions: > > MODULE_TYPE = DXE_DRIVER > > > Debug Print Library: > > DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf > > (BaseDebugLibNull.inf is commented, of course) > > > DebugPrintEnabled() returns TRUE > > > I also tried to set some key options manually in MdeModulePkg.dsc > afterwards, but result didn’t change: > > > [Components] > > > MdeModulePkg/CrScreenshotDxe/CrScreenshotDxe.inf { > > > > > > gEfiMdePkgTokenSpaceGuid.gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x07 > > gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2F > > gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000042 > > > > > > > DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf > > > > > GCC:*_*_*_CC_FLAGS = -UMDEPKG_NDEBUG > > } > > > Code (I used it as a base): https://github.com/LongSoft/CrScreenshotDxe > > Where I got wrong and what else could I try to make it work? >