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 <[EMAIL PROTECTED]> -- 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 [EMAIL PROTECTED]
with "unsubscribe freebsd-stable" in the body of the message