Hello, friends.
I am involved in a small project (in California).
We are developing a DXE-driver (by C-language).
We have a task - forced selection of a partition to boot the operating system (set boot option in stage before BDS).
Our current implementation forced sets the BootOrder variable with a single entry - with the necessary index of BootNNNN variable.
Also, we overload the SetVariable() function, and we do not allow changing the BootOrder variable in it.
But this implementation does not fully work - on VmWare everything works with bugs.
Also, for different motherboards, the implementation has different behavior, and it is also not always correct.
Please advise how best to solve the problem? Has anyone had a similar experience.
Thanks.
Force selection of load option in UEFI via C code
-
- Posts: 8
- Joined: Sat Apr 29, 2023 9:29 am
-
- Member
- Posts: 5560
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Force selection of load option in UEFI via C code
That's a pretty unusual task for a DXE driver. Are you able to explain your situation in any more detail than that? I'm particularly interested in why you can't write a bootloader that chain-loads the appropriate operating system.EggHead wrote:We are developing a DXE-driver (by C-language).
We have a task - forced selection of a partition to boot the operating system (set boot option in stage before BDS).
What kind of bugs?EggHead wrote:But this implementation does not fully work - on VmWare everything works with bugs.
Also, for different motherboards, the implementation has different behavior, and it is also not always correct.
Some motherboards ignore the BootOrder variable.
-
- Posts: 8
- Joined: Sat Apr 29, 2023 9:29 am
Re: Force selection of load option in UEFI via C code
Octocontrabass, thanks to answer!
I tried to make the BootOrder with a single entry, overwrite SetVariable/GetVariable to return the correct BootOrder and Boot#### variables.
However, on different motherboards, entries in the BootOrder begin to be duplicated or disappear altogether, etc. That is, this approach does not work well.
I am developing a trusted OS boot control tool with additional functionality (user login and password entry, checking the integrity of hardware, firmware, etc.). The tool itself is in the form of a DXE-module to run before the OS boots. Therefore, I have to allow the user to boot only the allowed OS.Octocontrabass wrote:That's a pretty unusual task for a DXE driver. Are you able to explain your situation in any more detail than that? I'm particularly interested in why you can't write a bootloader that chain-loads the appropriate operating system.
Very different bugs.EggHead wrote:What kind of bugs?
I tried to make the BootOrder with a single entry, overwrite SetVariable/GetVariable to return the correct BootOrder and Boot#### variables.
However, on different motherboards, entries in the BootOrder begin to be duplicated or disappear altogether, etc. That is, this approach does not work well.
-
- Posts: 8
- Joined: Sat Apr 29, 2023 9:29 am
Re: Force selection of load option in UEFI via C code
At the moment I'm trying to manually download efi-boot loader (\EFI\Boot\BOOTX64.efi etc.) using LoadImage/StartImage functions.
However, there are also a number of problems for which I will now create another post - viewtopic.php?f=1&t=56900 =)
However, there are also a number of problems for which I will now create another post - viewtopic.php?f=1&t=56900 =)