From owner-freebsd-stable Mon Oct 29 9:27:34 2001 Delivered-To: freebsd-stable@freebsd.org Received: from mail5.speakeasy.net (mail5.speakeasy.net [216.254.0.205]) by hub.freebsd.org (Postfix) with ESMTP id 90BC437B40E for ; Mon, 29 Oct 2001 09:27:14 -0800 (PST) Received: (qmail 48220 invoked from network); 29 Oct 2001 17:27:10 -0000 Received: from unknown (HELO laptop.baldwin.cx) ([64.81.54.73]) (envelope-sender ) by mail5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 29 Oct 2001 17:27:10 -0000 Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <002101c16083$6ff87260$0504020a@haveblue> Date: Mon, 29 Oct 2001 09:26:59 -0800 (PST) From: John Baldwin To: cameron grant Subject: Re: adding athlon xp to bsd.cpu.mk Cc: sobomax@FreeBSD.org, clefevre@citeweb.net, peter@wemm.org, jerry@thehutt.org, freebsd-stable@FreeBSD.ORG, freebsd-current@FreeBSD.ORG Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 -- 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-stable" in the body of the message