From owner-freebsd-arch@FreeBSD.ORG Fri Feb 6 16:56:03 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 768D5106566C for ; Fri, 6 Feb 2009 16:56:03 +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 46E9A8FC18 for ; Fri, 6 Feb 2009 16:56:03 +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 E282B46B37; Fri, 6 Feb 2009 11:56:02 -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 n16GttZR078789; Fri, 6 Feb 2009 11:55:55 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-arch@freebsd.org Date: Fri, 6 Feb 2009 11:55:48 -0500 User-Agent: KMail/1.9.7 References: <200901260947.32870.jhb@freebsd.org> <498C55BB.3030606@icyb.net.ua> <200902061143.10088.jhb@freebsd.org> In-Reply-To: <200902061143.10088.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200902061155.48705.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]); Fri, 06 Feb 2009 11:55:55 -0500 (EST) X-Virus-Scanned: ClamAV 0.94.2/8961/Fri Feb 6 08:29:06 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: Andriy Gapon Subject: Re: Trimming the default /boot/device.hints X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Feb 2009 16:56:03 -0000 On Friday 06 February 2009 11:43:09 am John Baldwin wrote: > On Friday 06 February 2009 10:22:35 am Andriy Gapon wrote: > > on 06/02/2009 16:37 John Baldwin said the following: > > > > > > Yes, it only needs the hint for it to be a console device. > > > > > > > I am slightly confused as to how that hint works then, it's not like a > > standard isa hint it seems. > > Can it somehow be built-in (into the code)? > > Specifically, look at sc_cnprobe() in sys/dev/syscons/syscons.c. It calls a > sc_cons_get_priority() routine that on x86 maps lives in > sys/isa/syscons_isa.c. This checks for a syscons hint. Changing it to > always assume a unit 0 would probably allow this to work. Something like this (untested): --- //depot/user/jhb/acpipci/isa/syscons_isa.c +++ /home/jhb/work/p4/acpipci/isa/syscons_isa.c @@ -238,8 +238,10 @@ *flags = f; } } - if (*unit < 0) - return CN_DEAD; + if (*unit < 0) { + *unit = 0; + *flags = 0; + } #if 0 return ((*flags & SC_KERNEL_CONSOLE) ? CN_INTERNAL : CN_NORMAL); #endif -- John Baldwin