From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-x22c.google.com (mail-it0-x22c.google.com [IPv6:2607:f8b0:4001:c0b::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 399A3820E7 for ; Tue, 14 Feb 2017 14:06:09 -0800 (PST) Received: by mail-it0-x22c.google.com with SMTP id 203so53056273ith.0 for ; Tue, 14 Feb 2017 14:06:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=w/lDm7ZBWjWodp2Bz7LMu9extaMP9CIqxiiwBb1577c=; b=HeM/0p7vpLrj5iCepFDR2sYnJa47pvuXYeVlgVgdJB+pbo7p9veMHor3HRnXmNgcgP 9ULR1mduIuNfDf/JlDaABy6KxY986S286YBkVo+DFhL1DsF4NuO1VquQgzres/Q1YHY8 EVvNEk9ZIK4UXu6msbVy/B+V7RlCl2Bdr78oEG0OdGpgIMJbT7cOOvHCPIldoDiXBgep 3t6A0EJzM9UDXhsbh4eLDEs/2QszAZfPAhqgU6aB8Uk1TyMAlnXYu6Rg9975iEZqBluJ jDm91aI8rn0GSbdtbiep1rF0C5GUkCyFMe+vJn+xoRV3vVzDs3AvaOIFCTQ7MxWSARnW f0xQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=w/lDm7ZBWjWodp2Bz7LMu9extaMP9CIqxiiwBb1577c=; b=Cp8qGVJdgHVnplwSS+sIgfTTWsnXG8r4p5W8QO5V6OGY++z2e7aGZLRN9P7b3GaGRA fWkjARILsnAwlDnpiKknD86mbZgC4YYBdVHnx2ypxjlmmv3MNYZFlAxuw5o9hvGoUTIh UYVU6DzGG66/MWBbCcUE7do9uA0b5+JuCFfiqX8So6CIxR5YboYiRjufHs/cJB62PLBY jkoaJr/dXqSVTmR0/FsAZH6k1yiPC/GIBmBTqatJCBbNq1pasftx/2y3fppgNhVm+yES b2X8gb9qQXVVHLef6xfM3puiH/QRkTWyX52uDBobmTlQVc9GSa/1JETGODD/iPj7+31D hX7w== X-Gm-Message-State: AMke39ln00w+tR4oREoqbWFbtqfwahSGbot6p0fss/Pf7iVcql9/OvwU6OiLiKlQXgvc6tmfCFNevDesOtlHNg== X-Received: by 10.36.107.194 with SMTP id v185mr5540300itc.59.1487109968276; Tue, 14 Feb 2017 14:06:08 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.241.204 with HTTP; Tue, 14 Feb 2017 14:06:07 -0800 (PST) In-Reply-To: References: <485eda84-7d3c-cbcf-6dbe-bc302aa8e3c0@redhat.com> From: Nikolay Bodunov Date: Wed, 15 Feb 2017 01:06:07 +0300 Message-ID: To: "Kinney, Michael D" Cc: Laszlo Ersek , "edk2-devel@ml01.01.org" X-Content-Filtered-By: Mailman/MimeDel 2.1.21 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 22:06:09 -0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thank you for the suggestions. I tried to use them: > (1) Please always terminate the debug message with a newline ("\n") Done. No changes. Of course, I usually do it, but in that case all I needed was to have any string on output. Sorry for bad programming style. > (2) Please use DEBUG_ERROR as the symbolic constant for the error mask Done. I think you meant in DEBUG() macros. No changes. Question about style, too. > (3) DEBUG output from OVMF is by default not written to the serial port and > add -D DEBUG_ON_SERIAL_PORT Done. Recompiled OVMF with that option. I have now file "debug.log" 74415 bytes size that contains everything, include EFI Shell output, but except my debug messages BTW, QEMU option "-debugcon file:debug.log -global isa-debugcon.iobase=3D0x402", recommended in OVMF README, did nothing - "debug.log was empty. Based on results, I suppose that the problem is not on OVMF side. Hope you propose something else to try. Maybe I got something in a wrong way. Nikolay 2017-02-14 21:28 GMT+03:00 Kinney, Michael D : > If you prefer debug messages on a serial port, you can > add -D DEBUG_ON_SERIAL_PORT > > Mike > > > -----Original Message----- > > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Laszlo Ersek > > Sent: Tuesday, February 14, 2017 10:17 AM > > To: Nikolay Bodunov ; edk2-devel@ml01.01.org > > Subject: Re: [edk2] DEBUG() macros in DXE driver: can=E2=80=99t make it= work in > QEMU > > > > Hi Nikolay, > > > > On 02/14/17 18:55, Nikolay Bodunov wrote: > > > Hello > > > > > > > > > I compiled DXE Driver, in DEBUG_GCC49 mode, but I can=E2=80=99t print= any debug > > > message. > > > DEBUG((-1, =E2=80=9CPrint test=E2=80=9D)) does nothing. Exactly as > > > DebugPrint(EFI_D_ERROR, =E2=80=9CPrint Test); > > > > (1) Please always terminate the debug message with a newline ("\n") onc= e > > you are done with it. (It's okay to format a single message with severa= l > > 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 =E2=80=9CPrint Test=E2=80=9D 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 /=E2=80=A6/FV/OVMF.fd -hda hdd.img -se= rial > > > 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 =3D 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=E2=80=99t 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 =3D -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? > > > > > > > _______________________________________________ > > edk2-devel mailing list > > edk2-devel@lists.01.org > > https://lists.01.org/mailman/listinfo/edk2-devel > --=20 With best regards, Nikolay Bodunov