From nobody Tue Jan 24 22:12:41 2023 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 4P1h6f0kRcz3bgBt; Tue, 24 Jan 2023 22:12:42 +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 4P1h6d5t5pz3DT6; Tue, 24 Jan 2023 22:12:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674598361; 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=EABz0hN6v24VSvWoc+XEuGHEe0EOx4MsqtnOD0Td0HU=; b=HO1fvyK/X7ezrA3jkrwnz5/qSbL5csBuIapg1BNfDejKFkpsouEow6m0EZ64bf2z2ewcnf ntGBZAdAI9C2f32nCRee9GpEe4Mwu2PdU6mzHyX3fzchreZ9tgP/Ahyn2JKr9GVHYHJGQn sMFOTmC5XsAs/lTcFYtRD5q90wO1MnJHXHnvtXdRofEi8EX3pC8R9iFdt8OciKxfYV62Tg nDW9p7YiagB+ytdcWR8sYMnVn22J369NTUBnhd6Tb8R3//1AFOdLcNFdjkikOVEi5x6Z0L igNb0MvfWSjFUhB2nKVGkdSio4YmA8+7Hdd6xBVcsyw9L2lA8eu2kpDKyP2JtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674598361; 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=EABz0hN6v24VSvWoc+XEuGHEe0EOx4MsqtnOD0Td0HU=; b=LpJPpTKBQ4l/2kclgMx3RllwiXVyBnVMBmE49l3Zf+HTwy4DvPBt32LaOwEn6jNNvwYzS8 K2iRgpOnT0awGNI+MGDR+xvKQsKwdB9BZYyI4119PQcUA5MPW1glN91mtNS9U4dOQeB5m/ uDekd8q5YwLwzjIpHIR4Yz7g+tVMQOLmUXVvilx5c3vh+kZPHnwP9uIhH6xRtBYwTCP5C4 FcwvuHvqSl0HfnqvpcFvA7t5Zhq01Qrn6I1vbe5vklL0j2zABPHkjTJ09ViugwosmjMNG5 XP0SCpn8tWI9KD2ky3vXDssozEUwezP46Qy3E7Ybgfl/QjUxJjNUO7Oi9Cy3pA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674598361; a=rsa-sha256; cv=none; b=pOPs7IW9ATxR8NcyIM7EWKMwXc7W+yF7Jqu+vQZBy1in0ugeJuR+6aAODiCQIMftfJWlNz u3tE0uUwa7MLGNxIAA2ry3vmRbuileTIMaKeokiugwqCY1LYs161QnKUquEJ5ry+yP/p3i VfP6lH06prxJy1Z7qBOR43ROQToXDtd1IbT0MzX3TWcYQ0gczOyYeWd9veGXq8lq/fXfu0 +6TgIwHgR2hZ7tqFmQm+XRoXJkstbYHrw57AqPD78pADQdwStwZDwIIzk8dwQsoJHw4twq p0f83ubKRzVzTJQ4WuDYNyImM/Znxf2ucgbtK1txSRLN3wT3yxsvDnqgpUuwlQ== 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 4P1h6d4p61zQYN; Tue, 24 Jan 2023 22:12:41 +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 30OMCfYA087382; Tue, 24 Jan 2023 22:12:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30OMCftq087381; Tue, 24 Jan 2023 22:12:41 GMT (envelope-from git) Date: Tue, 24 Jan 2023 22:12:41 GMT Message-Id: <202301242212.30OMCftq087381@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 771751dc1591 - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 771751dc1591feb1369388561f473d032e475a1c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=771751dc1591feb1369388561f473d032e475a1c commit 771751dc1591feb1369388561f473d032e475a1c Author: Warner Losh AuthorDate: 2022-09-16 15:09:07 +0000 Commit: Warner Losh CommitDate: 2023-01-24 21:49:35 +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 (cherry picked from commit d43bcf62a2182d3f00c11e5145c8912f4468871a) --- 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;