From owner-freebsd-current@FreeBSD.ORG Thu Feb 12 14:36:28 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B778106570C; Thu, 12 Feb 2009 14:36:28 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id BCB0B8FC21; Thu, 12 Feb 2009 14:36:27 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (pool-98-109-39-197.nwrknj.fios.verizon.net [98.109.39.197]) by cyrus.watson.org (Postfix) with ESMTPSA id 4D84C46B3C; Thu, 12 Feb 2009 09:36:27 -0500 (EST) Received: from localhost (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id n1CEZWYO034674; Thu, 12 Feb 2009 09:36:21 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Roman Divacky Date: Thu, 12 Feb 2009 09:23:27 -0500 User-Agent: KMail/1.9.7 References: <20081120171325.GA53026@freebsd.org> <200812041745.14587.jhb@freebsd.org> <20081211221628.GA12494@freebsd.org> In-Reply-To: <20081211221628.GA12494@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200902120923.28105.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Thu, 12 Feb 2009 09:36:21 -0500 (EST) X-Virus-Scanned: ClamAV 0.94.2/8983/Thu Feb 12 07:48:01 2009 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: freebsd-current@freebsd.org Subject: Re: atrtc0: Warnings about mappings of I/O and interrupt X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2009 14:36:29 -0000 On Thursday 11 December 2008 5:16:28 pm Roman Divacky wrote: > On Thu, Dec 04, 2008 at 05:45:14PM -0500, John Baldwin wrote: > > On Thursday 04 December 2008 05:04:38 pm Roman Divacky wrote: > > > On Thu, Dec 04, 2008 at 02:24:13PM -0500, John Baldwin wrote: > > > > On Thursday 20 November 2008 12:13:25 pm Roman Divacky wrote: > > > > > hi > > > > > > > > > > I upgraded from roughly 10 days old -CURRENT to this: > > > > > > > > > > FreeBSD witten 8.0-CURRENT FreeBSD 8.0-CURRENT #55: Wed Nov 19 23:23:49 > > CET > > > > 2008 > > > > > root@witten:/usr/obj/usr/src/sys/MYKERNEL i386 > > > > > > > > > > and I am getting this at boot: > > > > > > > > > > atrtc0: at port 0x70 irq 8 on isa0 > > > > > atrtc0: Warning: Couldn't map I/O. > > > > > atrtc0: Warning: Couldn't map Interrupt. > > > > > > > > > > the booting itself works fine and I dont see any odd effects. > > > > > > > > The driver is just a stub anyway. Do you have any atrtc0 hints, and can > > you > > > > grab the output for the 'atrtc0' device from 'devinfo -r'? > > > > > > witten ~# grep atrtc /boot/device.hints > > > hint.atrtc.0.at="isa" > > > hint.atrtc.0.port="0x70" > > > hint.atrtc.0.irq="8" > > > > > > (but that's the default I believe) > > > > > > devinfo -r shows "empty" atrtc0 but: > > > > > > atrtc1 > > > Interrupt request lines: > > > 8 > > > I/O ports: > > > 0x70-0x71 > > > > > > any more info I can provide? > > > > Hmmmm, that should have worked fine in that atrtc1 should have taken over > > the 'atrtc0' hints. If you don't mind, can you add some debugging printfs to > > acpi_hint_device_unit() (maybe only do them if the 'name' parameter > > is "atrtc" to avoid clutter). > > with the attached patch I am getting the attached dmesg. > > do you want me to do some other thing? Can you get the dmesg output from this patch? --- //depot/user/jhb/acpipci/dev/acpica/acpi.c +++ /home/jhb/work/p4/acpipci/dev/acpica/acpi.c @@ -974,6 +974,9 @@ const char *s; long value; int line, matches, unit; + int debug; + + debug = (strcmp(name, "atrtc") == 0); /* * Iterate over all the hints for the devices with the specified @@ -984,11 +987,18 @@ if (resource_find_dev(&line, name, &unit, "at", NULL) != 0) break; + if (debug) + printf("Trying %s%d ...", name, unit); + /* Must have an "at" for acpi or isa. */ resource_string_value(name, unit, "at", &s); if (!(strcmp(s, "acpi0") == 0 || strcmp(s, "acpi") == 0 || strcmp(s, "isa0") == 0 || strcmp(s, "isa") == 0)) + { + if (debug) + printf(" bad bus %s\n", s); continue; + } /* * Check for matching resources. We must have at least one, @@ -1000,9 +1010,17 @@ matches = 0; if (resource_long_value(name, unit, "port", &value) == 0) { if (acpi_match_resource_hint(child, SYS_RES_IOPORT, value)) + { matches++; + if (debug) + printf(" port ok"); + } else + { + if (debug) + printf(" bad port\n"); continue; + } } if (resource_long_value(name, unit, "maddr", &value) == 0) { if (acpi_match_resource_hint(child, SYS_RES_MEMORY, value)) @@ -1012,9 +1030,17 @@ } if (resource_long_value(name, unit, "irq", &value) == 0) { if (acpi_match_resource_hint(child, SYS_RES_IRQ, value)) + { + if (debug) + printf(" irq ok"); matches++; + } else + { + if (debug) + printf(" bad irq\n"); continue; + } } if (resource_long_value(name, unit, "drq", &value) == 0) { if (acpi_match_resource_hint(child, SYS_RES_DRQ, value)) @@ -1023,6 +1049,8 @@ continue; } + if (debug) + printf(" matches %d\n", matches); if (matches > 0) { /* We have a winner! */ *unitp = unit; -- John Baldwin