head	1.9;
access;
symbols
	netbsd-11-0-RC4:1.9
	netbsd-11-0-RC3:1.9
	netbsd-11-0-RC2:1.9
	netbsd-11-0-RC1:1.9
	perseant-exfatfs-base-20250801:1.9
	netbsd-11:1.9.0.10
	netbsd-11-base:1.9
	netbsd-10-1-RELEASE:1.9
	perseant-exfatfs-base-20240630:1.9
	perseant-exfatfs:1.9.0.8
	perseant-exfatfs-base:1.9
	netbsd-8-3-RELEASE:1.8.8.1
	netbsd-9-4-RELEASE:1.8.18.1
	netbsd-10-0-RELEASE:1.9
	netbsd-10-0-RC6:1.9
	netbsd-10-0-RC5:1.9
	netbsd-10-0-RC4:1.9
	netbsd-10-0-RC3:1.9
	netbsd-10-0-RC2:1.9
	netbsd-10-0-RC1:1.9
	netbsd-10:1.9.0.6
	netbsd-10-base:1.9
	netbsd-9-3-RELEASE:1.8.18.1
	cjep_sun2x-base1:1.9
	cjep_sun2x:1.9.0.4
	cjep_sun2x-base:1.9
	cjep_staticlib_x-base1:1.9
	netbsd-9-2-RELEASE:1.8.18.1
	cjep_staticlib_x:1.9.0.2
	cjep_staticlib_x-base:1.9
	netbsd-9-1-RELEASE:1.8.18.1
	phil-wifi-20200421:1.9
	phil-wifi-20200411:1.8
	is-mlppp:1.8.0.20
	is-mlppp-base:1.8
	phil-wifi-20200406:1.8
	netbsd-8-2-RELEASE:1.8
	netbsd-9-0-RELEASE:1.8
	netbsd-9-0-RC2:1.8
	netbsd-9-0-RC1:1.8
	phil-wifi-20191119:1.8
	netbsd-9:1.8.0.18
	netbsd-9-base:1.8
	phil-wifi-20190609:1.8
	netbsd-8-1-RELEASE:1.8
	netbsd-8-1-RC1:1.8
	pgoyette-compat-merge-20190127:1.8
	pgoyette-compat-20190127:1.8
	pgoyette-compat-20190118:1.8
	pgoyette-compat-1226:1.8
	pgoyette-compat-1126:1.8
	pgoyette-compat-1020:1.8
	pgoyette-compat-0930:1.8
	pgoyette-compat-0906:1.8
	netbsd-7-2-RELEASE:1.7
	pgoyette-compat-0728:1.8
	netbsd-8-0-RELEASE:1.8
	phil-wifi:1.8.0.16
	phil-wifi-base:1.8
	pgoyette-compat-0625:1.8
	netbsd-8-0-RC2:1.8
	pgoyette-compat-0521:1.8
	pgoyette-compat-0502:1.8
	pgoyette-compat-0422:1.8
	netbsd-8-0-RC1:1.8
	pgoyette-compat-0415:1.8
	pgoyette-compat-0407:1.8
	pgoyette-compat-0330:1.8
	pgoyette-compat-0322:1.8
	pgoyette-compat-0315:1.8
	netbsd-7-1-2-RELEASE:1.7
	pgoyette-compat:1.8.0.14
	pgoyette-compat-base:1.8
	netbsd-7-1-1-RELEASE:1.7
	matt-nb8-mediatek:1.8.0.12
	matt-nb8-mediatek-base:1.8
	perseant-stdc-iso10646:1.8.0.10
	perseant-stdc-iso10646-base:1.8
	netbsd-8:1.8.0.8
	netbsd-8-base:1.8
	prg-localcount2-base3:1.8
	prg-localcount2-base2:1.8
	prg-localcount2-base1:1.8
	prg-localcount2:1.8.0.6
	prg-localcount2-base:1.8
	pgoyette-localcount-20170426:1.8
	bouyer-socketcan-base1:1.8
	pgoyette-localcount-20170320:1.8
	netbsd-7-1:1.7.0.10
	netbsd-7-1-RELEASE:1.7
	netbsd-7-1-RC2:1.7
	netbsd-7-nhusb-base-20170116:1.7
	bouyer-socketcan:1.8.0.4
	bouyer-socketcan-base:1.8
	pgoyette-localcount-20170107:1.8
	netbsd-7-1-RC1:1.7
	pgoyette-localcount-20161104:1.8
	netbsd-7-0-2-RELEASE:1.7
	localcount-20160914:1.8
	netbsd-7-nhusb:1.7.0.8
	netbsd-7-nhusb-base:1.7
	pgoyette-localcount-20160806:1.8
	pgoyette-localcount-20160726:1.8
	pgoyette-localcount:1.8.0.2
	pgoyette-localcount-base:1.8
	netbsd-7-0-1-RELEASE:1.7
	netbsd-7-0:1.7.0.6
	netbsd-7-0-RELEASE:1.7
	netbsd-7-0-RC3:1.7
	netbsd-7-0-RC2:1.7
	netbsd-7-0-RC1:1.7
	netbsd-5-2-3-RELEASE:1.2.6.1
	netbsd-5-1-5-RELEASE:1.2.6.1
	netbsd-6-0-6-RELEASE:1.5
	netbsd-6-1-5-RELEASE:1.5
	netbsd-7:1.7.0.4
	netbsd-7-base:1.7
	yamt-pagecache-base9:1.7
	yamt-pagecache-tag8:1.5
	netbsd-6-1-4-RELEASE:1.5
	netbsd-6-0-5-RELEASE:1.5
	tls-earlyentropy:1.7.0.2
	tls-earlyentropy-base:1.7
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.7
	riastradh-drm2-base3:1.7
	netbsd-6-1-3-RELEASE:1.5
	netbsd-6-0-4-RELEASE:1.5
	netbsd-5-2-2-RELEASE:1.2.6.1
	netbsd-5-1-4-RELEASE:1.2.6.1
	netbsd-6-1-2-RELEASE:1.5
	netbsd-6-0-3-RELEASE:1.5
	netbsd-5-2-1-RELEASE:1.2.6.1
	netbsd-5-1-3-RELEASE:1.2.6.1
	netbsd-6-1-1-RELEASE:1.5
	riastradh-drm2-base2:1.6
	riastradh-drm2-base1:1.6
	riastradh-drm2:1.6.0.2
	riastradh-drm2-base:1.6
	netbsd-6-1:1.5.0.16
	netbsd-6-0-2-RELEASE:1.5
	netbsd-6-1-RELEASE:1.5
	netbsd-6-1-RC4:1.5
	netbsd-6-1-RC3:1.5
	agc-symver:1.6.0.4
	agc-symver-base:1.6
	netbsd-6-1-RC2:1.5
	netbsd-6-1-RC1:1.5
	yamt-pagecache-base8:1.5
	netbsd-5-2:1.2.6.1.0.10
	netbsd-6-0-1-RELEASE:1.5
	yamt-pagecache-base7:1.5
	netbsd-5-2-RELEASE:1.2.6.1
	netbsd-5-2-RC1:1.2.6.1
	matt-nb6-plus-nbase:1.5
	yamt-pagecache-base6:1.5
	netbsd-6-0:1.5.0.14
	netbsd-6-0-RELEASE:1.5
	netbsd-6-0-RC2:1.5
	tls-maxphys:1.5.0.12
	tls-maxphys-base:1.7
	matt-nb6-plus:1.5.0.10
	matt-nb6-plus-base:1.5
	netbsd-6-0-RC1:1.5
	yamt-pagecache-base5:1.5
	yamt-pagecache-base4:1.5
	netbsd-6:1.5.0.8
	netbsd-6-base:1.5
	netbsd-5-1-2-RELEASE:1.2.6.1
	netbsd-5-1-1-RELEASE:1.2.6.1
	yamt-pagecache-base3:1.5
	yamt-pagecache-base2:1.5
	yamt-pagecache:1.5.0.6
	yamt-pagecache-base:1.5
	cherry-xenmp:1.5.0.4
	cherry-xenmp-base:1.5
	bouyer-quota2-nbase:1.5
	bouyer-quota2:1.5.0.2
	bouyer-quota2-base:1.5
	matt-mips64-premerge-20101231:1.5
	matt-nb5-mips64-premerge-20101231:1.2.6.1
	matt-nb5-pq3:1.2.6.1.0.8
	matt-nb5-pq3-base:1.2.6.1
	netbsd-5-1:1.2.6.1.0.6
	netbsd-5-1-RELEASE:1.2.6.1
	netbsd-5-1-RC4:1.2.6.1
	matt-nb5-mips64-k15:1.2.6.1
	netbsd-5-1-RC3:1.2.6.1
	netbsd-5-1-RC2:1.2.6.1
	netbsd-5-1-RC1:1.2.6.1
	netbsd-5-0-2-RELEASE:1.2.6.1
	matt-nb5-mips64-premerge-20091211:1.2.6.1
	matt-premerge-20091211:1.5
	matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.2.6.1
	matt-nb4-mips64-k7-u2a-k9b:1.2.6.1
	matt-nb5-mips64-u1-k1-k5:1.2.6.1
	matt-nb5-mips64:1.2.6.1.0.4
	netbsd-5-0-1-RELEASE:1.2.6.1
	jym-xensuspend-nbase:1.5
	netbsd-5-0:1.2.6.1.0.2
	netbsd-5-0-RELEASE:1.2.6.1
	netbsd-5-0-RC4:1.2.6.1
	netbsd-5-0-RC3:1.2.6.1
	netbsd-5-0-RC2:1.2.6.1
	jym-xensuspend:1.3.0.2
	jym-xensuspend-base:1.5
	netbsd-5-0-RC1:1.2.6.1
	netbsd-5:1.2.0.6
	netbsd-5-base:1.2
	matt-mips64-base2:1.2
	matt-mips64:1.1.0.10
	wrstuden-revivesa-base-3:1.2
	wrstuden-revivesa-base-2:1.2
	wrstuden-revivesa-base-1:1.2
	yamt-pf42-base4:1.2
	yamt-pf42-base3:1.2
	hpcarm-cleanup-nbase:1.2
	yamt-pf42-baseX:1.1
	yamt-pf42-base2:1.2
	wrstuden-revivesa:1.2.0.2
	wrstuden-revivesa-base:1.2
	yamt-pf42:1.1.0.8
	yamt-pf42-base:1.1
	keiichi-mipv6-nbase:1.1
	keiichi-mipv6:1.1.0.6
	keiichi-mipv6-base:1.1
	matt-armv6-nbase:1.1
	matt-armv6-prevmlocking:1.1
	cube-autoconf:1.1.0.4
	cube-autoconf-base:1.1
	hpcarm-cleanup-base:1.1
	matt-armv6:1.1.0.2
	matt-armv6-base:1.1
	matt-mips64-base:1.1;
