From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.81]) by mx.groups.io with SMTP id smtpd.web10.6786.1580383816167042489 for ; Thu, 30 Jan 2020 03:30:16 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XW18q//N; spf=pass (domain: redhat.com, ip: 207.211.31.81, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580383815; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qeQ5nsDIFQjU8sDE1UaKMbrZtaaiKvT/j/r4/+pTADA=; b=XW18q//Npiw98mDq1JxnkK9aeXqUQ3A+e4mc/t/Ww7isNVG3tQQ6blrPRvsWpO4Xso00h7 L58NPWUWDL4G4yyCRSx3uqr3wQkCp2pMLUHCHqJm1bYEK1YlmfpBmonOCncFThFYOlGLa+ 4jJIHtZbn6Vk2UcHo7QEqSAGLaYdEz0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-371-Iu71psZKOOCexz-VPEiSqQ-1; Thu, 30 Jan 2020 06:30:09 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 76C0C800D48; Thu, 30 Jan 2020 11:30:07 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-117-35.ams2.redhat.com [10.36.117.35]) by smtp.corp.redhat.com (Postfix) with ESMTP id 67CE160BE2; Thu, 30 Jan 2020 11:30:06 +0000 (UTC) Subject: Re: [edk2-devel] Saving data structure at Pre EFI Initialization phase in memory to use it at DXE phase by some UEFI application? To: devel@edk2.groups.io, sergestus@yandex.ru, =?UTF-8?Q?Marvin_H=c3=a4user?= References: <23937.1580382202829610713@groups.io> From: "Laszlo Ersek" Message-ID: Date: Thu, 30 Jan 2020 12:30:05 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <23937.1580382202829610713@groups.io> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-MC-Unique: Iu71psZKOOCexz-VPEiSqQ-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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