From nobody Wed Sep 23 05:44:06 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 1785250769650394.70266874966626; Tue, 28 Jul 2026 07:59:29 -0700 (PDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id 84FA054E480; Tue, 28 Jul 2026 14:59:23 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) (fout-a2-smtp.messagingengine.com [103.168.172.145]) by coreboot.org (Postfix) with ESMTP id 7BE1154E475 for ; Tue, 28 Jul 2026 14:54:46 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by mailfout.phl.internal (Postfix) with ESMTP id 50BD6EC01F1; Tue, 28 Jul 2026 10:54:45 -0400 (EDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by phl-compute-05.internal (MEProxy); Tue, 28 Jul 2026 10:54:45 -0400 Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) 28 Jul 2026 10:54:44 -0400 (EDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by chomposaur (OpenSMTPD) with ESMTPA id 76fde7ce; Tue, 28 Jul 2026 14:54:42 +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=1785250485; x= 1785336885; bh=sRb0jhPUrxyLiX69o0NBqM2YrSNXPqPkmOMz0EFl0XQ=; b=V GT2kUu2VXrnE0JnH2z+TKDagCUYS7t5tpmoCPcwEnkjzW1L7Q9BUJEKzRA/4/34g zXj4VDjsqWXHqSD+UqzlJsi3PuWdV058uv+ZGVBkkn+n94qdJZ0xY6Pp6eOYcFp/ V9n0Y2EkApB+iIV4OHuJgIOrs8hBiA6C3+GGzuTJHOl5ihx1FRxPXZpWHv9Ty+ss eI92rwH8oBinihQ2l87ttZVVCokrd0Pqj1vmFJ1JqCx0Bq1QaD7w7w1PSFkMCkDO JAgE5p9yesdH1OZQKDpdfWKsTrXeV+JigcVExiiZ99s5ghVMANNDqhFk0nZfBXcM WmTJp74ODsk52LyTYYBuQ== 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=1785250485; x=1785336885; bh=s Rb0jhPUrxyLiX69o0NBqM2YrSNXPqPkmOMz0EFl0XQ=; b=PiBd1kpx3Jh9XLTCg N3WDMMWuYqo00/DeCCWL6yjdqkjWBoX6zhcT9mRTV/qmfW7cHoBpQVUZP4PC0V+v 993oP/58hkNMeh0gaiqkt5Itp2HlDfdBwIXVqY5K8bdpvfuVlt6IwcPoiiFynuAy RJMll45wkzMpDcp3ad5A/WaX7qX0GBgsfz3XF3A02ojbPypveEfVMSeeU5XgfeTd rmF7PFeLZVR89gLxJKSnV1ywmgtXaokj1gbKEqbs5xxyedk7GZaaPKLb2LWsHWli ghzoDGHa46MtouCsVBxjWg8zNw36yUtv3/y1++QVmGNbPbuY8Nbvfp2wbRjTE6tl 5sqmA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTGVhrHEa+0mVmChf9EAIP4SrWd0g4rJLx+2Wgga6vPrkCFDuSzdX5Ef6+8aOupRvj Fri5T+JYzBUDe9yV9wz9uWALXVdAMXwjdRTOU20lmBhoKo3hVaUdUmeXMLlSRpo8nq49UD ykDJyKT7rQwihR0Hz2kkrOgxcSMwpE4K5apxdd4RElUnAL/hJTf76YHXTn3vPsuHM/3jWU ie/Z169vM65qzrqgTBWVHrl9h5pyBdV1ex010KhPDpMZ580LEqqk21tV+Xa1ilfR4YhK0O hEd+4cw94mxHk1LVr2cjjh4HzE3gRVK4u3yZeMmi3eOSTTte+3VW1tsvhjxVHlm6CBQbrT nvB4U6XjKNTKPFtmybu2VX2jqkXxrY1etHBmn7n4rNxIVrg1nI7JX+8V2e+wI8gRSQ/4gP +dg0zVmdgbNKRyc4CAWXqqUbLsFE7bvmcViLfjpPHrSfaWcfQwVOUWudfA6Wm/4GKsW9+5 5cpvy/OUtadCKC9kNPRNqI0mwVQ6BsxDXJPpmFe7U0TIZDpae+vgPRpEpLCz0v9JL54TT7 H5MSWfSQO0Lt0Wlbo46T+IKCUCi/RNIRp4KpLXYLh3KSXt0nZWOi8Xtkwel4sT0Vj5mJlE uxnDBTOXP1Of5DPvA86jKHLNzytjo3VpdGf3pKbk3YdCmOo3+tvreVKl2bag X-ME-Proxy: Feedback-ID: ib26944c1:Fastmail From: Chad Jablonski To: seabios@seabios.org Date: Tue, 28 Jul 2026 10:54:35 -0400 Message-ID: <20260728145436.1613730-2-chad@jablonski.xyz> In-Reply-To: <20260728145436.1613730-1-chad@jablonski.xyz> References: <20260728145436.1613730-1-chad@jablonski.xyz> MIME-Version: 1.0 X-Spam-Level: *** Message-ID-Hash: A4T7STNGCBSTW6AC5ZM3J4JGYCVOWWVO X-Message-ID-Hash: A4T7STNGCBSTW6AC5ZM3J4JGYCVOWWVO 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 v2 1/2] 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: 1785250770668158500 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