locks; strict;
comment	@# @;


1.9
date	2020.04.21.02.56.37;	author msaitoh;	state Exp;
branches;
next	1.8;
commitid	bqdXzblZRJXIoc5C;

1.8
date	2016.01.23.21.22.50;	author christos;	state Exp;
branches
	1.8.8.1
	1.8.16.1
	1.8.18.1;
next	1.7;
commitid	0voYFcZKKnOpl6Sy;

1.7
date	2013.08.01.23.19.39;	author matt;	state Exp;
branches;
next	1.6;
commitid	lojyQJVYr9365OZw;

1.6
date	2013.01.31.23.40.48;	author matt;	state Exp;
branches;
next	1.5;

1.5
date	2009.04.23.01.37.55;	author lukem;	state Exp;
branches
	1.5.6.1
	1.5.12.1;
next	1.4;

1.4
date	2009.04.22.15.23.02;	author lukem;	state Exp;
branches;
next	1.3;

1.3
date	2008.12.16.22.44.50;	author christos;	state Exp;
branches
	1.3.2.1;
next	1.2;

1.2
date	2008.05.05.17.54.14;	author ad;	state Exp;
branches
	1.2.6.1;
next	1.1;

1.1
date	2007.08.04.11.03.04;	author ad;	state Exp;
branches
	1.1.8.1
	1.1.10.1;
