From nobody Tue Sep 22 05:48:12 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; dmarc=fail(p=none dis=none) header.from=jablonski.xyz Return-Path: Received: from coreboot.org (mail.coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 1785261040179429.64862400507116; Tue, 28 Jul 2026 10:50:40 -0700 (PDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id BE98F54E4A9; Tue, 28 Jul 2026 17:50:33 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) (fhigh-a8-smtp.messagingengine.com [103.168.172.159]) by coreboot.org (Postfix) with ESMTP id AAEDF54E495 for ; Tue, 28 Jul 2026 17:43:12 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by mailfhigh.phl.internal (Postfix) with ESMTP id 9F2F8140010D; Tue, 28 Jul 2026 13:43:11 -0400 (EDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by phl-compute-06.internal (MEProxy); Tue, 28 Jul 2026 13:43:11 -0400 Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) 28 Jul 2026 13:43:11 -0400 (EDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by chomposaur (OpenSMTPD) with ESMTPA id 7dedaf05; Tue, 28 Jul 2026 17:43:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jablonski.xyz; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm1; t=1785260591; x= 1785346991; bh=Sp0A7hd3pRDFGgpG4veteTqm59s8VRUfFUpvn4vmqd0=; b=F VL+dAxHud3gDKNrTzWkrjcVuAvN7OM04RekGkTb6jc8/6j79sO20xQVthqBxjMSj uHapyX5afEcasBnITobG4dcnQMh3FitcHJC8FYATIPGdHIzQEce2HAfcKovBRnCd QiM5u8BBsn9BzrGmbeWhK9Fymu/HE/U5Vv9hlA99iMQoWpECfVkx1XgHbdbRFoqp BTorsbbxsVhGVaFLlwqlm19VBwoUkYbf6QL13Gc+9KRHJWFfRHyf71KZHcOQIorN 7JoTWe4tE8q9syFRGxUU4IE5scZJq8xUpo5TlVL1IyUN/XqFJgvbqsmKooOuDw0j OS+4x2AQ8ghcxDakRSEig== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1785260591; x=1785346991; bh=S p0A7hd3pRDFGgpG4veteTqm59s8VRUfFUpvn4vmqd0=; b=OX9vBa/2Dys11vPEB Q+CwF6a6x6fWAIBiPVfWFVP1JtJ9JnXcmHwDgdluxFENjf7JI3y1FVb0/WFIW5g6 DgQ8+S1DYiZle7uydgCLJ5Bwb+03DEk6dWuNI7tRyWR3n14ZlO3L2ZZv7xSnGldW D92neKaVh8oeiBFuQdsyivhT1g2tiPh92FoKOfvBf7Nt5dy4tBowzpID3rKN+A+o by3a5YFSI6zwzTG/bEd5X7PtEgt6caXOCMTJL+a5WOvsK+jTWxkRe4AoWyr4xfS+ TkoyyVeGXmLplInUO6nznYyJv0lHiijH/eypnP8fZmXtW3WwI+nl7U83zJr35zqu gbRHQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTGTZqke8f2iSLZvWeqN/SZ2g6GQALNHBfPAZaw6ttUk4D7PLK9KrmPMUe6zOD2pKx /4xmOM27JULEi0xj1gRxkFbt/yLg/R3Hh/VdR6nLZIPvhbJphvjO6Lg1nTwvQ80WFUhDnl 8w4wkTlxaUPlgx3bi+iCcDjx0QgNsKDVXBO6YPtJ9nv1yGG51Npy4rgqEp5Nlz7I83m1i8 CYI9hceta02kx6mPxSQGh0DxngudSh46OazBz63kHplhI1DkRZnXFeJ07gK9nqhNzdTdhN TioGO7rdX4T/8xhfY2lixb+mBkPCSVOVGp+6eg1OmY6ibawGEmmezYrvsC/WfjvuSdO7q2 3c3R4uNuCsVuypkx+VZakqxwTIOcsn00qDso4tbM54Eg4e0dnv74yZD9lc+r19ELvetqzQ UgZVvsdT3dV4F7gx2VtgQ+jEUJkCsUv4RpmbS/bGXSZM88hM+rdV5tcXTFwivQpfR6NEy8 cJaoldeiwbiAIv+lMbhBWm2XBHH4QKkIl/8DXGuEgSNQUQl+ksflEQyz20oCirSWfnQsuV QockwsaTOCXU6Gq0No9gmgs1R63tXdqL5H9pyxj7JV5M9PI4lsRYQngR/vIGS+pNWKjM00 J+1YAC5d4FARh0E7CfPlQYLy9WbD9EzybFIsGcl3aOIWVeRPkbGaruwAQFpQ X-ME-Proxy: Feedback-ID: ib26944c1:Fastmail From: Chad Jablonski To: seabios@seabios.org Date: Tue, 28 Jul 2026 13:42:42 -0400 Message-ID: <20260728174243.1644268-3-chad@jablonski.xyz> In-Reply-To: <20260728174243.1644268-1-chad@jablonski.xyz> References: <20260728174243.1644268-1-chad@jablonski.xyz> MIME-Version: 1.0 Message-ID-Hash: TO4ROQWMMSDNFOLMOOTBWY36M6NVLCMT X-Message-ID-Hash: TO4ROQWMMSDNFOLMOOTBWY36M6NVLCMT X-MailFrom: chad@jablonski.xyz 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 Cc: Gerd Hoffmann , Paul Menzel , Chad Jablonski X-Mailman-Version: 3.3.11b1 Precedence: list Subject: [SeaBIOS] [PATCH v3 2/3] atiext: Add size to bios table for radeon Linux driver (KMS) List-Id: SeaBIOS mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable Authentication-Results: coreboot.org; auth=pass smtp.auth=mailman@coreboot.org smtp.mailfrom=seabios-bounces@seabios.org X-Spamd-Bar: --- X-ZohoMail-DKIM: fail (found 2 invalid signatures) X-ZM-MESSAGEID: 1785261040699158500 Content-Type: text/plain; charset="utf-8" The Linux radeon KMS driver does an additional check when looking up COMBIOS table entries. It checks a header size field to validate that the entry falls in the header region. Prior to this patch that size field is zero which causes the driver to fall back to another method (CLOCK_CNTL registers) also resulting in bad values and a division by zero. Tested on Debian Squeeze (Linux 2.6.32) and Debian Trixie (Linux 6.12.94) with: qemu-system-x86_64 -vga none -device ati-vga,model=3Drv100,vgamem_mb=3D32 Signed-off-by: Chad Jablonski --- vgasrc/atiext.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vgasrc/atiext.c b/vgasrc/atiext.c index f003eea8..44c9afa0 100644 --- a/vgasrc/atiext.c +++ b/vgasrc/atiext.c @@ -347,7 +347,9 @@ static void ati_i2c_edid_rage128(void) // radeonfb needs the pll information, otherwise it'll crash with a // division by zero ... struct ati_main_table_s { - u8 pad_0[48]; + u8 pad_0[6]; + u8 size; + u8 pad_7[41]; u16 pll_table; u8 pad_50[30]; u16 connector_table; @@ -374,7 +376,9 @@ struct ati_connector_table_s { } PACKED; =20 extern u16 _rom_header_ati_table_anchor; -static struct ati_main_table_s ati_main_table VAR16 __aligned(16); +static struct ati_main_table_s ati_main_table VAR16 __aligned(16) =3D { + .size =3D sizeof(struct ati_main_table_s), +}; static struct ati_pll_table_s ati_pll_table VAR16 __aligned(16) =3D { .sclk =3D 23000, .mclk =3D 23000, --=20 2.54.0 _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org