函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:bsp_init_amd

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

返回类型:void

参数:

类型参数名称
struct cpuinfo_x86 *c
497  如果CPU family 大于等于0xf则
505  如果非rdmsrl_safe(MSR_K8_TSEG_ADDR, & tseg)则
508  pr_debug("tseg: %010llx\n", tseg)
509  如果pfn_range_is_mapped(pfn, pfn + 1)则set_memory_4k((unsignedlong)__va(tseg), 1)
515  如果cpu_has(c, TSC ticks at a constant rate )则
517  如果CPU family 大于0x10或CPU family 恒等于0x10且x86_model大于等于0x2则
527  如果CPU family 恒等于0x15则
531  cpuid等于cpuid_edx(0x80000005)
532  assoc等于cpuid右移16位按位与0xff
533  upperbit等于cpuid右移24位左移10位的值除assoc
535  mask等于upperbit减1按位与PAGE_MASK
536  flags等于ALIGN_VA_32按位或ALIGN_VA_64
539  bits等于get_random_int()按位与mask
542  如果cpu_has(c, MWAIT extension (MONITORX/MWAITX instructions) )则use_mwaitx_delay()
545  如果boot_cpu_has(Topology extensions CPUID leafs )则
548  ecx等于cpuid_ecx(0x8000001e)
549  des_per_socket: Stores the number of nodes per socket.* Refer to Fam15h Models 00-0fh BKDG - CPUID Fn8000_001E_ECX* Node Identifiers[10:8]等于ecx右移8位按位与7的值加1
550  否则如果boot_cpu_has(NodeId MSR )则
553  rdmsrl(MSR_FAM10H_NODE_ID, value)
554  des_per_socket: Stores the number of nodes per socket.* Refer to Fam15h Models 00-0fh BKDG - CPUID Fn8000_001E_ECX* Node Identifiers[10:8]等于value右移3位按位与7的值加1
557  如果非boot_cpu_has("" Speculative Store Bypass Disable )且非boot_cpu_has(Virtualized Speculative Store Bypass Disable )且CPU family 大于等于0x15且CPU family 小于等于0x17则
563  :CPU family 恒等于0x15
563  bit等于54
563  退出
564  :CPU family 恒等于0x16
564  bit等于33
564  退出
565  :CPU family 恒等于0x17
565  bit等于10
565  退出
566  默认
566  返回
575  x86_amd_ls_cfg_ssbd_mask等于1ULL左移bit