函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\cpu\amd.c Create Date:2022-07-27 08:58:51
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:init_amd

函数原型:static void init_amd(struct cpuinfo_x86 *c)

返回类型:void

参数:

类型参数名称
struct cpuinfo_x86 *c
908  early_init_amd(c)
914  clear_cpu_cap(c, 0 * 32 + 31)
916  如果CPU family 大于等于0x10则set_cpu_cap(c, REP microcode works well )
920  apicid等于hard_smp_processor_id()
923  如果CPU family 小于6则clear_cpu_cap(c, Machine Check Exception )
927  :CPU family 恒等于4
927  init_amd_k5(c)
927  退出
928  :CPU family 恒等于5
928  init_amd_k6(c)
928  退出
929  :CPU family 恒等于6
929  init_amd_k7(c)
929  退出
930  :CPU family 恒等于0xf
930  init_amd_k8(c)
930  退出
931  :CPU family 恒等于0x10
931  init_amd_gh(c)
931  退出
932  :CPU family 恒等于0x12
932  init_amd_ln(c)
932  退出
933  :CPU family 恒等于0x15
933  init_amd_bd(c)
933  退出
934  :CPU family 恒等于0x16
934  init_amd_jg(c)
934  退出
935  :CPU family 恒等于0x17
935  init_amd_zn(c)
935  退出
942  如果CPU family 大于等于6且非cpu_has(c, Always save/restore FP error pointers )则set_cpu_bug(c, FXSAVE leaks FOP/FIP/FOP )
945  cpu_detect_cache_sizes(c)
947  On a AMD dual core setup the lower bits of the APIC id distinguish the cores.* Assumes number of cores is a power of two.
948  Fixup core topology information for* (1) AMD multi-node processors* Assumption: Number of cores in each internal node is the same.* (2) AMD processors supporting compute units
949  srat_detect_node(c)
951  init_amd_cacheinfo(c)
953  如果cpu_has(c, "sse2" )则
960  Set @bit in a MSR @msr.* Retval:* < 0: An error was encountered.* = 0: Bit was already set.* > 0: Hardware accepted the MSR write.
964  set_cpu_cap(c, "" LFENCE synchronizes RDTSC )
971  如果CPU family 大于0x11则set_cpu_cap(c, Always Running APIC Timer )
975  如果非cpu_has(c, 3DNow prefetch instructions )则如果cpu_has(c, 3DNow )或cpu_has(c, Long Mode (x86-64, 64-bit support) )则
977  set_cpu_cap(c, 3DNow prefetch instructions )
980  如果非cpu_has(c, "" Xen paravirtual guest )则set_cpu_bug(c, SYSRET doesn't fix up SS attrs )
988  如果cpu_has(c, Instructions Retired Count )且非cpu_has_amd_erratum(c, amd_erratum_1054)则Set @bit in a MSR @msr.* Retval:* < 0: An error was encountered.* = 0: Bit was already set.* > 0: Hardware accepted the MSR write.