From nobody Fri Sep 16 15:54:00 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MTdsj1Hw4z4cLN4; Fri, 16 Sep 2022 15:54:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MTdsh66YKz3hmy; Fri, 16 Sep 2022 15:54:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663343640; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SdSBzadKfrz3VToRhE+Fv+rTjp+foNED1tJapubCUqs=; b=QMnDAD/Y15aW43CQcmd3any77UwryjT5ltGmTNQUtfiTQgrLQUCAOnKRRdWSrNa5LShVr4 MDeQPtD3zAn8QVy/zvTv7l0dCt8augw8Bd5K3yVuKrHbWuxz6I+iI5rHubbA0z+BY8pTie 7OEgntO+aNOC1kAsin5sQjWRRLkDab2Vt6wrev+IY0NFEO2F0XpwvqnXJYZ8mH2ICHeE1W 0kCnsoVbycJovw8DGmP2cNhmtn6doleNZxtdiziqZmLsDg6xKSgWQJNB+7+CT5JVl9lloB sFhXpMBJLR9M46PYp3K8DXPkKYaCOusPvkjyFhF5oxpJTdGN1dwB91C2Fd3DUQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MTdsh5DC9zPnT; Fri, 16 Sep 2022 15:54:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 28GFs0FR086535; Fri, 16 Sep 2022 15:54:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 28GFs0kO086534; Fri, 16 Sep 2022 15:54:00 GMT (envelope-from git) Date: Fri, 16 Sep 2022 15:54:00 GMT Message-Id: <202209161554.28GFs0kO086534@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: d43bcf62a218 - main - stand: Stop support booting 4.x and earlier kernels List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d43bcf62a2182d3f00c11e5145c8912f4468871a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663343640; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SdSBzadKfrz3VToRhE+Fv+rTjp+foNED1tJapubCUqs=; b=EERVBRBx8bEhxywRbjwXR6Ff6K1LnNEZr0EhISwAqEkhiVhcWrbXteNfLrXi0d5YhGkD4W 1O9nOW7UDavJcSV+DppJXeinilxdPPgfIX7B9rYLrp6AHfzA7rTVatr4JZYxZPbiBwI6qd J5EajURP9NVBKA4MaCQz9B9ojdIoknCAKZylyda8opY9jmtfuZDDvQwMVHKMnVhJLrh29Z wVXxg/h81JpI+O6hhw0sD+p4l6BA8jZlJPW3RoYYai+DB6V9+5ATLgvVZWO29vTjucYyGI Su2Jah411XmDKRG5lvmDoVgz1HYCcS+vr00X4aCpxhToyzqFTLfHQtHjxRrK6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1663343640; a=rsa-sha256; cv=none; b=Egytuf79aMCGF1ynOrxEacY089rc9cfZzYc6hPzqMSRUrmUlTVDPM+q/aszrBz6YhX0wPK 1oFeIb3JiyLcmdctUL4EMkp0OiwM9c0u5BEy3UoOrWbq8FPjqXE5BR3fuLQCyIART5CjSw D1GD2X/DEZLaqVZrmJYCZcHhR14+/m+KN/gbw27kjYukdgzdWY9SK19XCAfJrLB6mkt5wQ yiqDK/6Lp9V36I729Jb2Cu+mRtQxi5+iUTjNFR7UcN0JXW0xS5KD5t2uZvtFHUDtwEQrYA iOz4MYc6/yt2IjFgtwb1xktc60Er0o1DBHlbVrRAYHcvWuyJr0AAW1N3+wjILA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d43bcf62a2182d3f00c11e5145c8912f4468871a commit d43bcf62a2182d3f00c11e5145c8912f4468871a Author: Warner Losh AuthorDate: 2022-09-16 15:09:07 +0000 Commit: Warner Losh CommitDate: 2022-09-16 15:18:57 +0000 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 --- stand/i386/libi386/biosdisk.c | 29 ----------------------------- stand/i386/libi386/bootinfo32.c | 2 -- stand/userboot/userboot/bootinfo32.c | 4 ---- 3 files changed, 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 @@ -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). * 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;