stand: Stop support booting 4.x and earlier kernels
FreeBSD 4.x and earlier used the bi_bios_geom to get the geometry of the device. Starting in 5.x, with the wdc -> ata rewrite, it was used only in pc98 kernels to report geometry of the drives. It can be safely removed as booting kernels this old is no longer supported. This saves 176 bytes in the BIOS loader. Sponsored by: Netflix Reviewed by: adrian, emaste Differential Revision: https://reviews.freebsd.org/D36543
This commit is contained in:
parent
e895ab3fbd
commit
d43bcf62a2
@ -1286,35 +1286,6 @@ bd_io(struct disk_devdesc *dev, bdinfo_t *bd, daddr_t dblk, int blks,
|
||||
return (result);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the BIOS geometry of a given "fixed drive" in a format
|
||||
* suitable for the legacy bootinfo structure. Since the kernel is
|
||||
* expecting raw int 0x13/0x8 values for N_BIOS_GEOM drives, we
|
||||
* prefer to get the information directly, rather than rely on being
|
||||
* able to put it together from information already maintained for
|
||||
* different purposes and for a probably different number of drives.
|
||||
*
|
||||
* For valid drives, the geometry is expected in the format (31..0)
|
||||
* "000000cc cccccccc hhhhhhhh 00ssssss"; and invalid drives are
|
||||
* indicated by returning the geometry of a "1.2M" PC-format floppy
|
||||
* disk. And, incidentally, what is returned is not the geometry as
|
||||
* such but the highest valid cylinder, head, and sector numbers.
|
||||
*/
|
||||
uint32_t
|
||||
bd_getbigeom(int bunit)
|
||||
{
|
||||
|
||||
v86.ctl = V86_FLAGS;
|
||||
v86.addr = DISK_BIOS;
|
||||
v86.eax = CMD_READ_PARAM;
|
||||
v86.edx = 0x80 + bunit;
|
||||
v86int();
|
||||
if (V86_CY(v86.efl))
|
||||
return (0x4f010f);
|
||||
return (((v86.ecx & 0xc0) << 18) | ((v86.ecx & 0xff00) << 8) |
|
||||
(v86.edx & 0xff00) | (v86.ecx & 0x3f));
|
||||
}
|
||||
|
||||
/*
|
||||
* Return a suitable dev_t value for (dev).
|
||||
*
|
||||
|
@ -173,8 +173,6 @@ bi_load32(char *args, int *howtop, int *bootdevp, vm_offset_t *bip, vm_offset_t
|
||||
kernelname = getenv("kernelname");
|
||||
i386_getdev(NULL, kernelname, &kernelpath);
|
||||
bi.bi_version = BOOTINFO_VERSION;
|
||||
for (i = 0; i < N_BIOS_GEOM; i++)
|
||||
bi.bi_bios_geom[i] = bd_getbigeom(i);
|
||||
bi.bi_size = sizeof(bi);
|
||||
bi.bi_memsizes_valid = 1;
|
||||
bi.bi_basemem = bios_basemem / 1024;
|
||||
|
@ -152,10 +152,6 @@ bi_load32(char *args, int *howtop, int *bootdevp, vm_offset_t *bip, vm_offset_t
|
||||
kernelname = getenv("kernelname");
|
||||
userboot_getdev(NULL, kernelname, &kernelpath);
|
||||
bi.bi_version = BOOTINFO_VERSION;
|
||||
#if 0
|
||||
for (i = 0; i < N_BIOS_GEOM; i++)
|
||||
bi.bi_bios_geom[i] = bd_getbigeom(i);
|
||||
#endif
|
||||
bi.bi_size = sizeof(bi);
|
||||
CALLBACK(getmem, &lowmem, &highmem);
|
||||
bi.bi_memsizes_valid = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user