phys_avail parts have been moved from https://reviews.freebsd.org/D16719 to this separate diff.
I have refactored things a bit with inspiration from arm's physmem.c. So far only for i386/amd. Let me know what you think. Are the files in the correct places or should kern_physmem.c be in MD folder? (although there would be lots of code duplication). Should we include more archs?
From Linux 4.16 stolen memory detection has been moved to early boot. DRM drivers don't work properly without this and we'd like to have this functionality in 12.0 so that we can update drm drivers beyond 4.15.