函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:save_microcode_patch

函数原型:static void save_microcode_patch(void *data, unsigned int size)

返回类型:void

参数:

类型参数名称
void *data
unsigned intsize
170  struct ucode_patch * iter, * tmp, * p = NULL
171  bool prev_found = false
174  mc_hdr等于data
177  mc_saved_hdr等于 Intel uses only this one
178  sig等于sig
179  pf等于pf
181  如果Returns 1 if update has been found, 0 otherwise.
182  prev_found = true
184  如果rev小于等于rev则继续下一循环
187  p等于memdup_patch(data, size)
188  如果非p打印错误信息("Error allocating buffer %p\n", data)
190  否则
192  释放内存
193  释放内存
202  如果非prev_found
203  p等于memdup_patch(data, size)
204  如果非p打印错误信息("Error allocating buffer for %p\n", data)
206  否则添加链表项
210  如果非p则返回
218  如果IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_X86_32)则Current microcode patch used in early patching on the APs. 等于__pa_nodebug( Intel uses only this one )
220  否则Current microcode patch used in early patching on the APs. 等于 Intel uses only this one
调用者
名称描述
scan_microcodeGet microcode matching with BSP's model. Only CPUs with the same model as* BSP can stay in the platform.
save_mc_for_earlySave this microcode patch. It will be loaded early when a CPU is* hot-added or resumes.