On Sun, May 19, 2019 at 2:31 PM tedheadster <tedheadster@xxxxxxxxx> wrote: > > On Sun, May 19, 2019 at 7:31 AM Olaf van der Spek <ml@xxxxxxxxxx> wrote: > > > > What's eax after cpuid function 0? > > After calling cpuid function 0x0, %eax returns the expected 0x1. > > Here is the output of 'cpuid -r'. > > # cpuid -r > CPU 0: > 0x00000000 0x00: eax=0x00000001 ebx=0x746e6543 ecx=0x736c7561 edx=0x48727561 > 0x00000001 0x00: eax=0x00000585 ebx=0x746e6543 ecx=0x00000000 edx=0x008001b5 ecx does contain 0 doesn't it? Or is this the wrong line? > I think %ecx should properly contain 0x00000000, but it instead puts the 'auls' characters from cpuid function 0x00000000 (vendor string 'CentaurHauls') in %ecx: > 0x80000000 0x00: eax=0x80000005 ebx=0x00000000 ecx=0x00000000 edx=0x00000050 > 0x80000001 0x00: eax=0x00000585 ebx=0x00000000 ecx=0x00000000 edx=0x808001b5 > 0x80000002 0x00: eax=0x20544449 ebx=0x436e6957 ecx=0x20706968 edx=0x44332d32 > 0x80000003 0x00: eax=0x00000000 ebx=0x00000000 ecx=0x00000000 edx=0x00000000 > 0x80000004 0x00: eax=0x00000000 ebx=0x00000000 ecx=0x00000000 edx=0x00000000 > 0x80000005 0x00: eax=0x80000005 ebx=0x08800880 ecx=0x20040120 edx=0x20020120 > 0x80860000 0x00: eax=0x80860000 ebx=0x08800880 ecx=0x00000000 edx=0x00000050 > 0xc0000000 0x00: eax=0xc0000005 ebx=0x08800880 ecx=0x00000000 edx=0x00000050 > 0xc0000001 0x00: eax=0x00000585 ebx=0x08800880 ecx=0x00000000 edx=0x808001b5 > 0xc0000002 0x00: eax=0x20544449 ebx=0x436e6957 ecx=0x20706968 edx=0x44332d32 > 0xc0000003 0x00: eax=0x00000000 ebx=0x00000000 ecx=0x00000000 edx=0x00000000 > 0xc0000004 0x00: eax=0x00000000 ebx=0x00000000 ecx=0x00000000 edx=0x00000000 > 0xc0000005 0x00: eax=0xc0000005 ebx=0x08800880 ecx=0x20040120 edx=0x20020120 -- Olaf