next	;

1.8.8.1
date	2020.08.05.15.48.53;	author martin;	state Exp;
branches;
next	;
commitid	QKdzP8pCUhGrgTiC;

1.8.16.1
date	2020.04.21.18.42.47;	author martin;	state Exp;
branches;
next	;
commitid	86tA4aEmdr3VCh5C;

1.8.18.1
date	2020.07.10.11.20.29;	author martin;	state Exp;
branches;
next	;
commitid	Bgw4GlLj5eBZBwfC;

1.5.6.1
date	2014.05.22.11.43.02;	author yamt;	state Exp;
branches;
next	;
commitid	wmvImESqVQCgMwBx;

1.5.12.1
date	2013.02.25.00.30.42;	author tls;	state Exp;
branches;
next	1.5.12.2;

1.5.12.2
date	2014.08.20.00.05.07;	author tls;	state Exp;
branches;
next	;
commitid	jTnpym9Qu0o4R1Nx;

1.3.2.1
date	2009.05.13.19.20.20;	author jym;	state Exp;
branches;
next	;

1.2.6.1
date	2008.12.23.03.36.43;	author snj;	state Exp;
branches;
next	;

1.1.8.1
date	2008.05.18.12.36.14;	author yamt;	state Exp;
branches;
next	;

1.1.10.1
date	2007.08.04.11.03.04;	author ad;	state dead;
branches;
next	1.1.10.2;

