From nobody Sat Apr 27 00:43:32 2024 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 78.46.105.101 is neither permitted nor denied by domain of seabios.org) client-ip=78.46.105.101; envelope-from=seabios-bounces@seabios.org; helo=coreboot.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 78.46.105.101 is neither permitted nor denied by domain of seabios.org) smtp.mailfrom=seabios-bounces@seabios.org ARC-Seal: i=1; a=rsa-sha256; t=1584377358; cv=none; d=zohomail.com; s=zohoarc; b=VAgC2OdTyum9hb9Bt4RtQE27wq5p7yxfzPgl1pN3rCQ6F2UiVq8P0zUZR28y/9i81vcZxJ3vKpKwixcjTbvAK9Ar23BYMf4o0gHETcAJ4N8bZqLl/GVjIduQY2yFJQqfLiRP21OhLzLB0GlM8VRwQ8bXMt7Hg8L4lnmMw21nL7o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584377358; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Subject:To; bh=54oZ70KnV1Te0uubi282Q7UHL6Yog8DvGYyWVyLX1L8=; b=X4F0VXk0o2NUXIKZeGDExBFAp690KFfamm7Ske1D6ZyQhxDeh4Kk2r+PcRaF0cvM/sip29X8HK/SDYn+xRWtbHu0NLaLOuiLrUsgdxgzk8x1SYjUc+PJUivv7sJ1FSFy2zJhlT5HLKyxQB6JRHYPAcWLDZQtQdGJ3ecydIlkiiI= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=none (zohomail.com: 78.46.105.101 is neither permitted nor denied by domain of seabios.org) smtp.mailfrom=seabios-bounces@seabios.org Return-Path: Received: from coreboot.org (coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 1584377358710418.13981718094203; Mon, 16 Mar 2020 09:49:18 -0700 (PDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id 1E63CB01A98; Mon, 16 Mar 2020 16:49:14 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTP id D0162B01A7F for ; Mon, 16 Mar 2020 16:48:55 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: pmenzel) by mx.molgen.mpg.de (Postfix) with ESMTPSA id 71DAF20645A18; Mon, 16 Mar 2020 17:48:55 +0100 (CET) To: seabios@seabios.org From: Paul Menzel Message-ID: <460fe013-4fbd-aaba-cb4f-c61368534389@molgen.mpg.de> Date: Mon, 16 Mar 2020 17:48:55 +0100 MIME-Version: 1.0 Content-Language: en-US Message-ID-Hash: ECHOSWIENM4TXHOPEQVM7TSIPIMWODZI X-Message-ID-Hash: ECHOSWIENM4TXHOPEQVM7TSIPIMWODZI X-MailFrom: pmenzel@molgen.mpg.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-seabios.seabios.org-0; header-match-seabios.seabios.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: Rob Barnes X-Mailman-Version: 3.3.1 Precedence: list Subject: [SeaBIOS] [PATCH] optionroms: Use revision when finding Option ROM List-Id: SeaBIOS mailing list Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: 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 Content-Type: text/plain; charset="utf-8"; format="flowed" From: Rob Barnes Date: Wed, 22 Jan 2020 14:09:21 -0700 Some devices have the same vendor and device ID but need different Option ROM files. Change the look-up to include the revision, then fallback to looking up without the revision. BUG=3Db:148125384 TEST=3DManual, boot trembyle and confirm SeaBIOS console is displayed. Change-Id: I4c969b08727077fcb5ca1198e61cc6711c675019 Reviewed-on:=20 https://chromium-review.googlesource.com/c/chromiumos/third_party/seabios/+= /2015963 Reviewed-by: Raul E Rangel Tested-by: Rob Barnes Commit-Queue: Rob Barnes Auto-Submit: Rob Barnes --- src/optionroms.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/optionroms.c b/src/optionroms.c index e906ab9..c3aa9b0 100644 --- a/src/optionroms.c +++ b/src/optionroms.c @@ -329,10 +329,17 @@ init_pcirom(struct pci_device *pci, int isvga, u64=20 *sources) dprintf(4, "Attempting to init PCI bdf %pP (vd %04x:%04x)\n" , pci, pci->vendor, pci->device); - char fname[17]; - snprintf(fname, sizeof(fname), "pci%04x,%04x.rom" - , pci->vendor, pci->device); + char fname[20]; + // Try to find rom file with revision included + snprintf(fname, sizeof(fname), "pci%04x,%04x,%02x.rom" + , pci->vendor, pci->device, pci->revision); struct romfile_s *file =3D romfile_find(fname); + if (!file) { + // Fallback to finding rom file without revision + snprintf(fname, sizeof(fname), "pci%04x,%04x.rom" + , pci->vendor, pci->device); + file =3D romfile_find(fname); + } struct rom_header *rom =3D NULL; if (file) rom =3D deploy_romfile(file); --=20 2.25.1 _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org