From nobody Thu Aug 01 21:31:24 2024 X-Original-To: dev-commits-src-main@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 4WZhwr2nRbz5RVCT; Thu, 01 Aug 2024 21:31:24 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZhwr25fxz4T6X; Thu, 1 Aug 2024 21:31:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722547884; 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=Pa4LAnl1s60CD/Edol1cgjszJQMS8L48xoGn5RTNLXU=; b=LyXgmKioMa524VLqHPoQdou7ITZjIoKyjXCF5df6QidjXFM9WygnN2D4Jaq2+4S6whwTi/ GMaeG+p2A4mnC1gBMIEZ9iDXOFAK5T6ORvKDKla+KvflwnZePQW8XGvJ09ECRZeOZvi4PP FmMK9LIzISwhpkfNjr6wFmlnrcFYtPb0PYPRjmrEbJEcb07YyBPdgIKkuBlcCiqBl8lcyL 8lzDBC++2ATQXufeDyusFdmUAysHU0lvSUqj6YlT2Yx12pFkN6H4zsrnFk+Mg/ZopEZg6R V0CihrKNff9iaJc1FTNBirq+e9nikwHFYxHepT3iqzYPD9C7jL5CLNhZBSjvyw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722547884; a=rsa-sha256; cv=none; b=JTA8WF17ABUXIzrVNbhW6NcafdoOwMN+lhKQMXb3ra0gGd8EpHU2bM71HOrM6bycetIbe/ WJXwrpnPSYegW40fLIdUAydQssNR4TannX0KBi+B+6OQhr3Oeisr8Ny00Sqf++VaY69kvp AJFkyAR3VeqRfCCJCGAEcVV543e+UhhpujIlva7rsLQP3qccb40d0GpBQwo6IgjX7ie0U9 xy5CQ3knT3GL6X9kf9KB5089cIITKkzyZJaMpf3wJPJZW64s7EPw2AnDtBSzSNCbAPGyJw XCUorQRkPGrH8jeBOEqdxZ/H0eekltwS44faSeeJTdwNL3yPk81ylWFgLRNjxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722547884; 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=Pa4LAnl1s60CD/Edol1cgjszJQMS8L48xoGn5RTNLXU=; b=oIDmFxHGcQQT70+0BfrQO4bUiaVJd+BWjIuDWOBV0EEA2ErtR2H/1Z8tnkKyrsO/Zm7ami BPPr1gutFM20kbQSrInxR20CMVORWEFURQ7RO931DqWyFj+Gujm+BJ6HotrjRzjFnAZTVX kInKhwCxCSZ45o8umTVV2he/L0Zyl0Wow+RLgyKIV5vu8se2DRZ7bo/vs0e+EK0KRf97hI d3sPWY/vwgx+uTt1WQp/IotYCT/7xzoptCSz/k5j+StkFNVp3iHL/qSMxBM7Q+VnzdxCo6 8JgGyOS3I0V/sKRcY9n/x0KjmUW2znYwjl8H3qEz/xO1aaV3W3n3tjk3WMZoIA== 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 4WZhwr1jKcz11bb; Thu, 1 Aug 2024 21:31:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471LVOlQ039272; Thu, 1 Aug 2024 21:31:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471LVOGC039269; Thu, 1 Aug 2024 21:31:24 GMT (envelope-from git) Date: Thu, 1 Aug 2024 21:31:24 GMT Message-Id: <202408012131.471LVOGC039269@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: 46ea2ffc3fbc - main - stand: Reduce limit to 500k for x86 loader List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 46ea2ffc3fbc42089d8322a65fdee8476d2b00d6 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=46ea2ffc3fbc42089d8322a65fdee8476d2b00d6 commit 46ea2ffc3fbc42089d8322a65fdee8476d2b00d6 Author: Warner Losh AuthorDate: 2024-08-01 21:24:51 +0000 Commit: Warner Losh CommitDate: 2024-08-01 21:30:26 +0000 stand: Reduce limit to 500k for x86 loader The largest loader that works for PXE boot is about 500k. PXE needs low memory for packets and other driver state, so the largest safe size for the loader is about 500k. Reduce the size from 560k to 500k so we don't accidentally break PXE in the future. Add a comment for people with special needs. If you control the hardware, it can be safe to have boot loaders as large as 580k or 600k in some cases. Since the BIOS loader is becoming more and more of a legacy item, the build variable LOADERSIZE isn't documented. This change doesn't change that: there's been little demand for this documentation and in general, users shouldn't change it lightly. PR: 257018 Sponsored by: Netflix --- stand/i386/loader/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/stand/i386/loader/Makefile b/stand/i386/loader/Makefile index a4aa3a3c4d45..efd442977780 100644 --- a/stand/i386/loader/Makefile +++ b/stand/i386/loader/Makefile @@ -32,7 +32,12 @@ VERSION_FILE= ${.CURDIR}/../loader/version # # will tell you how many kiB of lomem are available. # -LOADERSIZE?= 560000 # Largest known safe size for loader.bin +# We further reduce this to 500k, though, to give PXE an additional 64k of space +# so pxeloader will fit. If you have special needs that do not include pxeboot, +# you can safely set this as high as 560000 generally, or a bit higher if you +# have tight control over the machines you are booting on. +# +LOADERSIZE?= 500000 # Largest known safe size for loader.bin .PATH: ${BOOTSRC}/i386/loader