From nobody Wed Sep 23 10:36:36 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 1785260899025701.0822165956972; Tue, 28 Jul 2026 10:48:19 -0700 (PDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id DEEE854E4A2; Tue, 28 Jul 2026 17:48:12 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) (fout-a3-smtp.messagingengine.com [103.168.172.146]) by coreboot.org (Postfix) with ESMTP id EDC6754E496 for ; Tue, 28 Jul 2026 17:43:11 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by mailfout.phl.internal (Postfix) with ESMTP id 13CD9EC03E3; 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:10 -0400 (EDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by chomposaur (OpenSMTPD) with ESMTPA id 3d2fa496; 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=sRb0jhPUrxyLiX69o0NBqM2YrSNXPqPkmOMz0EFl0XQ=; b=H gS4973DGkWvGpM0pCI47TpASOXr5CYyBaOT8eSl3aqT6dzbeL0SfE43+yYevCazb Zvzl6abe3R9D9whhB1Ca4QO/rVug8ktPBqgytWuLTqBQrIgquE663EBC5JXz7jcW ubaox0gdwLZZVZ3UBF+EET3mMjLDeVcQqxmd0CVnGEOdi2cihYVMt5rtKBamFeuL MbEcoWiAxICUOZTRYjHfPve69QmYH4yR5E1XVjOiRqZkYkGv07WAY3CBTHIgALjj Kclf3QUIIe4Bt8/PbdK+X6GvzIbDAeM+ZkgkTJthiO/9tvbB8XnIifjPs4YVj/Vi 02d9wVjcSIiXe+bXx4/KA== 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 Rb0jhPUrxyLiX69o0NBqM2YrSNXPqPkmOMz0EFl0XQ=; b=M8rHSP3GykzOYNYZ7 q5gQizc/vbbWzEcMcmr9VQUTiTKzncBOzIi7v1qxl40Q722+G0Rv8h7lQ174G+P5 XqSqlQjKVn7iqxkio1s+Z6HJacc+W/WnBAFwkktOwqHMEYqqQcTMxwJmOcdPL5nA pJMcuKD/a9IRZG0DOaMMqzAjNmKvpoWXAvJha2aOJRx6Re/IzecIn7bBtI+2FgF4 Sau65axwZoZbTau3F5c0GNwqLEwATMyr4gVSyoFs8urGaPnUiU0VyiUJzLiv5b1I mP63Z/+Fyhan5O5qenWFqu2spnLFDZc7Xycu2HOtd6IDX++su1/GhJxqg2BrAeUJ XLGVw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTGkhIO2r9whBLMidWSZA1ehG3656x4BkevwGjODGymBAIT57DXlfP1ZwdnQADjnlB pKEaQxCCMzxbDaxRfgmrn/u3f+Lau4db8fZl10kiGr02Uf8iAdPT9C/C2fE1b0CcGwFEoe qrR3d3/5gdLgB29ynX5oaeBFS6e7wqH1cQJiRWlawaj0799ttZ2+aa6z1Jw/uXPZO/SX/U QECbBSo0OvMjhiqFow72XQrwFDQCz5cdwCcvWSSqj/lR8SOifBMIoWbeBamc199cTe+C5n vGUVZGcezdXkayruhl48es6fGiZRnNVEMtbE3XWpMcSInIunS4Dh7DJPHTIia1z/JOCepU pkvpo8dgGbRG0BIEEjewiZ9QlyIzfboQqINLC0LEQJlpCWHuTQKwYC8Y68HVpu/lB96Q+t rsWh88K+m7qRiSVDNf3EvSk/Hd+1ccAuYHkxC7C6W8fsFL1vFvrH86j3FXtHUbAQzE1+MP aXG9IXKUm6ZuJGj52lsNANnFXdTgZEYeBuCnRyZJQUa86SHJaMZc1xz7czCMrVWxuZRffk muq6EvRTDCYFL7nxxrAZFRkBhodOAU5QQiBQ3bGnfOfE2DYuEDSfSBT4Y5fGO0SJMAin+y 8esv2OniPVVfb5i9eih8AkFmOkCOCaRsFWe0UlU0b+FnPduc6t81wYOuWyTw X-ME-Proxy: Feedback-ID: ib26944c1:Fastmail From: Chad Jablonski To: seabios@seabios.org Date: Tue, 28 Jul 2026 13:42:41 -0400 Message-ID: <20260728174243.1644268-2-chad@jablonski.xyz> In-Reply-To: <20260728174243.1644268-1-chad@jablonski.xyz> References: <20260728174243.1644268-1-chad@jablonski.xyz> MIME-Version: 1.0 X-Spam-Level: *** Message-ID-Hash: 7BHEN3EOEXHAHUU4HPPNQA5GTODAWHQR X-Message-ID-Hash: 7BHEN3EOEXHAHUU4HPPNQA5GTODAWHQR 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 1/3] atiext: Implement ATI tables in atiext.c 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: 1785260900414158500 Content-Type: text/plain; charset="utf-8" From: Kevin O'Connor Move the definitions in ati-tables.S to atiext.c . Signed-off-by: Kevin O'Connor Signed-off-by: Chad Jablonski --- vgasrc/ati-tables.S | 43 -------------------------------- vgasrc/atiext.c | 61 +++++++++++++++++++++++++++++++++++++++++++++ vgasrc/vgaentry.S | 6 ++++- 3 files changed, 66 insertions(+), 44 deletions(-) delete mode 100644 vgasrc/ati-tables.S diff --git a/vgasrc/ati-tables.S b/vgasrc/ati-tables.S deleted file mode 100644 index cdbde2fa..00000000 --- a/vgasrc/ati-tables.S +++ /dev/null @@ -1,43 +0,0 @@ -// -// Fake ati bios tables. -// -// aty128fb and radeonfb try to gather informations from these tables, -// so add some stuff here to make the drivers happy. Specifically -// radeonfb needs the pll information, otherwise it'll crash with a -// division by zero ... -// - .org 0x48 - .word _ati_main - - // main info - .org 0x50 -_ati_main: - .org 0x50 + 0x30 - .word _ati_pll - .org 0x50 + 0x50 - .word _ati_connector - - // pll info - .org 0x100 -_ati_pll: - .word 0 // ??? (not used by radeonfb) - .word 0 - .word 0 - .word 0 - .word 23000 // sclk - .word 23000 // mclk - .word 0 - .word 2700 // ref_clk - .word 4 // ref_div - .long 12000 // ppll_min - .long 35000 // ppll_max - - // connector info - .org 0x140 -_ati_connector: - .byte 0x10 // one chip - .byte 0x01 // one connector - .word 0x3000 // type DVI-I - .word 0 // end of list - - .org 0x200 diff --git a/vgasrc/atiext.c b/vgasrc/atiext.c index 69dfd46e..f003eea8 100644 --- a/vgasrc/atiext.c +++ b/vgasrc/atiext.c @@ -338,6 +338,65 @@ static void ati_i2c_edid_rage128(void) dprintf(1, "ati: ... %s\n", valid ? "good" : "invalid"); } =20 +/**************************************************************** + * Fake ati bios tables + ****************************************************************/ + +// aty128fb and radeonfb try to gather informations from these tables, +// so add some stuff here to make the drivers happy. Specifically +// radeonfb needs the pll information, otherwise it'll crash with a +// division by zero ... +struct ati_main_table_s { + u8 pad_0[48]; + u16 pll_table; + u8 pad_50[30]; + u16 connector_table; + u8 pad_82[94]; +} PACKED; + +struct ati_pll_table_s { + u8 pad_0[8]; + u16 sclk; + u16 mclk; + u8 pad_12[2]; + u16 ref_clk; + u16 ref_div; + u32 ppll_min; + u32 ppll_max; + u8 pad_26[38]; +} PACKED; + +struct ati_connector_table_s { + u8 num_chip; + u8 num_connector; + u16 flags; + u16 next; +} PACKED; + +extern u16 _rom_header_ati_table_anchor; +static struct ati_main_table_s ati_main_table VAR16 __aligned(16); +static struct ati_pll_table_s ati_pll_table VAR16 __aligned(16) =3D { + .sclk =3D 23000, + .mclk =3D 23000, + .ref_clk =3D 2700, + .ref_div =3D 4, + .ppll_min =3D 12000, + .ppll_max =3D 35000, +}; +static struct ati_connector_table_s ati_connector_table VAR16 __aligned(16= ) =3D { + .num_chip =3D 0x10, + .num_connector =3D 1, + .flags =3D 0x3000, +}; + +static void +ati_table_setup(void) +{ + SET_VGA(ati_main_table.pll_table, (u32)&ati_pll_table); + SET_VGA(ati_main_table.connector_table, (u32)&ati_connector_table); + SET_VGA(_rom_header_ati_table_anchor, (u32)&ati_main_table); +} + /**************************************************************** * init ****************************************************************/ @@ -379,6 +438,8 @@ ati_setup(void) SET_VGA(VBE_total_memory, totalmem); SET_VGA(ati_io_addr, io_addr); =20 + ati_table_setup(); + // Validate modes struct generic_svga_mode *m =3D svga_modes; unsigned int mcount =3D GET_GLOBAL(svga_mcount); diff --git a/vgasrc/vgaentry.S b/vgasrc/vgaentry.S index f9624fce..14e557a1 100644 --- a/vgasrc/vgaentry.S +++ b/vgasrc/vgaentry.S @@ -41,7 +41,11 @@ _rom_header_signature: .asciz "IBM" =20 #if CONFIG_VGA_ATI -#include "ati-tables.S" + .org 0x48 + .global _rom_header_ati_table_anchor +_rom_header_ati_table_anchor: + .word 0 + .align 16 #endif =20 /**************************************************************** --=20 2.54.0 _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org