函数源码

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source File:arch\x86\kernel\cpu\common.c Create Date:2022-07-27 08:55:32
首页 Copyright©Brick

993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
static void identify_cpu_without_cpuid(struct cpuinfo_x86 *c)
{
#ifdef CONFIG_X86_32
    int i;
 
    /*
     * First of all, decide if this is a 486 or higher
     * It's a 486 if we can modify the AC flag
     */
    if (flag_is_changeable_p(X86_EFLAGS_AC))
        c->x86 = 4;
    else
        c->x86 = 3;
 
    for (i = 0; i < X86_VENDOR_NUM; i++)
        if (cpu_devs[i] && cpu_devs[i]->c_identify) {
            c->x86_vendor_id[0] = 0;
            cpu_devs[i]->c_identify(c);
            if (c->x86_vendor_id[0]) {
                get_cpu_vendor(c);
                break;
            }
        }
#endif
}