public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Yao, Jiewen" <jiewen.yao@intel.com>
To: Laszlo Ersek <lersek@redhat.com>
Cc: "Marc-André Lureau" <marcandre.lureau@gmail.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
	"Stefan Berger" <stefanb@linux.vnet.ibm.com>,
	"Javier Martinez Canillas" <javierm@redhat.com>,
	"Peter Jones" <pjones@redhat.com>,
	"Justen, Jordan L" <jordan.l.justen@intel.com>,
	"Ard Biesheuvel" <ard.biesheuvel@linaro.org>
Subject: Re: Enabling TPM support in ovmf & hang during qemu boot
Date: Mon, 13 Nov 2017 14:21:43 +0000	[thread overview]
Message-ID: <1E8FEAEB-1AD4-4793-9FD2-E646BA3BADF1@intel.com> (raw)
In-Reply-To: <3b8f8c78-99c1-6a54-2251-6c476c9a472f@redhat.com>

I can not add memorydiscovered dependency for tcgpei. We do have use case to unit Tpm before memory.

By design, tcgconfig peim is a platform module. Ovmf can create its own one and add dependency there.

As such, tcgpei depends on tcgconfigpei, and later can depend on memory.

thank you!
Yao, Jiewen


> 在 2017年11月13日,下午7:26,Laszlo Ersek <lersek@redhat.com> 写道:
> 
>> On 11/12/17 20:09, Marc-André Lureau wrote:
>> Hi,
>> 
>> I use the attached patch to build OVMF with TPM support.
>> 
>> Even without any TPM device configured (with the following qemu
>> command line) the VM hangs early:
>> 
>> qemu-system-x86_64 -enable-kvm -m 1024 -global
>> isa-debugcon.iobase=0x402 -debugcon file:ovmf.log -drive
>> if=pflash,format=raw,file=...src/edk2/Build/OvmfX64/DEBUG_GCC5/FV/OVMF_CODE.fd,readonly
>> -drive if=pflash,format=raw,file=...src/edk2/Build/OvmfX64/DEBUG_GCC5/FV/OVMF_VARS.fd
>> 
>> I don't have much clue how to debug OVMF, but adding DEBUG lines, I
>> could learn that during ReserveEmuVariableNvStore(), GetNextHob() runs
>> an infinite loop, looking for EFI_HOB_TYPE_UNUSED.
>> 
>> How is the HobList populated? Is it possible to add more of the UNUSED entries?
>> 
>> Any help welcome
>> 
> 
> * Neither Tcg2ConfigPei nor Tcg2Pei depend, in their INF files' [depex]
> section, on "permanent RAM has been discovered" (=
> gEfiPeiMemoryDiscoveredPpiGuid). This means that they can be dispatched
> before OvmfPkg/PlatformPei installs the permanent PEI RAM. Therefore, if
> they call PeiServicesAllocatePages(), the allocation likely runs out of
> the -- very small -- termporary PEI RAM that we have in OVMF.
> 
> The way to mitigate this is either to increase the temp PEI RAM (I
> already have such a set on the list, but for different purposes -- and
> this approach only works if the needed memory is really small), or to
> make both of these PEIMs dependent on gEfiPeiMemoryDiscoveredPpiGuid. I
> can't say -- Jiewen, would it be OK to make these PEIMs dependent on
> gEfiPeiMemoryDiscoveredPpiGuid?
> 
> 
> * Both PEIMs depend on PEI-phase read-only variable access
> (gEfiPeiReadOnlyVariable2PpiGuid). However, OVMF does not include the
> required drivers at the moment -- see
> <https://bugzilla.tianocore.org/show_bug.cgi?id=386>. I had posted a
> series for that back in ~March 2017, but Jordan disagreed with them. (I
> think each of us remains unconvinced by the other's points, from the
> original thread.)
> 
> Thanks
> Laszlo

      reply	other threads:[~2017-11-13 14:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-12 19:09 Enabling TPM support in ovmf & hang during qemu boot Marc-André Lureau
2017-11-13 11:26 ` Laszlo Ersek
2017-11-13 14:21   ` Yao, Jiewen [this message]

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=1E8FEAEB-1AD4-4793-9FD2-E646BA3BADF1@intel.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