0360a7d374
- 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.
33 lines
665 B
Makefile
33 lines
665 B
Makefile
# $NetBSD: Makefile,v 1.9 2020/04/21 02:56:37 msaitoh 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>
|