Hello,
I am making an EFI bootloader, and ran into a problem. I am calling LoadImage to test chainloading, but it doesn't work. Here is how I call it:
Code:
BS->LoadImage(FALSE, ImageHandle, loader->FilePath, buffer, size, &handle);
BS->StartImage(handle, 0, 0)
The Image starts fine, but then it runs the following code:
Code:
EFI_GUID imageGuid = EFI_LOADED_IMAGE_PROTOCOL_GUID;
status = BS->HandleProtocol(ImageHandle, &imageGuid, (VOID**)&loader);
EFI_GUID fsProt = EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID;
status = BS->HandleProtocol(loader->DeviceHandle, &fsProt, (VOID**)&fileSys);
And the second call fails with EFI_ERROR_INVALID_PARAMETER.
Also, I am using the file handle obtained from the images structure.
Any suggestions?
Thanks,
nexos