函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Return a non-negative value even if some of the checks failed so that* we can skip over the next patch. If we return a negative value, we* signal a grave error like a memory allocation has failed and the* driver cannot continue functioning normally

函数原型:static int verify_and_add_patch(u8 family, u8 *fw, unsigned int leftover, unsigned int *patch_size)

返回类型:int

参数:

类型参数名称
u8family
u8 *fw
unsigned intleftover
unsigned int *patch_size
770  ret等于Verify the patch in @buf.* Returns:* negative: on error* positive: patch is not for this family, skip it* 0: success
771  如果ret则返回:ret
774  patch等于分配内存并置零
775  如果非patch
776  打印错误信息("Patch allocation failure.\n")
777  返回:负EINVAL
780  Intel uses only this one 等于kmemdup(fw + SECTION_HDR_SIZE, * patch_size, GFP_KERNEL)
781  如果非 Intel uses only this one
782  打印错误信息("Patch data allocation failure.\n")
783  释放内存
784  返回:负EINVAL
787  mc_hdr等于fwSECTION_HDR_SIZE
788  proc_id等于processor_rev_id
790  初始化链表头
791  patch_id等于patch_id
792  equiv_cpu等于proc_id
794  pr_debug("%s: Added patch_id: 0x%08x, proc_id: 0x%04x\n", __func__, patch_id, proc_id)
798  update_cache(patch)
800  返回:0
调用者
名称描述
__load_microcode_amd