Date: Mon, 29 Oct 2001 09:26:59 -0800 (PST) From: John Baldwin <jhb@FreeBSD.org> To: cameron grant <gandalf@vilnya.demon.co.uk> Cc: sobomax@FreeBSD.org, clefevre@citeweb.net, peter@wemm.org, jerry@thehutt.org, freebsd-stable@FreeBSD.ORG, freebsd-current@FreeBSD.ORG Subject: Re: adding athlon xp to bsd.cpu.mk Message-ID: <XFMail.011029092659.jhb@FreeBSD.org> In-Reply-To: <002101c16083$6ff87260$0504020a@haveblue>
next in thread | previous in thread | raw e-mail | index | archive | help
On 29-Oct-01 cameron grant wrote: >> > from what i can see, identcpu.c fetches the cpu name using a cpuid >> > instruction. >> >> The part cpuid gives you is "AuthenticAMD". >> The fancy name is determined by switching on the Id. > > > read identcpu.c. you are correct for k6 and lesser processors. the code in > question is around line 323: > do_cpuid(0x80000000, regs); > nreg = regs[0]; > if (nreg >= 0x80000004) { > do_cpuid(0x80000002, regs); > memcpy(cpu_model, regs, sizeof regs); > do_cpuid(0x80000003, regs); > memcpy(cpu_model+16, regs, sizeof regs); > do_cpuid(0x80000004, regs); > memcpy(cpu_model+32, regs, sizeof regs); > } > > -cg Doh, my bad. :) /me shuffles off into the corner.. -- John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.011029092659.jhb>