From owner-freebsd-arch@FreeBSD.ORG Fri Feb 10 11:42:55 2012 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 8B523106566C for ; Fri, 10 Feb 2012 11:42:55 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) by mx1.freebsd.org (Postfix) with ESMTP id 4FDD18FC12 for ; Fri, 10 Feb 2012 11:42:54 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.4/8.14.4) with ESMTP id q1AB2i6Q002411; Fri, 10 Feb 2012 05:02:44 -0600 (CST) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.4/8.14.4/Submit) id q1AB2h2u002410; Fri, 10 Feb 2012 05:02:43 -0600 (CST) (envelope-from brooks) Date: Fri, 10 Feb 2012 05:02:43 -0600 From: Brooks Davis To: Aleksandr Rybalko Message-ID: <20120210110243.GA2012@lor.one-eyed-alien.net> References: <20120131213857.86c81626.ray@ddteam.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xHFwDpU9dbj6ez1V" Content-Disposition: inline In-Reply-To: <20120131213857.86c81626.ray@ddteam.net> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-arch@freebsd.org Subject: Re: dynamic attach of hinted devices 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, 10 Feb 2012 11:42:55 -0000 --xHFwDpU9dbj6ez1V Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 31, 2012 at 09:38:57PM +0200, Aleksandr Rybalko wrote: > Hi FreeBSD hackers, >=20 > at first I want to say this: :) > WARNING: FOLLOWING DEVCTL PATCH MAY EASILY PANIC YOUR SYSTEM, PLEASE > DO NOT TRY IT ON PRODUCTION SERVERS AND TRY IT WITH FILESYSTEMS MOUNTED > AS READONLY :))))) >=20 > So I introduce two patches first one [1] used to migrate from > static_hints or hints in the static_kenv to dynamic hints. >=20 > sysctl kern.hintmode=3D2 will copy hints from static hints or from static > kenv and put it into dynamic kenv. Those will allow to manipulate hints > values and attach hinted devices with devctl tool. >=20 > Second [2] allow attach/detach devices with userland tool devctl. >=20 > devctl tool allow add and initialize new devices which is not able to > be autoenumerating, such a hinted devices. >=20 > Both designed to have ability update EEPROM items in runtime, since > some device can't work in mode when it accessible like a EEPROM chip. >=20 > Example: > # sysctl kern.hintmode=3D2 > # kenv hint.mx25l.0.at=3D"spibus0" > # kenv hint.mx25l.0.cs=3D0 > # kenv hint.mx25l.0.chipname=3D"at25128" > # devctl hinted spibus 0 mx25l 0 > mx25l0: at cs 0 mode 0 on spibus0 > mx25l0: at25128, sector 64 bytes, 256 sectors > GEOM: new disk flash/spi0 >=20 > Someone may found it also useful for testing device attach/detach code > (memory leaks, resource allocation, etc). >=20 > So, say me please your opinion. I skimmed over the patch and the concept looks good to me. I'm probably not the right person to review this proposal in detail, but perhaps John Baldwin (cc'd) could do it or suggest someone. -- Brooks --xHFwDpU9dbj6ez1V Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iD8DBQFPNPlSXY6L6fI4GtQRAvOlAJ9RPlUxogB3GHyiQaOSfxocY8flBQCglN3k e7C3GpmwOACndMYqUW5O8Cg= =IsAC -----END PGP SIGNATURE----- --xHFwDpU9dbj6ez1V--