Fri 15 Apr 2016 09:06:32 PM UTC, original submission:
I have a UEFI driver that, when sufficient memory is available, uses lots of it for its work, for example routinely allocating 3-4GB. In an attempt to avoid problems with other drivers, applications or bootloaders, allocations start from the top of RAM and work towards the bottom.
GRUB master (abf9beb7d667d3604774753cf698c439c6fbc736) hangs sometime after calling `b->grub_efi_finish_boot_services` in grub_linux_boot() (grub-core/loader/i386/linux.c) when the following EFI code is run in a driver:
```
EFI_PHYSICAL_ADDRESS addr = 0x180000000;
EFI_STATUS status = gBS->AllocatePages(AllocateAddress, EfiBootServicesData, 0x80000, &addr);
```
For simplicity of replicating the problem this doesn't figure out where the top of memory is, but instead just chooses to allocate at 6GB.
I'm running OVMF from edk2 master under qemu 2.5.50 with:
qemu-system-x86_64 -name uefi -M pc -m size=20G -cpu host -drive unit=0,if=pflash,format=raw,file=OVMF.fd -nodefaults -realtime mlock=off -enable-kvm -S -s -rtc base=utc -monitor stdio -drive file=uefi3.img,if=ide,media=disk,format=raw -vga std -vnc :0 -device vfio-pci,host=02:00.0,id=pcidev,romfile=allocmem.rom
I've tried debugging this further by using gdb, but so far haven't managed to get a build that has full symbols.
|