Good day, dear colleagues! I am having the following problem.
I'm trying to launch the OS from my own DXE-module through efi-loader. My DXE-module starts at the moment BSD-phase, when READY_TO_BOOT events is occurred. I correctly get the path to the efi-loader (in fact, I manually select this file from the file browser implemented in DXE-module so that the path is exactly correct): \EFI\Boot\BOOTX64.efi
Then I call the LoadImage() function and get file handler:
bs->LoadImage(TRUE, imageHandle, path_to_efi_loader, NULL, NULL, &fileHandler);
Then I call the StartImage() function:
bs->StartImage(fileHandler, &exitSize, &exitData)
However, after launching the efi-loader, an attempt is made to start the Windows OS and an error window is displayed:
Those, the path to the efi-loader is passed correctly, the loading and launch is performed correctly, but is there some error in the launch environment?
I tried first to load the efi-loader into memory by passing the buffer to it in LoadImage(). Also, between LoadImage() and StartImage(), I tried to get EFI_LOADED_IMAGE_PROTOCOL for the efi-loader and reset its ParentHandle.
It didn't help either.
What could be the problem here?
Thank you!
I expected the OS Windows to start. However, OS Windows recovery message occurred.