I've run into an issue where elilo gets an EFI_INVALID_PARAMETER and
stops with the error message "LocateHandle GopProtocol failed."  This is
from the first call to LocateHandle() in get_video_info().

It looks like this first call is meant to get the size of the buffer
that's needed, and size should be 0 to make this call.  The buffer is
then allocated, and a second call to LocateHandle() is meant to actually
get the structure.

But the variable "size" is passed to LocateHandle() uninitialized, and,
on my system, is larger than the size of the GopProtocol structure, so
LocateHandle() is returning EFI_INVALID_PARAMETER because size is ok but
the buffer pointer isn't.

Here's a patch to fix this.

Thanks!
Stuart


--- elilo/x86_64/system.c.orig  2008-11-10 10:00:50.000000000 -0600
+++ elilo/x86_64/system.c       2008-11-10 10:17:28.000000000 -0600
@@ -192,7 +192,7 @@ static INTN get_video_info(boot_params_t
         EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE   *Gop_mode;
         EFI_HANDLE *Gop_handle;
         EFI_STATUS efi_status;
-        UINTN size, size1;
+        UINTN size = 0, size1;
         UINT8 i;
 
        efi_status = uefi_call_wrapper(


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
elilo-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/elilo-discuss

Reply via email to