HomeFreeBSD

stand: Move md_copymodules into modinfo.c and reduce copies

Description

stand: Move md_copymodules into modinfo.c and reduce copies

md_copymodules, bi_copymdoules, bi_copymodules32 (x2) and
bi_copymodules64 (x2) are all the same routine... Replace them all with
md_copymodules. This saves about 800 bytes on i386 BIOS loader, which is
a nice bonus.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D36572

(cherry picked from commit 5d1531d9d4e7d1b1b706ab23ac3f864416e87522)

stand: fix mismerge

Remove stray line from mismerge of 5d1531d9d4e7. This is no longer
needed.

Fixes: 5d1531d9d4e7
Sponsored by: Netflix

(cherry picked from commit dd2b9c2967767b19bcbc33de0e487405c612f59f)

stand/efi: Call md_copymodules based on LP64 to fix 32-bit arm

When I refactored everything, I neglected to pass in the proper is64
value on 32-bit platforms. This corrects that. This prevented armv7 and
armv6 platforms from booting due to misaligned data in the kernel. The
only platform we support 32-bit booting in armv[67], which I apparently
neglected to test before commiting my refactoring.

Tested by: skibo
Fixes: 5d1531d9d4e7d
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D37095

(cherry picked from commit e0c3f66b4d5f0282e9c7c4803c4cd26b5a388a38)

Details

Provenance
impAuthored on Sep 16 2022, 3:08 PM
Differential Revision
D36572: stand: Move md_copymodules into modinfo.c and reduce copies
Parents
rG52804bde1baf: stand: Create common/modinfo.h
Branches
Unknown
Tags
Unknown