# Using UEFI runtime variables on Xavier AGX

**URL:** <https://forums.developer.nvidia.com/t/using-uefi-runtime-variables-on-xavier-agx/227970>\
**Category:** Jetson AGX Xavier\
**Tags:** boot\
**Created:** [September 14, 2022, 6:17pm UTC](https://forums.developer.nvidia.com/t/using-uefi-runtime-variables-on-xavier-agx/227970 "2022-09-14T18:17:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dfullmer](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@dfullmer](https://forums.developer.nvidia.com/u/dfullmer)\
**Post date:** [September 14, 2022, 6:17pm UTC](https://forums.developer.nvidia.com/t/using-uefi-runtime-variables-on-xavier-agx/227970/1 "2022-09-14T18:17:33Z")

</div>

I’m trying to set/modify some UEFI variables (specifically boot entries/ordering) at runtime after having already booted into Linux. However, this functionality isn’t working on the Xavier AGX, even though it does work on the Orin AGX (and presumably also on the Xavier NX).

I had found this document relating to the experimental version of the UEFI firmware, and it mentions that SetVariable() is not available on the Xavier AGX: [https://developer.download.nvidia.com/embedded/L4T/UEFI\_Readme\_8.26.html](https://developer.download.nvidia.com/embedded/L4T/UEFI_Readme_8.26.html)  
I was hoping this was just a limitation of the experimental UEFI firmware, but it looks like it’s still an issue with the Jetpack 5.0.2 GA release.

After digging into the code, it looks like FvbDxe (from edk2-nvidia/Silicon/NVIDIA/Drivers/FvbDxe) is used on the Xavier AGX, which sets RuntimeServicesSupport to PcdNoVariableRtProperties, unlike FvbNorFlashDxe which sets it to PcdVariableRtProperties. Moreover, in FvbDxe there are checks for EfiAtRuntime() which then exit with EFI\_UNSUPPORTED.

I was wondering if there is something fundamental preventing the UEFI variable store from working at runtime on the Xavier AGX, or is it just an unimplemented feature? If the latter, is this on the roadmap to be fixed in the near future?

---

<div class="post-metadata">

**Author:** ![kayccc](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/kayccc/32/14043_2.png) [@kayccc](https://forums.developer.nvidia.com/u/kayccc)\
**Post date:** [September 21, 2022, 6:39am UTC](https://forums.developer.nvidia.com/t/using-uefi-runtime-variables-on-xavier-agx/227970/3 "2022-09-21T06:39:46Z")

</div>

Our team will do the investigation and provide suggestions soon. Thanks

---

<div class="post-metadata">

**Author:** ![nathan100](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@nathan100](https://forums.developer.nvidia.com/u/nathan100)\
**Post date:** [February 8, 2024, 5:11pm UTC](https://forums.developer.nvidia.com/t/using-uefi-runtime-variables-on-xavier-agx/227970/6 "2024-02-08T17:11:00Z")

</div>

Has the team finished investigating?

---

<div class="post-metadata">

**Author:** ![russell9](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@russell9](https://forums.developer.nvidia.com/u/russell9)\
**Post date:** [April 26, 2024, 9:45pm UTC](https://forums.developer.nvidia.com/t/using-uefi-runtime-variables-on-xavier-agx/227970/7 "2024-04-26T21:45:44Z")

</div>

@nathan100 I just did a very similar investigation with a similar output. One thing I tried is to install a runtime properties struct in the config table in my custom bootloader to “overrride” what’s set by the firmware, but this doesn’t seem to work, writing to efivarfs gives EINVAL (which, looking at efi\_status\_to\_err, is probably that EFI\_UNSUPPORTED).

One thing that confuses me is that the variables definitely live on the partition named uefi\_varaibles (if I rename that partition, I brick the system), but the only references to this partition name is in FvbNorFlashDxe, so doesn’t it kind of have to be running that firmware image?

Or mabye it runs both of them somehow? I’m unclear on how these firmware binaries are loaded anyways.

---

<div class="post-metadata">

**Author:** ![russell9](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@russell9](https://forums.developer.nvidia.com/u/russell9)\
**Post date:** [April 26, 2024, 10:39pm UTC](https://forums.developer.nvidia.com/t/using-uefi-runtime-variables-on-xavier-agx/227970/8 "2024-04-26T22:39:40Z")

</div>

Just as an experiment, I tried removing those EfiAtRuntime checks, which results in kernel panics, so not just a trivial omission :)
