Page MenuHomeFreeBSD

stand/fdt: Scale blob size better as overlays apply
ClosedPublic

Authored by kevans on Jan 30 2018, 5:09 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 6, 8:21 AM
Unknown Object (File)
Fri, Dec 6, 8:21 AM
Unknown Object (File)
Fri, Dec 6, 8:21 AM
Unknown Object (File)
Dec 2 2024, 10:48 AM
Unknown Object (File)
Oct 1 2024, 5:03 AM
Unknown Object (File)
Sep 24 2024, 9:02 PM
Unknown Object (File)
Sep 24 2024, 9:02 PM
Unknown Object (File)
Sep 24 2024, 9:02 PM
Subscribers
None

Details

Summary

Currently, our overlay blob will grow to include the size of the complete overlay blob we're applying. This doesn't scale very well with a lot of overlays- they tend to include a lot of overhead, and they will generally only add a fraction of their total size to the blob they're being applied to.

To combat this, pack the blob as we apply new overlays and keep track of how many overlays we've applied. Only ubldr has any fixups to be applied after overlays, so we only need to re-pad the blob in ubldr. Presumably the allocation won't fail since we just did a lot worse in trying to apply overlays and succeeded.

I have no intention of removing the padding in make_dtb.sh. There might be an argument to be had over whether it should be configurable, since ubldr *is* the only loader that actually has fixups to be applied and we can do this at runtime, but I'm not too concerned about this.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 14677

Event Timeline

This revision is now accepted and ready to land.Mar 3 2018, 7:16 PM
This revision was automatically updated to reflect the committed changes.