Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\cpu\microcode\intel.c Create Date:2022-07-28 08:08:14
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Given CPU signature and a microcode patch, this function finds if the* microcode patch has matching family and model with the CPU.* %true - if there's a match* %false - otherwise

Proto:static bool microcode_matches(struct microcode_header_intel *mc_header, unsigned long sig)

Type:bool

Parameter:

TypeParameterName
struct microcode_header_intel *mc_header
unsigned longsig
113  total_size = get_totalsize(mc_header)
114  data_size = get_datasize(mc_header)
121  fam = x86_family(sig)
122  model = x86_model(sig)
124  fam_ucode = x86_family(sig)
125  model_ucode = x86_model(sig)
127  If fam == fam_ucode && model == model_ucode Then Return true
131  If total_size <= data_size + MC_HEADER_SIZE Then Return false
134  ext_header = mc_header + data_size + MC_HEADER_SIZE
135  ext_sig = ext_header + EXT_HEADER_SIZE
136  ext_sigcount = count
138  When i < ext_sigcount cycle
139  fam_ucode = x86_family(sig)
140  model_ucode = x86_model(sig)
142  If fam == fam_ucode && model == model_ucode Then Return true
145  ext_sig++
147  Return false
Caller
NameDescribe
scan_microcodeGet microcode matching with BSP's model. Only CPUs with the same model as* BSP can stay in the platform.