Jonathan Barkelew
2009-03-18 21:07:15 UTC
Good day to all.
I've been trying to track down a problem booting to UEFI-native SuSE
and I've finally cracked the code. On the system that I've been testing with,
ELILO seemed to execute all the way through, and hand off to the kernel,
but the system would hang shortly afterwards.
I've figured out that ELILO is allocating memory to load the initial
ramdisk using
an AllocatePages() call with type 'AllocateAnyPages'. This all works fine, but
shortly after calling ExitBootServices(), ELILO blindly copies the
initrd from this
location to 50MB. The problem is: the initrd memory was being allocated from
38MB to 60MB, and ELILO was copying it on top of itself.
A couple of fixes come to mind. I think perhaps the easiest of which
is to change
the AllocatePages() call to an 'AllocateAddress' type, and requesting memory
at 50MB. If this call fails with EFI_OUT_OF_RESOURCES, the memory could
be allocated elsewhere and then copied to 50MB after ExitBootServices().
Any thoughts?
--
Jonathan Barkelew
BIOS Engineer - American Megatrends
I've been trying to track down a problem booting to UEFI-native SuSE
and I've finally cracked the code. On the system that I've been testing with,
ELILO seemed to execute all the way through, and hand off to the kernel,
but the system would hang shortly afterwards.
I've figured out that ELILO is allocating memory to load the initial
ramdisk using
an AllocatePages() call with type 'AllocateAnyPages'. This all works fine, but
shortly after calling ExitBootServices(), ELILO blindly copies the
initrd from this
location to 50MB. The problem is: the initrd memory was being allocated from
38MB to 60MB, and ELILO was copying it on top of itself.
A couple of fixes come to mind. I think perhaps the easiest of which
is to change
the AllocatePages() call to an 'AllocateAddress' type, and requesting memory
at 50MB. If this call fails with EFI_OUT_OF_RESOURCES, the memory could
be allocated elsewhere and then copied to 50MB after ExitBootServices().
Any thoughts?
--
Jonathan Barkelew
BIOS Engineer - American Megatrends