1.1.10.2
date	2007.08.04.11.03.05;	author ad;	state Exp;
branches;
next	;


desc
@@


1.9
log
@Get TSC frequency from CPUID 0x15 and/or x16 for newer Intel processors.

 - If the max CPUID leaf is >= 0x15, take TSC value from CPUID. Some processors
   can take TSC/core crystal clock ratio but core crystal clock frequency
   can't be taken. Intel SDM give us the values for some processors.
 - It also required to change lapic_per_second to make LAPIC timer correctly.
 - Add new file x86/x86/identcpu_subr.c to share common subroutines between
   kernel and userland. Some code in x86/x86/identcpu.c and cpuctl/arch/i386.c
   will be moved to this file in future.
 - Add comment to clarify.
@
text
@#	$NetBSD: Makefile,v 1.8 2016/01/23 21:22:50 christos Exp $

.include <bsd.own.mk>

.PATH:	${.CURDIR}/arch

PROG=	cpuctl
MAN=	cpuctl.8
SRCS=	cpuctl.c

.if exists(${.CURDIR}/arch/${MACHINE_ARCH}.c)
SRCS+=	${MACHINE_ARCH}.c
.elif exists(${.CURDIR}/arch/${MACHINE_CPU}.c)
SRCS+=	${MACHINE_CPU}.c
.else
SRCS+=	noarch.c
.endif
.if exists(${.CURDIR}/arch/${MACHINE_ARCH}-asm.S)
SRCS+=	${MACHINE_ARCH}-asm.S
.endif

.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "i386"
CPPFLAGS+= -I${.CURDIR} -I${.CURDIR}/arch
.PATH.c: ${NETBSDSRCDIR}/sys/arch/x86/x86
SRCS+=	identcpu_subr.c
.endif

CPPFLAGS+=	-D_KERNTYPES
LDADD+=-lutil
DPADD+=${LIBUTIL}

.include <bsd.prog.mk>
@


1.8
log
@Define _KERNTYPES for things that need it.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.7 2013/08/01 23:19:39 matt Exp $
d22 6
@


