ports/102454: [NEW PORT] sysutils/devcpu: Kernel module that provides access to i386 MSRs and cpuid info
Stanislav Sedov
ssedov at mbsd.msk.ru
Wed Aug 23 22:41:51 UTC 2006
>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: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Wed Aug 23 22:40:21 GMT 2006
>Closed-Date:
>Last-Modified:
>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 at 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 at 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 at 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 at 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:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list