From nobody Sat Feb 7 06:10:10 2026 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=1584376808; cv=none; d=zohomail.com; s=zohoarc; b=WUPaeIJTgZO9ic7NXdlnQH2zKkr4OhQWnecjnteaRCCSbzPGE03Z/2LH5FoJR1bNQqX01Xe4+//3ETLoSkjxmJaI4QeXObck55v3aFyU1lbOQjYEYZN5x099TCCUOsf/3OOPmLt4s7bCbmxJcJyewYg46wUTB+ln1FErNiI1w8E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584376808; 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=Y5O7DC93p2ockCvMh5kGeDWuxhNfqhrGr6KHs6RqkuU=; b=E/dCVoUjgVFi9P1/MunnNz1TcY5PIwo7VitS9CP6WTDFEeTF1eviknuowlxiBLKMUnrmc8vH6ONBqXol2Ogryaqz7sMamJ4jqmrgBNZqYAsSyjkZ2QoFbCLV7JBcEwHErwTtQ02swqKXgCGU38CrakwJ+6fDaGh8ZPk6eZPoET4= 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 1584376808830103.28379522808325; Mon, 16 Mar 2020 09:40:08 -0700 (PDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id 64B07B01A4D; Mon, 16 Mar 2020 16:40:05 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTP id 87E4AB00160 for ; Mon, 16 Mar 2020 16:39:46 +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 2B3C520645A18; Mon, 16 Mar 2020 17:39:46 +0100 (CET) To: seabios@seabios.org From: Paul Menzel Message-ID: <4c6e7aa9-f37f-f533-72d1-698facb8280a@molgen.mpg.de> Date: Mon, 16 Mar 2020 17:39:45 +0100 MIME-Version: 1.0 Content-Language: en-US Message-ID-Hash: XMVFAU7HFMA4KLNTTWB3SR7ELNO7AVTE X-Message-ID-Hash: XMVFAU7HFMA4KLNTTWB3SR7ELNO7AVTE 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: "Ronald G. Minnich" X-Mailman-Version: 3.3.1 Precedence: list Subject: [SeaBIOS] [PATCH] Fix serial port detection on systems with Blizzard Chrome EC List-Id: SeaBIOS mailing list Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="utf-8"; format="flowed" 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 From: "Ronald G. Minnich" Date: Thu, 24 May 2012 11:27:26 -0700 Serial port detection in SeaBIOS tests for bit 2 in the IER. That bit is never set, and SeaBIOS mistakenly reports 0 serial ports. As it happens, just testing for IER to be not-all-ones is good enough. This happens on all systems where the AP serial port uses the Blizzard EC (Ivy Bridge, Haswell). Does not affect Bay Trail, since we use the native Intel serial port. It=E2=80=99s a hardware limitation of which registers the Blizzard COMx port implementation provides. Nothing we can do in EC software. BUG=3Dchrome-os-partner:9946 TEST=3Dbuild SeaBIOS with serial port enabled, and note that SeaBIOS says init serial Found 1 serial ports BRANCH=3Dnone Signed-off-by: Ronald G. Minnich Change-Id: I6bee73788ca6533091d85e54d05b37a564f910a7 Reviewed-on: https://chromium-review.googlesource.com/184421 Reviewed-by: Stefan Reinauer Commit-Queue: Stefan Reinauer Tested-by: Stefan Reinauer Reviewed-on: https://chromium-review.googlesource.com/227500 Signed-off-by: Paul Menzel --- src/serial.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/serial.c b/src/serial.c index 88349c8..e67ac77 100644 --- a/src/serial.c +++ b/src/serial.c @@ -26,10 +26,12 @@ detect_serial(u16 port, u8 timeout, u8 count) return 0; outb(0x02, port+SEROFF_IER); u8 ier =3D inb(port+SEROFF_IER); - if (ier !=3D 0x02) + dprintf(8, "IER is 0x%02x (Expected 0x02 or 0x00)\n", ier); + if (ier !=3D 0x02 && ier !=3D 0) return 0; u8 iir =3D inb(port+SEROFF_IIR); - if ((iir & 0x3f) !=3D 0x02) + dprintf(8, "IIR is 0x%02x (Expected !=3D 0x3f)\n", iir & 0x3f); + if ((iir & 0x3f) =3D=3D 0x3f) return 0; outb(0x00, port+SEROFF_IER); --=20 2.25.1 _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org