Question about printcpuinfo in sys/amd64/amd64/indentcpu.c
Garrett Cooper
gcooper at FreeBSD.org
Mon Aug 23 15:46:42 UTC 2010
On Mon, Aug 23, 2010 at 5:07 AM, John Baldwin <jhb at freebsd.org> wrote:
> On Friday, August 20, 2010 10:14:46 am Garrett Cooper wrote:
>> Hi,
>> Currently the code in identcpu.c does a check for a specific cpu
>> value extension. This is set to 0x80000004 (even though the
>> corresponding code below iterates through 0x80000002:0x80000005):
>
> It does not invoke 0x80000005 (<, not <=, is used as the loop terminator).
>
>> /* Check for extended CPUID information and a processor name. */
>> if (cpu_exthigh >= 0x80000004) {
>> brand = cpu_brand;
>> for (i = 0x80000002; i < 0x80000005; i++) {
>> do_cpuid(i, regs);
>> memcpy(brand, regs, sizeof(regs));
>> brand += sizeof(regs);
>> }
>> }
I'm blind :/. I did some poking around and now I know why it's
doing that. It's checking for the items noted in chapter 4.2 Brand
String under the "Intel Processor Identification and the CPUID
Instruction" spec.
Thanks,
-Garrett
More information about the freebsd-hackers
mailing list