From owner-freebsd-current@FreeBSD.ORG Mon Jan 14 09:26:39 2008 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F016216A4EA for ; Mon, 14 Jan 2008 09:26:39 +0000 (UTC) (envelope-from mozolevsky@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.169]) by mx1.freebsd.org (Postfix) with ESMTP id 83A2413C45D for ; Mon, 14 Jan 2008 09:26:34 +0000 (UTC) (envelope-from mozolevsky@gmail.com) Received: by ug-out-1314.google.com with SMTP id y2so1222843uge.37 for ; Mon, 14 Jan 2008 01:26:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=onfF0Tx0LgC14+gihisZTvEndLYjLO/W3YZmlyIvbjs=; b=g/0wBwXjOIRG5iTNV5hhRD1fDGi5S36EJebjSTWcWmShbE7yBQx3bgPexjdZffrHJfiU+dgLU4cTqoNXn+7eFDHBasgKy+VC7X8CXosbvENAVu+Csil5CzjHApvDjelLTrv4dneD51zuZsl0Mwf4a0ZJaNoFm5lyhXxWbSYCQlQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=XQDkmhm2XLBFO+z6ouPOn2yogxB8MVjDQ7TLTPP1fIIEdQJ/7X2boIOipwqUDZ9mL4rxLkoQ25pL5vVg4z0NQi/HjBx0+q9s+vS26PxvhxgdcOlswODbMdn82/u+Xq9wJyRdA5LnbEbkSiNJP6nl4M1DO1+u2xkxeoDTthbz74A= Received: by 10.66.243.4 with SMTP id q4mr3759202ugh.5.1200302792886; Mon, 14 Jan 2008 01:26:32 -0800 (PST) Received: by 10.66.248.11 with HTTP; Mon, 14 Jan 2008 01:26:32 -0800 (PST) Message-ID: Date: Mon, 14 Jan 2008 09:26:32 +0000 From: "Igor Mozolevsky" Sender: mozolevsky@gmail.com To: "Nathan Lay" In-Reply-To: <478AE741.1000105@comcast.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1200197787.67286.13.camel@shumai.marcuscom.com> <20080113182457.GN929@server.vk2pj.dyndns.org> <200801141254.20400.doconnor@gsoft.com.au> <478AE741.1000105@comcast.net> X-Google-Sender-Auth: 8c907e795dd6aaf8 Cc: current , freebsd-current@freebsd.org, Joe Marcus Clarke , Peter Jeremy , Kostik Belousov Subject: Re: RFC: Adding a hw.features[2] sysctl 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: Mon, 14 Jan 2008 09:26:40 -0000 On 14/01/2008, Nathan Lay wrote: > I have to agree with Daniel here. ioctl is probably inappropriate. > sysctl is already intended for gathering or setting system information > by both programs and/or people. cat'ing /dev/cpuinfo sounds reminiscent > to Linux /proc. > > sysctl() could fill a cpu features bitmask for programs. > sysctl dev.cpu.features (or something like that) could output those > features in human readable format. So how would you MIB these: " CPU: Dual Core AMD Opteron(tm) Processor 280 (2411.12-MHz K8-class CPU) Origin = "AuthenticAMD" Id = 0x20f12 Stepping = 2 Features=0x178bfbff Features2=0x1 AMD Features=0xe2500800 AMD Features2=0x3 Cores per package: 2 " ? Would you need four separate MIBs? Have four separate bitmasks in one MIB, what order in? Is there XXX Features3, what would happen then? Igor