1.8.8.1
log
@Pull up the following revisions, requested by msaitoh in ticket #1585:

	usr.sbin/cpuctl/Makefile			1.9
	usr.sbin/cpuctl/arch/cpuctl_i386.h		1.5
	usr.sbin/cpuctl/arch/i386.c			1.111-1.113 via patch
	usr.sbin/cpuctl/cpuctl.c			1.31
	usr.sbin/cpuctl/cpuctl.h			1.7
	sys/arch/x86/x86/identcpu_subr.c		1.1-1.7

- Get TSC frequency from CPUID 0x15 and/or x16 for newer Intel
  processors.
- Add 0xa5 and 0xa6 for Comet Lake.
- Rename ci_cpuid_level to ci_max_cpuid and ci_cpuid_extlevel to
  ci_max_ext_cpuid to match x86/include/cpu.h. No functional change.
- Sort some entries.
- Add comment.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.8 2016/01/23 21:22:50 christos Exp $
a21 6
.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "i386"
CPPFLAGS+= -I${.CURDIR} -I${.CURDIR}/arch
.PATH.c: ${NETBSDSRCDIR}/sys/arch/x86/x86
SRCS+=	identcpu_subr.c
.endif

@


1.8.18.1
log
@Pull up the following revisions (all via patch) requested by msaitoh in
ticket #995:

	usr.sbin/cpuctl/Makefile			1.9
	usr.sbin/cpuctl/arch/cpuctl_i386.h		1.5
	usr.sbin/cpuctl/arch/i386.c			1.111-1.113
	usr.sbin/cpuctl/cpuctl.c			1.31
	usr.sbin/cpuctl/cpuctl.h			1.7
	sys/arch/x86/x86/identcpu_subr.c		1.1-1.7

- Get TSC frequency from CPUID 0x15 and/or x16 for newer Intel
  processors.
- Add 0xa5 and 0xa6 for Comet Lake.
- Rename ci_cpuid_level to ci_max_cpuid and ci_cpuid_extlevel to
  ci_max_ext_cpuid to match x86/include/cpu.h. No functional change.
- Sort some entries.
- Add comment.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.8 2016/01/23 21:22:50 christos Exp $
a21 6
.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "i386"
CPPFLAGS+= -I${.CURDIR} -I${.CURDIR}/arch
.PATH.c: ${NETBSDSRCDIR}/sys/arch/x86/x86
SRCS+=	identcpu_subr.c
.endif

@


1.8.16.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD$
a21 6
.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "i386"
CPPFLAGS+= -I${.CURDIR} -I${.CURDIR}/arch
.PATH.c: ${NETBSDSRCDIR}/sys/arch/x86/x86
SRCS+=	identcpu_subr.c
.endif

@


1.7
log
@.include <bsd.own.mk> to get MACHINE_CPU
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.6 2013/01/31 23:40:48 matt Exp $
d22 1
@


1.6
log
@Add arm support for cpuctl identify
@
text
@d1 3
a3 1
#	$NetBSD: Makefile,v 1.5 2009/04/23 01:37:55 lukem Exp $
@


1.5
log
@Allow WARNS=4 after Christos' fix sys/cdefs.h
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.4 2009/04/22 15:23:02 lukem Exp $
d11 5
a18 3
.else
SRCS+=	noarch.c
.endif
@


1.5.6.1
log
@sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")
@
text
@d1 1
a1 3
#	$NetBSD: Makefile,v 1.5 2009/04/23 01:37:55 lukem Exp $

.include <bsd.own.mk>
d11 3
a13 2
.elif exists(${.CURDIR}/arch/${MACHINE_CPU}.c)
SRCS+=	${MACHINE_CPU}.c
a16 3
.if exists(${.CURDIR}/arch/${MACHINE_ARCH}-asm.S)
SRCS+=	${MACHINE_ARCH}-asm.S
.endif
@


