From nobody Sat Jul 25 08:55:11 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 1784688449451679.8536851454248; Tue, 21 Jul 2026 19:47:29 -0700 (PDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id DFE5C54E4C0; Wed, 22 Jul 2026 02:47:25 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) (fout-a6-smtp.messagingengine.com [103.168.172.149]) by coreboot.org (Postfix) with ESMTP id 39BEF54E26E for ; Wed, 22 Jul 2026 02:47:04 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by mailfout.phl.internal (Postfix) with ESMTP id C7382EC0082; Tue, 21 Jul 2026 22:47:02 -0400 (EDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by phl-compute-06.internal (MEProxy); Tue, 21 Jul 2026 22:47:02 -0400 Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) 21 Jul 2026 22:47:01 -0400 (EDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by chomposaur (OpenSMTPD) with ESMTPA id ef815b72; Wed, 22 Jul 2026 02:47:01 +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:message-id:mime-version:reply-to:subject :subject:to:to; s=fm1; t=1784688422; x=1784774822; bh=JNazu6Ie43 ORADEAQBvHOuOBSwyDaCglxcNvabzGUFM=; b=YNd/WvtGBAfI+1j9kzoEW32Hma gyiVyF2B6rXof1PMDjKkHHbk4XreM48Jm32BCKk6LBxBGiuB3jKg+uOmOH6mlK5P rg3ajBj/hiuKGWL3aTm51uNlzPpNc4uJSB+a7clcUWT09QH0BIN3MGR8vi/dh6cr iSN0ee766MhOppj4ZITvIuH7ZSkehUKFB3UFtsZOatsGhrQ8WrGKvtLmjzUw3Gal 6bm04TOh87bR88kZGt4uoFb0AFUSMRHrMNYDVFgrAVkSVzNpTyKTfhGsYFs30ir1 Q6byGEmZqx9buupS2bCm6WAwg29dguD/0UmeNQqdM80x1vkYtJdyTZV+vrpw== 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:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1784688422; x=1784774822; bh=JNazu6Ie43ORADEAQBvHOuOBSwyDaCglxcN vabzGUFM=; b=Owqkg30qN3uTDIGmVtbnVFzZ0ELp0z5GGDEXTZwHWfCMIwQTMLx tLm1TE39nn7ZdAtpHzz5iB8AXArsrJJdMuNlzzHm1L8tQzgblhLLNAHEDW6LltLx 9LfrpDri6SA38mbhmzJxKWvipKI2IrDmykQn6G3xa3nt0yIpUhg3jW309JizgAYy +rsO33HQ4RpuYgUa+u431Fm6Bd9a0ZL3ZvCZIEiiwv0o1gbLYtqXy/Ckk8QZzfIa vBbSsj77VHpygvUQ3vONmIjrO8zBCYfQNvoGl3xHpYH3PvAPLvvaHiFNxBc1B19o Hyq3FYTscKSwXVgTHtr0LsCsweqCfP6oMpA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTEFwC010b5lwP8kKGIeZxmqUkf+lLaTEsKtM+MXbEO3VC9De8+c9w5eNXJ8S+9LbP KsKLqFBl3xDMLR7z/lDcZpHSjuqnPGxA3wA3L9qSiKnV51uIqye2afqBqRaSr8tGFKRCJY IiL7AGlTouMfN3wMaINyLuwMH9V4P20rnFNfWoVpjguS5KxoGQHQFUJPcOGobTvlu4pbAw WyWXNkocKRaJ97e5aKBumcm1DEyNkWiMelAmFiEc4ANr5V1+IEHBc6shUaFD7qhiFoUt+T qvNmk4yamgt9VqrArcua5MdEDR5nmhQHrcybKLxkv58t04fdQnJiHlGVNA2yQBanQNmTS+ Dst7KqjrYUIQBhZaBYesFwcpotkMRJRcGD3m3ZRyUSNGr9m3DCtlKjHL/6FD6EOuDinn7q acLl9QPdAa3BXvwFV2l8YMIGgYU4O5AVf7SbNQnAOzVieNxtYZePcYujzLwYiYmfeAVDY6 ucSBZvrTX6VXtniHsgA1+IzZqRWqfgvZ5eXl6EYVlUIwTwbZTjrbwMG0E4H6Qt8j23EL1m MaN0m/uLe0fQxIdeXZaCq4Bb6tmmsEw4s5jNNy7aDVAgpXV1F03qhmD/jcXejEnyZZxEeO bFP5Fwm+TF80Xvg5znwZlSkCbOM5HC5xtjOHKmrDsUKnQXVJE07C5RtWWcPA X-ME-Proxy: Feedback-ID: ib26944c1:Fastmail From: Chad Jablonski To: seabios@seabios.org Date: Tue, 21 Jul 2026 22:46:58 -0400 Message-ID: <20260722024658.1214775-1-chad@jablonski.xyz> MIME-Version: 1.0 X-Spam-Level: *** Message-ID-Hash: BH2AM7NRJXPBVY5SDSQZOVR3II4IBB2L X-Message-ID-Hash: BH2AM7NRJXPBVY5SDSQZOVR3II4IBB2L 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: BALATON Zoltan , Gerd Hoffmann , Chad Jablonski X-Mailman-Version: 3.3.11b1 Precedence: list Subject: [SeaBIOS] [PATCH] ati-vga: Fix bios tables for radeon KMS driver 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: 1784688450502158500 Content-Type: text/plain; charset="utf-8" This fixes two issues when running ati-vga with model=3Drv100 under QEMU using a KMS driver. First, the radeon KMS driver does an additional check when looking up COMBI= OS 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 fallback to another method (CLOCK_CNTL registers) also resulting in bad values and a division by zero. 0x60 matches what I've observed in the bios of a Radeon QY (RV100) (PCI 1002:5159). But I don't think the value is actually important other than needing to be large enough to encompass the table entries used here. Second, the connector info section needs a non-zero value in the DDC type field. Zero causes the radeon driver to fail to initialize the DDC bus and then no connectors are found. DDC_DVI (0x2) is used here so that the GPIO_DVI_DDC register is used for the radeon. From what I have seen r128 drivers ignore this field entirely. Tested on Debian Squeeze (Linux 2.6.32) and Debian Trixie (Linux 6.12.94). Signed-off-by: Chad Jablonski --- To fully test this you'll need the ati-vga CP engine series under review on qemu-devel: https://lore.kernel.org/qemu-devel/20260719161536.774061-1-c= had@jablonski.xyz/ That series is focused on UMS only but this unlocks KMS! --- vgasrc/ati-tables.S | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vgasrc/ati-tables.S b/vgasrc/ati-tables.S index cdbde2fa..d7a8e22d 100644 --- a/vgasrc/ati-tables.S +++ b/vgasrc/ati-tables.S @@ -12,6 +12,8 @@ // main info .org 0x50 _ati_main: + .org 0x50 + 0x06 + .byte 0x60 // COMBIOS header size .org 0x50 + 0x30 .word _ati_pll .org 0x50 + 0x50 @@ -37,7 +39,7 @@ _ati_pll: _ati_connector: .byte 0x10 // one chip .byte 0x01 // one connector - .word 0x3000 // type DVI-I + .word 0x3200 // type DVI-I and DVI DDC .word 0 // end of list =20 .org 0x200 --=20 2.54.0 _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org