From owner-freebsd-bugs@FreeBSD.ORG Thu Oct 12 01:58:53 2006 Return-Path: X-Original-To: freebsd-bugs@freebsd.org Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 254B216A412 for ; Thu, 12 Oct 2006 01:58:53 +0000 (UTC) (envelope-from nplayshorn@yahoo.com) Received: from web57015.mail.re3.yahoo.com (web57015.mail.re3.yahoo.com [66.196.97.119]) by mx1.FreeBSD.org (Postfix) with SMTP id 96A3443D5C for ; Thu, 12 Oct 2006 01:58:52 +0000 (GMT) (envelope-from nplayshorn@yahoo.com) Received: (qmail 47468 invoked by uid 60001); 12 Oct 2006 01:58:49 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=oF9F+RyFaNEjL1v92C1AocjlBTG/7CKcSfXXEgGKOAu9ElZ0eaUNVGz7EErZs+cJ3QESsIRQMVvQ687WAGf0mOB43+87SmrPbsGe86BE1eEFlT55CHKUzEk/oMJb3VffEDLgF3DkEb250NQIlCMP2EitIbIdXv9GXgOs+B2k34M= ; Message-ID: <20061012015849.47465.qmail@web57015.mail.re3.yahoo.com> Received: from [67.161.102.217] by web57015.mail.re3.yahoo.com via HTTP; Wed, 11 Oct 2006 18:58:49 PDT Date: Wed, 11 Oct 2006 18:58:49 -0700 (PDT) From: "Nicholas C. Lewis" To: freebsd-bugs@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: TC1000 serial ports need enabling w/ 6.1-RELEASE X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Oct 2006 01:58:53 -0000 Does anyone know how to make this patch work with 6.1-RELEASE. Thank you in advance, Nick >Number: 65355 >Category: kern >Synopsis: TC1000 serial ports need enabling >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Apr 09 05:30:15 PDT 2004 >Closed-Date: >Last-Modified: >Originator: Milan Obuch >Release: 5.2.1-RELEASE >Organization: >Environment: FreeBSD tablet.dino.sk 5.2.1-RELEASE FreeBSD 5.2.1-RELEASE #13: Thu Apr 8 05:56:24 CEST 2004 root at tablet.dino.sk:/usr/src/sys/i386/compile/TABLET i386 >Description: Booting FreeBSD on Compaq's TC1000 TabletPC gives sio0: configured irq 4 not in bitmap of probed irqs 0 sio0: port may not be enabled sio1: configured irq 3 not in bitmap of probed irqs 0 sio1: port may not be enabled when serial ports are probed. First serial port is connected to pen digitizer. This platform uses Via Technologies VT82C686A chip, and PhoenixBIOS does not fully initialize its SuperI/O controller >How-To-Repeat: Install FreeBSD on TC1000 and boot >Fix: --- sys/dev/pci/isa_pci.c.orig Sun Aug 24 19:54:15 2003 +++ sys/dev/pci/isa_pci.c Wed Apr 7 11:07:16 2004 @@ -159,6 +159,7 @@ { struct isab_softc *sc = device_get_softc(dev); int error, rid; + u_int32_t u; /* * Attach an ISA bus. Note that we can only have one ISA bus. @@ -180,6 +181,30 @@ if (sc->elcr_res == NULL) device_printf(dev, "failed to allocate ELCR resource\n"); break; + case 0x06861106: /* VIA 82C686 */ + /* + * PhoenixBIOS used in Compaq's TabletPC TC1000 does not initialises + * chip to enable serial ports, so we handle it ourselves. + */ + +#define CONFIG_INDEX 0x3F0 +#define CONFIG_DATA 0x3F1 + + device_printf(dev, "TC1000 Serial1 port enabler\n"); + u = pci_read_config(dev,0x85,1); + pci_write_config(dev, 0x85, u | 2, 1); // enable SuperI/O configuration + + outb(CONFIG_INDEX, 0xE7); + outb(CONFIG_DATA, 0xFE); // Serial1 addr set to 0x3F8 + + outb(CONFIG_INDEX, 0xE2); + u = inb(CONFIG_DATA); + + outb(CONFIG_INDEX, 0xE2); + outb(CONFIG_DATA, u | 4); // enable Serial1 + + u = pci_read_config(dev,0x85,1); + pci_write_config(dev, 0x85, u & ~2, 1); // disable SuperI/O configuration } return(0); Maybe some #ifdef kernel option could be used here, say TC1000_SIO_ENABLE_HACK, but I did not bother with this. >Release-Note: >Audit-Trail: >Unformatted: ************************** Nicholas C. Lewis NPlaysHorn@Yahoo.com ************************** __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com