Print this page




5652                 if (!fpu_exists)
5653                         *edx &= ~(CPUID_INTC_EDX_FPU | CPUID_INTC_EDX_MMX);
5654 
5655                 /*
5656                  * Now map the supported feature vector to things that we
5657                  * think userland will care about.
5658                  */
5659                 if (*ecx & CPUID_INTC_ECX_MOVBE)
5660                         hwcap_flags |= AV_386_MOVBE;
5661 
5662                 if (*ecx & CPUID_INTC_ECX_POPCNT)
5663                         hwcap_flags |= AV_386_POPCNT;
5664                 if (*edx & CPUID_INTC_EDX_FPU)
5665                         hwcap_flags |= AV_386_FPU;
5666                 if (*edx & CPUID_INTC_EDX_MMX)
5667                         hwcap_flags |= AV_386_MMX;
5668                 if (*edx & CPUID_INTC_EDX_TSC)
5669                         hwcap_flags |= AV_386_TSC;
5670         }
5671 






5672         /*
5673          * Check a few miscellaneous features.
5674          */
5675         if (cpi->cpi_xmaxeax < 0x80000001)
5676                 goto resolve_done;
5677 
5678         switch (cpi->cpi_vendor) {
5679                 uint32_t *edx, *ecx;
5680 
5681         case X86_VENDOR_Intel:
5682                 /*
5683                  * Seems like Intel duplicated what we necessary
5684                  * here to make the initial crop of 64-bit OS's work.
5685                  * Hopefully, those are the only "extended" bits
5686                  * they'll add.
5687                  */
5688                 /*FALLTHROUGH*/
5689 
5690         case X86_VENDOR_AMD:
5691         case X86_VENDOR_HYGON:




5652                 if (!fpu_exists)
5653                         *edx &= ~(CPUID_INTC_EDX_FPU | CPUID_INTC_EDX_MMX);
5654 
5655                 /*
5656                  * Now map the supported feature vector to things that we
5657                  * think userland will care about.
5658                  */
5659                 if (*ecx & CPUID_INTC_ECX_MOVBE)
5660                         hwcap_flags |= AV_386_MOVBE;
5661 
5662                 if (*ecx & CPUID_INTC_ECX_POPCNT)
5663                         hwcap_flags |= AV_386_POPCNT;
5664                 if (*edx & CPUID_INTC_EDX_FPU)
5665                         hwcap_flags |= AV_386_FPU;
5666                 if (*edx & CPUID_INTC_EDX_MMX)
5667                         hwcap_flags |= AV_386_MMX;
5668                 if (*edx & CPUID_INTC_EDX_TSC)
5669                         hwcap_flags |= AV_386_TSC;
5670         }
5671 
5672         /* Detect systems with a potential CPUID limit  */
5673         if (cpi->cpi_vendor == X86_VENDOR_Intel && cpi->cpi_maxeax < 4) {
5674                 cmn_err(CE_NOTE, "CPUID limit detected, "
5675                     "see the CPUID(7D) man page for details\n");
5676         }
5677 
5678         /*
5679          * Check a few miscellaneous features.
5680          */
5681         if (cpi->cpi_xmaxeax < 0x80000001)
5682                 goto resolve_done;
5683 
5684         switch (cpi->cpi_vendor) {
5685                 uint32_t *edx, *ecx;
5686 
5687         case X86_VENDOR_Intel:
5688                 /*
5689                  * Seems like Intel duplicated what we necessary
5690                  * here to make the initial crop of 64-bit OS's work.
5691                  * Hopefully, those are the only "extended" bits
5692                  * they'll add.
5693                  */
5694                 /*FALLTHROUGH*/
5695 
5696         case X86_VENDOR_AMD:
5697         case X86_VENDOR_HYGON: