From nobody Mon Mar 23 23:27:29 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) client-ip=78.46.105.101; envelope-from=seabios-bounces@seabios.org; helo=coreboot.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) smtp.mailfrom=seabios-bounces@seabios.org; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from coreboot.org (mail.coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 1773942526582161.4749344274852; Thu, 19 Mar 2026 10:48:46 -0700 (PDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id 4709E500CBE; Thu, 19 Mar 2026 17:48:43 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) [209.85.215.180]) by coreboot.org (Postfix) with ESMTP id DDA6F500CC6 for ; Thu, 19 Mar 2026 17:48:21 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) 41be03b00d2f7-c741db5d610so553724a12.3 for ; Thu, 19 Mar 2026 10:48:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1773942500; cv=none; d=google.com; s=arc-20240605; b=SRWTpheuI4E2AawashxQ77lx+llb0GLixkGcpn6K3g/Q44mTYDU2NnocceL5mPK4Tn WRvT4ETWpbJ8zgnFCtCft4oKPSNcIdZECZlvYuf6QTfO0/44BkLMGl9Ks99PI6517xSN XRvn56NI3efFq27ipw7jT4nneao/t8p7lN198cOkG/hpmJ2TgqQGOwWuoLjpVH+2/ipN Ywn8iSJ2A9S5bcHFsY2W8LMNbAqLWX71zQTW5+CFKyAKZrwIrLwoxOK2mdFD+cOdkgVH AfV0bPyQ4kcgGeohPvs21eehYG9a811gypW/k1kjf6W6/HB2kcMftr61lOB7Vxx7l+N8 jyBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:to:subject:message-id:date:from :mime-version:dkim-signature; bh=cYytIojegNUwc2P//dZDl+jZe8WNRJpwud6SCeXzAAo=; fh=Ojiz1Ls82Hh2+087o5dkFgqBcCQ1ySy8hFuOrpUxsHk=; b=QMi8bUWvEo7siuZvMzs2qoPp+cvBioGEqOOIYIf0WiS7N8Q226t/Y9ZD5Sr9RWIJkL bb/pepeHkjyUvRTqWkgjkJbyR2ksYY4IEuR5ThmRQ5AdB/xMiQYjSdG+gJsK1gKDVlzz D+Kln5FRKRWX/T+wdVkvPRIkoeyOWtmAFFDJbELhEBiAVI8b65HdjFSFIQOyvzOpfyNt Zciw/3B2U7V2z4+RZoDJibzgZveIE216SZI73SxvdfIcCqDDsV+3ECnRsnWe1npY6fC1 utXhn4SpDs8xoFcVyL3dx8kYFoT33vdVyBCl3que41odYZv+0m9AY38lEn/ZQLLYZN3b EbtQ==; darn=seabios.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773942500; x=1774547300; darn=seabios.org; h=content-transfer-encoding:to:subject:message-id:date:from :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=cYytIojegNUwc2P//dZDl+jZe8WNRJpwud6SCeXzAAo=; b=FxB6y3NFEDGvL5e6Ki8dhBIX9obvnJe9dNDO9JTSQfS8wPQervFwIheyrtIgfzrVao U/nRA+70s+XaNR+Q6UKcq5hF9Pr/7Ty4PtHDPvFhpgDYw64jySLb6ZaZQD2YzfgEx0zS Sjtef2gTgkeCm1+5HEpdnUyumGgGLlj35wqAm9GWQxk7ICfeGhF2LOTlA++z8iKmNUqg NDj2RAKlph1RPLeQSMUWZevFPtGqkPXD9XSdvYhyb+5mBNVCdJU9Cz9u6AhMyHUuehK6 oTvC/rgKxNsPlMG3mzNYg2vadbngPn4dLYa9OTN1NmApOHJRfXzIiXjYhcoihDwu1hCs 68yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773942500; x=1774547300; h=content-transfer-encoding:to:subject:message-id:date:from :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=cYytIojegNUwc2P//dZDl+jZe8WNRJpwud6SCeXzAAo=; b=R3GH31nsskkP4AXglrtyOA+tqaw/SYpJ3eID/4vGye34fP1F0hXoDOU0fN3WlAzywZ 9eIrxH1EWW69/EWpF5VL+NRmzMiRLOAB4xcZHJjI9kVggXBfNvIM8fchPgCO5Xw9xgmJ 4zc9tCDO8RXS7QKrgJ8vBck6/1EH47UW3E12XF5sKlfnYOcOeRqUdwML84z9PGAX4dTe q1zx9df5l9Dq2XqF6dyYQjjDtAv9e/jReCN1jX5V36LWtmD8Y+y64m9N2dYoTqs+U3bd RxpA204MvC2Hzc7NNyZZlmqyjnn5gWb2p4RrQ33jUOKnGX5l067JYlcMMWCMfxl3uBVb BJxw== X-Gm-Message-State: AOJu0YxIr/4M3++YLWqb2LDBcwcjlaY22GvNKrk4o50CFDJDbwDvwr/0 3WZQSg/fOfeeFh8efM27FeV0q5Ki2UZy+ryQkbDIirssRQg6Fe4B8K5LCFc+wRX9TWpLz/fv6Rs 0RsyeNv3MbL4E6rz1Pk+QtzfDx6L/cNXRQhGmjhA= X-Gm-Gg: ATEYQzyLRCeWuRXW9pSPkL/ih0upHjMpwZLY7p6bhv8OwKUCpzMkG3n1/DpPozTuyb+ hv/vg0Ee1jbfbbOF1Hn//ZUOOLuZhemATFW2eD/CrEHqAiGE53lvk5Tdsta3aRTnSk/KzdtDFv5 No8p7toZFD8R9Hk0MMTS0df2bkF1th7PMRdXkpTwwoFSvj11x73UxcNmDzCwYzb6SpBzrG2HEvV EKKfM0Zd+qiJuVEuaECM1Fao0IcTmqh0pZsAd5u7volQXFjHwl/23MbVkfc27KkfU8RnbfT8N4p uHdLSJfzJLDnvx0XGF3zQAC+So9hkpvhtJSjwWoZlldteGmJ3ZnQw6XPsUSqIw4akAyRPw== X-Received: by 2002:a05:6a20:7d9e:b0:398:6b9a:675f with SMTP id adf61e73a8af0-39bcec30267mr236699637.63.1773942499548; Thu, 19 Mar 2026 10:48:19 -0700 (PDT) MIME-Version: 1.0 From: Mike Banon Date: Thu, 19 Mar 2026 20:48:08 +0300 X-Gm-Features: AaiRm5128IYpi4Nx4PfAH4C3j3XGcxYrqM8nKhb5t39Yz4EucTuw_ZM8YSQYMZg Message-ID: To: seabios@seabios.org Message-ID-Hash: 6CH2INTSFJXIXLQMH5OB7HQQOX3EH367 X-Message-ID-Hash: 6CH2INTSFJXIXLQMH5OB7HQQOX3EH367 X-MailFrom: mikebdp2@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-seabios.seabios.org-0; header-match-seabios.seabios.org-1; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.11b1 Precedence: list Subject: [SeaBIOS] [PATCH] boot: Replace hardcoded BEV array size with BUILD_MAX_EXTDRIVE * 3 List-Id: SeaBIOS mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: + X-Spam-Level: * Authentication-Results: coreboot.org; auth=pass smtp.auth=mailman@coreboot.org smtp.mailfrom=seabios-bounces@seabios.org X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1773942528362154100 [PATCH] boot: Replace hardcoded BEV array size with BUILD_MAX_EXTDRIVE * 3 The BEV array stores boot entries for floppy, HDD and CDROM drives, as well as option ROMs and other boot sources. The previous hardcoded limit of 20 entries was arbitrary and could be exceeded when many drives are present =E2=80=93 especially with the upcoming support for multiple floppy images. The max number of drive boot entries is bounded by BUILD_MAX_EXTDRIVE per drive type. Since there are three drive types, the worst-case drive-only total is BUILD_MAX_EXTDRIVE * 3. Using this value ensures that the array cannot overflow due to drives, while still leaving room for a modest number of option ROM entries in practice. Signed-off-by: Mike Banon --- src/boot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/boot.c b/src/boot.c index 5c37dafd..18e62a43 100644 --- a/src/boot.c +++ b/src/boot.c @@ -798,7 +798,7 @@ struct bev_s { int type; u32 vector; }; -static struct bev_s BEV[20]; +static struct bev_s BEV[BUILD_MAX_EXTDRIVE * 3]; static int BEVCount; static int HaveHDBoot, HaveFDBoot; --=20 2.53.0 _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org