1.5.12.1
log
@resync with head
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.5 2009/04/23 01:37:55 lukem Exp $
d11 3
a13 2
.elif exists(${.CURDIR}/arch/${MACHINE_CPU}.c)
SRCS+=	${MACHINE_CPU}.c
a16 3
.if exists(${.CURDIR}/arch/${MACHINE_ARCH}-asm.S)
SRCS+=	${MACHINE_ARCH}-asm.S
.endif
@


1.5.12.2
log
@Rebase to HEAD as of a few days ago.
@
text
@d1 1
a1 3
#	$NetBSD$

.include <bsd.own.mk>
@


1.4
log
@Enable WARNS=4 by default, except for:
	cpuctl  dumplfs  hprop  ipf  iprop-log  kadmin  kcm  kdc  kdigest
	kimpersonate  kstash  ktutil  makefs  ndbootd  ntp  pppd  quot
	racoon  racoonctl  rtadvd  sntp  sup  tcpdchk  tcpdmatch  tcpdump
	traceroute  traceroute6  user  veriexecgen  wsmoused  zic
(Mostly third-party applications)
@
text
@d1 1
a1 3
#	$NetBSD: Makefile,v 1.3 2008/12/16 22:44:50 christos Exp $

WARNS?=	3	# XXX -Wsign-compare issues in arch/i386.c
@


1.3
log
@Remove 3rd buggy copy of this function and use snprintb(3) instead.
No need to allocate MAXPATHLEN buffers anymore.
@
text
@d1 3
a3 1
#	$NetBSD: Makefile,v 1.2 2008/05/05 17:54:14 ad Exp $
@


1.3.2.1
log
@Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.5 2009/04/23 01:37:55 lukem Exp $
@


1.2
log
@PR port-amd64/37461 x86 cpu dmesg output is noisy

Port identifycpu() to userspace. The kernel lies and reports on cpuN while
actually using the values from cpu0, but this attempts to bind itself to the
requested CPU if running as root. That doesn't work properly yet due to
kern/38588, but will do once that's fixed.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.1 2007/08/04 11:03:04 ad Exp $
d7 1
a7 1
SRCS=	cpuctl.c bitmask.c
d18 3
@


1.2.6.1
log
@Pull up following revision(s) (requested by christos in ticket #193):
	usr.sbin/cpuctl/Makefile: revision 1.3
	usr.sbin/cpuctl/bitmask.c: file removal
	usr.sbin/cpuctl/cpuctl.h: revision 1.2
	usr.sbin/cpuctl/arch/i386.c: revision 1.14
Remove 3rd buggy copy of this function and use snprintb(3) instead.
No need to allocate MAXPATHLEN buffers anymore.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.2 2008/05/05 17:54:14 ad Exp $
d7 1
a7 1
SRCS=	cpuctl.c
a17 3
LDADD+=-lutil
DPADD+=${LIBUTIL}

@


1.1
log
@Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.
@
text
@d1 3
a3 1
#	$NetBSD$
d7 10
@


1.1.10.1
log
@file Makefile was added on branch matt-mips64 on 2007-08-04 11:03:05 +0000
@
text
@d1 6
@


1.1.10.2
log
@Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.
@
text
@a0 6
#	$NetBSD: Makefile,v 1.1 2007/08/04 11:03:04 ad Exp $

PROG=	cpuctl
MAN=	cpuctl.8

.include <bsd.prog.mk>
@


1.1.8.1
log
@sync with head.
@
text
@d1 1
a1 3
#	$NetBSD: Makefile,v 1.1 2007/08/04 11:03:04 ad Exp $

.PATH:	${.CURDIR}/arch
a4 10
SRCS=	cpuctl.c bitmask.c

.if exists(${.CURDIR}/arch/${MACHINE_ARCH}.c)
SRCS+=	${MACHINE_ARCH}.c
.if exists(${.CURDIR}/arch/${MACHINE_ARCH}-asm.S)
SRCS+=	${MACHINE_ARCH}-asm.S
.endif
.else
SRCS+=	noarch.c
.endif
@
