diff --git a/stand/i386/libi386/biosdisk.c b/stand/i386/libi386/biosdisk.c --- a/stand/i386/libi386/biosdisk.c +++ b/stand/i386/libi386/biosdisk.c @@ -1286,6 +1286,7 @@ return (result); } +#ifdef LOADER_SUPPORT_PRE_5X_KERNEL /* * Return the BIOS geometry of a given "fixed drive" in a format * suitable for the legacy bootinfo structure. Since the kernel is @@ -1314,6 +1315,7 @@ return (((v86.ecx & 0xc0) << 18) | ((v86.ecx & 0xff00) << 8) | (v86.edx & 0xff00) | (v86.ecx & 0x3f)); } +#endif /* * Return a suitable dev_t value for (dev). diff --git a/stand/i386/libi386/bootinfo32.c b/stand/i386/libi386/bootinfo32.c --- a/stand/i386/libi386/bootinfo32.c +++ b/stand/i386/libi386/bootinfo32.c @@ -173,8 +173,15 @@ kernelname = getenv("kernelname"); i386_getdev(NULL, kernelname, &kernelpath); bi.bi_version = BOOTINFO_VERSION; +#ifdef LOADER_SUPPORT_PRE_5X_KERNEL + /* + * This only needs to be populated when booting really old kernels (4.x and + * older). This was used through FreeBSD 10, but that was only for pc98 + * reporting boot device geometry. + */ for (i = 0; i < N_BIOS_GEOM; i++) bi.bi_bios_geom[i] = bd_getbigeom(i); +#endif bi.bi_size = sizeof(bi); bi.bi_memsizes_valid = 1; bi.bi_basemem = bios_basemem / 1024;