Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/freebsd/freebsd-src.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/stand
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2022-09-16 18:09:07 +0300
committerWarner Losh <imp@FreeBSD.org>2022-09-16 18:18:57 +0300
commitd43bcf62a2182d3f00c11e5145c8912f4468871a (patch)
treecffae0c61b45fae5fb13dc933d72c0c5f507b79f /stand
parente895ab3fbdc10fbf944289165c25357cb3f279fe (diff)
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
Diffstat (limited to 'stand')
-rw-r--r--stand/i386/libi386/biosdisk.c29
-rw-r--r--stand/i386/libi386/bootinfo32.c2
-rw-r--r--stand/userboot/userboot/bootinfo32.c4
3 files changed, 0 insertions, 35 deletions
diff --git a/stand/i386/libi386/biosdisk.c b/stand/i386/libi386/biosdisk.c
index 1b6134ab2e6b..bc819d8e312e 100644
--- a/stand/i386/libi386/biosdisk.c
+++ b/stand/i386/libi386/biosdisk.c
@@ -1287,35 +1287,6 @@ bd_io(struct disk_devdesc *dev, bdinfo_t *bd, daddr_t dblk, int blks,
}
/*
- * 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).
*
* In the case where it looks like (dev) is a SCSI disk, we allow the number of
diff --git a/stand/i386/libi386/bootinfo32.c b/stand/i386/libi386/bootinfo32.c
index 68aae9b67ba9..372bced917d6 100644
--- a/stand/i386/libi386/bootinfo32.c
+++ b/stand/i386/libi386/bootinfo32.c
@@ -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;
diff --git a/stand/userboot/userboot/bootinfo32.c b/stand/userboot/userboot/bootinfo32.c
index d496384fbcb5..782628c4126c 100644
--- a/stand/userboot/userboot/bootinfo32.c
+++ b/stand/userboot/userboot/bootinfo32.c
@@ -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;