public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Laszlo Ersek" <lersek@redhat.com>
To: devel@edk2.groups.io, sergestus@yandex.ru,
	"Marvin Häuser" <mhaeuser@outlook.de>
Subject: Re: [edk2-devel] Saving data structure at Pre EFI Initialization phase in memory to use it at DXE phase by some UEFI application?
Date: Thu, 30 Jan 2020 12:30:05 +0100	[thread overview]
Message-ID: <af1f1e7f-4088-d3b7-b6d3-b626c2e93602@redhat.com> (raw)
In-Reply-To: <23937.1580382202829610713@groups.io>

On 01/30/20 12:03, sergestus@yandex.ru wrote:
> I need to use some code from PEIM driver in DXE phase. This code is
> using the SYSHOST structure and I think it not easy to restore it
> from HOBs becuase there are a lot of information. So I thought it
> easy to save the structure completely in the memory.

In the PEIM, assuming your code runs after permanent RAM has been
discovered, you can allocate memory for the SYSHOST structure with the
AllocatePages() PEI service. Stash the allocation address in a vendor
GUID HOB. In the DXE phase, look up the HOB by GUID.

Thanks
Laszlo


  reply	other threads:[~2020-01-30 11:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-30  9:51 Saving data structure at Pre EFI Initialization phase in memory to use it at DXE phase by some UEFI application? sergestus
2020-01-30 10:01 ` [edk2-devel] " Marvin Häuser
2020-01-30 11:03   ` sergestus
2020-01-30 11:30     ` Laszlo Ersek [this message]
2020-01-30 12:57       ` sergestus
2020-01-30 14:18         ` Laszlo Ersek
2020-01-30 15:09           ` sergestus

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=af1f1e7f-4088-d3b7-b6d3-b626c2e93602@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