Page MenuHomeFreeBSD

Fix loader bug causing too many pages allocation when bootloader is U-Boot
ClosedPublic

Authored by mw on Aug 31 2017, 10:28 PM.
Tags
Referenced Files
Unknown Object (File)
Dec 21 2023, 12:49 PM
Unknown Object (File)
Dec 20 2023, 3:16 AM
Unknown Object (File)
Dec 11 2023, 10:47 PM
Unknown Object (File)
Aug 14 2023, 1:18 PM
Unknown Object (File)
Jul 13 2023, 5:53 AM
Unknown Object (File)
May 15 2023, 7:35 PM
Unknown Object (File)
Mar 11 2023, 6:34 AM
Unknown Object (File)
Jan 15 2023, 5:42 AM

Details

Summary

FreeBSD loader expects to have mmsz variable set by bootloader.
U-Boot behaviour is that if buffer size is not big enough to keep
whole memory map, assign the smallest correct buffer size to sz
and return error.

In other words U-Boot assumes that nobody will need mmsz value when buffer
is not filled with memory map, which is not true, so calculated pages value
was too big to allocate.

Solution: Simply assign default value to mmsz.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Hi @imp , any objections to the patch?

I have no objection, but am curious if we ever need to honor the mmsz.

sys/boot/efi/loader/bootinfo.c
275 โ†—(On Diff #32564)

Is this always the size, or are there cases we need to honor what uboot does set?

sys/boot/efi/loader/bootinfo.c
275 โ†—(On Diff #32564)

It is always the size, see this .

This revision was automatically updated to reflect the committed changes.