
On 26.12.15 19:09, Leif Lindholm wrote:
On Tue, Dec 22, 2015 at 02:57:51PM +0100, Alexander Graf wrote:
[...]
break;
- case 2:
/* Exact address, grant it. The addr is already in *memory. */
As far as I can tell, this is why GRUB works. Because it filters through the memory map manually, requesting to allocate its heap at an exact address in a region of free memory in the UEFI memory map.
The key is that EFI_LOADER_MEMORY will be used by applications loaded as well as by U-Boot to load applications into. A simple example where this could be problematic would be a large(ish) initrd loaded via initrd= on kernel (stub loader) command line rather than via GRUB.
Thinking about this once more, we don't expose any file system interfaces to EFI applications, so initrd= won't work anyway. That means the only viable path to go right now is via grub which means we shouldn't get into memory contention with 128MB LOADER_DATA.
Alex