From ssedov@mbsd.msk.ru  Wed Aug 23 22:33:40 2006
Return-Path: <ssedov@mbsd.msk.ru>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 7692316A4E1
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 23 Aug 2006 22:33:40 +0000 (UTC)
	(envelope-from ssedov@mbsd.msk.ru)
Received: from com1.ht-systems.ru (com1.ht-systems.ru [83.97.104.204])
	by mx1.FreeBSD.org (Postfix) with ESMTP id B79E143DAF
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 23 Aug 2006 22:33:39 +0000 (GMT)
	(envelope-from ssedov@mbsd.msk.ru)
Received: from [213.87.86.63] (helo=fonon.realnet)
	by com1.ht-systems.ru with esmtpa (Exim 4.62)
	(envelope-from <ssedov@mbsd.msk.ru>)
	id 1GG1Hy-0000Pt-Te
	for FreeBSD-gnats-submit@freebsd.org; Thu, 24 Aug 2006 02:33:37 +0400
Received: by fonon.realnet (Postfix, from userid 1001)
	id 2B6D411F75; Thu, 24 Aug 2006 02:33:12 +0600 (YEKST)
Message-Id: <20060823203312.2B6D411F75@fonon.realnet>
Date: Thu, 24 Aug 2006 02:33:12 +0600 (YEKST)
From: Stanislav Sedov <ssedov@mbsd.msk.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [NEW PORT] sysutils/devcpu: Kernel module that provides access to i386 MSRs and cpuid info
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         102454
>Category:       ports
>Synopsis:       [NEW PORT] sysutils/devcpu: Kernel module that provides access to i386 MSRs and cpuid info
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    stas
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 23 22:40:21 GMT 2006
>Closed-Date:    Sun Oct 08 17:11:50 GMT 2006
>Last-Modified:  Sun Oct 08 17:11:50 GMT 2006
>Originator:     Stanislav Sedov
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
MBSD labs, Inc.
>Environment:
System: FreeBSD fonon.realnet 7.0-CURRENT FreeBSD 7.0-CURRENT #1: Wed Aug  2 21:44:37 MSD
>Description:
This kernel module provides access to i386/amd64 CPUs MSR (Model Specific
Register) registers and cpuid info through /dev/cpu%d devices, where %d
corresponds to cpu number.

It can be used with x86info to retrive information available from MSR registers.

NOTE: amd64 was not tested yet, do it, please, and report on success/failure.

Author:	Stanislav Sedov <ssedov@mbsd.msk.ru>
WWW:	http://mbsd.msk.ru/stas/devcpu.html

>How-To-Repeat:
>Fix:

--- devcpu-0.4.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	devcpu
#	devcpu/pkg-descr
#	devcpu/Makefile
#	devcpu/distinfo
#	devcpu/pkg-message
#
echo c - devcpu
mkdir -p devcpu > /dev/null 2>&1
echo x - devcpu/pkg-descr
sed 's/^X//' >devcpu/pkg-descr << 'END-of-devcpu/pkg-descr'
XThis kernel module provides access to i386/amd64 CPUs MSR (Model Specific
XRegister) registers and cpuid info through /dev/cpu%d devices, where %d
Xcorresponds to cpu number.
X
XIt can be used with x86info to retrive information available from MSR registers.
X
XNOTE: amd64 was not tested yet, do it, please, and report on success/failure.
X
XAuthor:	Stanislav Sedov <ssedov@mbsd.msk.ru>
XWWW:	http://mbsd.msk.ru/stas/devcpu.html
END-of-devcpu/pkg-descr
echo x - devcpu/Makefile
sed 's/^X//' >devcpu/Makefile << 'END-of-devcpu/Makefile'
X# New ports collection makefile for:	devcpu
X# Date created:		2006-08-16
X# Whom:			Stanislav Sedov <ssedov@mbsd.msk.ru>
X#
X# $MBSDlabs$
X# $FreeBSD$
X#
X
XPORTNAME=	devcpu
XPORTVERSION=	0.4
XCATEGORIES=	sysutils
XMASTER_SITES=	http://mbsd.msk.ru/dist/
X
XMAINTAINER=	ssedov@mbsd.msk.ru
XCOMMENT=	Kernel module that provides access to i386 MSRs and cpuid info
X
XUSE_BZIP2=	yes
X
XONLY_FOR_ARCHS=	i386 amd64
XNO_PACKAGE=	depends on kernel
X
XPLIST_FILES=	include/cpu.h \
X		"@cwd /" \
X		${KMODDIR:C,^/,,}/cpu.ko
X
X.include <bsd.port.pre.mk>
X
X.if ${OSVERSION} < 601000
XIGNORE=		not supported
X.endif
X
XMAKE_ENV+=	KMODDIR="${KMODDIR}"
X
X.if !exists(${SRC_BASE}/sys/Makefile)
XIGNORE=		requires kernel source to be installed
X.endif
X
Xpost-install:
X	${INSTALL_DATA} ${WRKSRC}/cpu.h ${PREFIX}/include/
X	@${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.post.mk>
END-of-devcpu/Makefile
echo x - devcpu/distinfo
sed 's/^X//' >devcpu/distinfo << 'END-of-devcpu/distinfo'
XMD5 (devcpu-0.4.tar.bz2) = a9cbb4bd4fcc8183d559699e756952dd
XSHA256 (devcpu-0.4.tar.bz2) = d0761d34b883b6ef241170865b499f5f20324427747b199be5e236b2bf2e5747
XSIZE (devcpu-0.4.tar.bz2) = 4873
END-of-devcpu/distinfo
echo x - devcpu/pkg-message
sed 's/^X//' >devcpu/pkg-message << 'END-of-devcpu/pkg-message'
X=============================================================================
X
XCPU kernel module was installed.
X
XTo load it, issue
X
X% kldload cpu
X
XThen you can access MSR registers or cpuid info via /dev/cpu%d or using
X3d-party programs, e.g. x86info.
X
XNOTE! DANGER! This module was not yet propely tested, and amd64 support
Xwas not tested at all. It's currently for development/testing only.
XDon't use on productions systems!
X
XPlease, report any problems to maintainer. Thanks!
X
X=============================================================================
END-of-devcpu/pkg-message
exit
--- devcpu-0.4.shar ends here ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->stas 
Responsible-Changed-By: stas 
Responsible-Changed-When: Wed Sep 20 13:01:49 UTC 2006 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=102454 
State-Changed-From-To: open->closed 
State-Changed-By: stas 
State-Changed-When: Sun Oct 8 17:11:48 UTC 2006 
State-Changed-Why:  
Will resubmit later. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=102454 
>Unformatted:
