Date: Wed, 09 Apr 2003 12:00:24 -0400 (EDT) From: John Baldwin <jhb@FreeBSD.org> To: Peter Wemm <peter@FreeBSD.org> Cc: Perforce Change Reviews <perforce@freebsd.org> Subject: RE: PERFORCE change 28616 for review Message-ID: <XFMail.20030409120024.jhb@FreeBSD.org> In-Reply-To: <200304090537.h395bEZV045167@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 09-Apr-2003 Peter Wemm wrote: > http://perforce.freebsd.org/chv.cgi?CH=28616 > > Change 28616 by peter@peter_daintree on 2003/04/08 22:36:45 > > move identify_cpu from locore to here. Can we do this for i386 as well? > Affected files ... > > .. //depot/projects/hammer/sys/x86_64/x86_64/identcpu.c#4 edit > > Differences ... > > ==== //depot/projects/hammer/sys/x86_64/x86_64/identcpu.c#4 (text+ko) ==== > > @@ -62,7 +62,7 @@ > > /* XXX - should be in header file: */ > void printcpuinfo(void); > -void finishidentcpu(void); > +void identify_cpu(void); > void earlysetcpuclass(void); > void panicifcpuunsupported(void); > > @@ -280,8 +280,21 @@ > * Final stage of CPU identification. -- Should I check TI? > */ > void > -finishidentcpu(void) > +identify_cpu(void) > { > + u_int regs[4]; > + > + do_cpuid(0, regs); > + cpu_high = regs[0]; > + ((u_int *)&cpu_vendor)[0] = regs[1]; > + ((u_int *)&cpu_vendor)[1] = regs[2]; > + ((u_int *)&cpu_vendor)[2] = regs[3]; > + cpu_vendor[12] = '\0'; > + > + do_cpuid(1, regs); > + cpu_id = regs[0]; > + cpu_procinfo = regs[1]; > + cpu_feature = regs[3]; > } > > static void -- John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20030409120024.jhb>