From: "Andrew Fish" <afish@apple.com>
To: edk2-devel-groups-io <devel@edk2.groups.io>, ritul.bits@gmail.com
Subject: Re: [edk2-devel] regarding calling UEFI runtime services (mainly SetVariable) from linux or android OS which is running on xen+tianocore UEFI
Date: Mon, 06 Feb 2023 10:16:55 -0800 [thread overview]
Message-ID: <A5164ED1-9841-40F6-996D-6BC9A98D6283@apple.com> (raw)
In-Reply-To: <CAHHF-2K5a5v3reiPJhs_aGVhBmi0QageY7usxqdR2pkX7Mz7rg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1284 bytes --]
> On Feb 6, 2023, at 8:06 AM, ritul guru <ritul.bits@gmail.com> wrote:
>
> Hi,
>
> I have been using xen hypervisor and tianocore uefi BIOS on xen to boot to ubuntu OS on virtualized disk.
> and want to set a UEFI variable with UEFI runtime service SetVariable() to a value and the same wants to read from UEFI bootloader either grubx64.efi or botmgfw.efi,
> So, Is it possible to use runtime services to do such an operation for OS running on VM when booted with OVMF/tianocore BIOS on VM guest?
> If so, where does this variable gets stored? is it in some virtualized disk as there is no virtualized SPIROM available to VM.
>
>
I don’t know the Xen specifics, but the firmware maps in a Flash Device (FD) here:
https://github.com/tianocore/edk2/blob/master/OvmfPkg/OvmfXen.fdf
edk2/OvmfXen.fdf at master · tianocore/edk2
github.com
Oh looks like it uses an emulated variable store that is just memory. See ReserveEmuVariableNvStore().
https://github.com/tianocore/edk2/blob/master/OvmfPkg/XenPlatformPei/Platform.c#L365
edk2/Platform.c at master · tianocore/edk2
github.com
Thanks,
Andrew Fish
>
> https://wiki.osdev.org/Using_UEFI_Runtime_Services_in_your_Kernel
>
> Thanks & Regards
> Ritul Guru
> +91-9916513186
>
[-- Attachment #2.1: Type: text/html, Size: 8436 bytes --]
[-- Attachment #2.2: edk2.png --]
[-- Type: image/png, Size: 68939 bytes --]
[-- Attachment #2.3: edk2.png --]
[-- Type: image/png, Size: 68939 bytes --]
next prev parent reply other threads:[~2023-02-06 18:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-06 16:06 regarding calling UEFI runtime services (mainly SetVariable) from linux or android OS which is running on xen+tianocore UEFI ritul guru
2023-02-06 18:16 ` Andrew Fish [this message]
2023-02-06 18:25 ` [edk2-devel] " ritul guru
2023-02-06 18:27 ` ritul guru
2023-02-06 18:33 ` Andrew Fish
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=A5164ED1-9841-40F6-996D-6BC9A98D6283@apple.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