public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: "David A. Van Arnem" <dvanarnem@cmlab.biz>, edk2-devel@ml01.01.org
Subject: Re: DEBUG() macros in DXE driver: can’t make it work in QEMU
Date: Wed, 15 Feb 2017 13:39:31 +0100	[thread overview]
Message-ID: <e57a9cc0-81a5-7e74-b476-923993d8ee7e@redhat.com> (raw)
In-Reply-To: <2e03bfce-ef30-44cb-4da8-b90d23c6ec1b@cmlab.biz>

On 02/15/17 01:00, David A. Van Arnem wrote:
> 
> 
> On 02/14/2017 04:46 PM, Nikolay Bodunov wrote:
>> Hi
>>
>> I red this topic before asking the question in the maillist. Unfortunately,
>> it's not for DXE phase.
>> I even tried to use it and recieved expected compiler error:
>>
>> error 1001: Module type [PEIM] is not supported by library instance
>> [/home/nick/src/edk2/MdePkg/Library/UefiDebugLibConOut/
>> UefiDebugLibConOut.inf]
>>     consumed by [/home/nick/src/edk2/MdeModulePkg/Bus/Pci/
>> SdMmcPciHcPei/SdMmcPciHcPei.inf]
> 
> Hi,
> 
> MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf lists
> DXE_DRIVER in its [Defines] section under LIBRARY_CLASS, so it is
> compatible with DXE_DRIVER module types (I have used it this way).
> However, if I'm reading your output correctly, you are trying to build a
> PEI module which is why you are getting the error.  PEI is outside of my
> knowledge.

In the PEI phase, no such thing exists as "system console" (that's a
UEFI construct), hence the fact that UefiDebugLibConOut (which prints to
said console) rejects being linked into PEIMs (PEI modules) is justified.

Again, a suitable DebugLib instance should be chosen (in the DSC file
where the PEIM in question is listed too, resolving the DebugLib class
for PEIMs), and DEBUG() macros should be used for logging.

Thanks
Laszlo



  reply	other threads:[~2017-02-15 12:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-14 17:55 DEBUG() macros in DXE driver: can’t make it work in QEMU Nikolay Bodunov
2017-02-14 18:16 ` Laszlo Ersek
2017-02-14 18:28   ` Kinney, Michael D
2017-02-14 22:06     ` Nikolay Bodunov
2017-02-14 22:17       ` David A. Van Arnem
2017-02-14 22:36         ` Nikolay Bodunov
2017-02-14 23:14           ` David A. Van Arnem
2017-02-14 23:46             ` Nikolay Bodunov
2017-02-15  0:00               ` David A. Van Arnem
2017-02-15 12:39                 ` Laszlo Ersek [this message]
2017-02-16 18:05                   ` Andrew Fish
2017-02-16 18:59                     ` Laszlo Ersek
2017-02-15 10:13       ` Laszlo Ersek
2017-02-15 17:19         ` Nikolay Bodunov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e57a9cc0-81a5-7e74-b476-923993d8ee7e@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox