Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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

Proto:static int verify_and_add_patch(u8 family, u8 *fw, unsigned int leftover, unsigned int *patch_size)

Type:int

Parameter:

TypeParameterName
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  If ret Then Return ret
774  patch = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
775  If Not patch Then
776  pr_err("Patch allocation failure.\n")
777  Return -EINVAL
780  Intel uses only this one = kmemdup(fw + SECTION_HDR_SIZE, * patch_size, GFP_KERNEL)
781  If Not Intel uses only this one Then
782  pr_err("Patch data allocation failure.\n")
783  free previously allocated memory
784  Return -EINVAL
787  mc_hdr = fw + SECTION_HDR_SIZE
788  proc_id = processor_rev_id
790  Initialization list head
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  Return 0
Caller
NameDescribe
__load_microcode_amd