With the default Qemu parameters, only 128MB RAM gets given a VM. This causes
the loader to be unable to allocate the 64MB it needs for the heap. This change
makes the cause of the error more obvious.
Details
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
On my build of Qemu and OVMF, the largest contiguous region left is 44MB. There's also a 40MB region, then smaller areas making up 97MB total free.
stand/efi/loader/efi_main.c | ||
---|---|---|
98 โ | (On Diff #50301) | perhaps include the size in the error message. I've found that kind of thing useful before. |
+1 for including the size of the allocation. I wish we could also (cheaply) work out and print how much space we actually have to work with, but meh. I'm not proud of how many times qemu's bitten me because I didn't pay attention to the -m default and spent x amount of time working out again that I didn't give it enough memory to boot successfully.
stand/efi/loader/efi_main.c | ||
---|---|---|
98 โ | (On Diff #50301) | I'd include the size here. I don't know if printf is up and running until before or after the setheap call, which is the only wrinkle I can see. |
Good point about including the size: I'll add it. I'll also double check, but printf didn't work in that location when I tried it, but it's possible I messed up newlines and it got overwritten.
I've checked and printf isn't available in loader at that point, so there's really nothing we can do except display a static string like I have in my patch.