Lines Matching full:patch
47 * microcode patch we found to match.
61 * Microcode patch container file is prepended to the initrd in cpio
148 * Check whether there is a valid, non-truncated microcode patch section at the
152 * On success, @sh_psize returns the patch size according to the section header,
163 pr_debug("Truncated patch section.\n"); in __verify_patch_section()
182 pr_debug("Patch of size %u too short.\n", p_size); in __verify_patch_section()
194 * a patch of the indicated @sh_psize (and also whether this size does not
227 * Verify the patch in @buf.
231 * positive: patch is not for this family, skip it
254 * Check if the remaining buffer is big enough to contain a patch of in verify_patch()
259 pr_debug("Patch of size %u truncated.\n", sh_psize); in verify_patch()
267 pr_debug("Per-family patch size mismatch.\n"); in verify_patch()
276 pr_err("Patch-ID 0x%08x: chipset-specific code unsupported.\n", mc_hdr->patch_id); in verify_patch()
313 * doesn't contain a patch for the CPU, scan through the whole container in parse_container()
333 * Patch verification failed, skip to the next in parse_container()
348 /* Skip patch section header too: */ in parse_container()
354 * If we have found a patch (desc->mc), it means we're looking at the in parse_container()
355 * container which has a patch for this CPU so return 0 to mean, @ucode in parse_container()
398 /* verify patch application was successful */ in __apply_microcode_amd()
408 * patch container file in initrd, traverse equivalent cpu table, look for a
409 * matching microcode patch, and update, all in initrd memory in place.
421 u8 (*patch)[PATCH_MAX_SIZE]; in apply_microcode_early_amd() local
428 patch = (u8 (*)[PATCH_MAX_SIZE])__pa_nodebug(&amd_ucode_patch); in apply_microcode_early_amd()
431 patch = &amd_ucode_patch; in apply_microcode_early_amd()
457 memcpy(patch, mc, min_t(u32, desc.psize, PATCH_MAX_SIZE)); in apply_microcode_early_amd()
538 * Check whether a new patch has been saved already. Also, allow application of in load_ucode_amd_ap()
624 /* we already have the latest patch */ in update_cache()
636 /* no patch found, add it */ in update_cache()
672 * a patch could have been loaded early, set uci->mc so that in collect_cpu_info_amd()
706 /* need to apply patch? */ in apply_microcode_amd()
772 * we can skip over the next patch. If we return a negative value, we
781 struct ucode_patch *patch; in verify_and_add_patch() local
789 patch = kzalloc(sizeof(*patch), GFP_KERNEL); in verify_and_add_patch()
790 if (!patch) { in verify_and_add_patch()
791 pr_err("Patch allocation failure.\n"); in verify_and_add_patch()
795 patch->data = kmemdup(fw + SECTION_HDR_SIZE, *patch_size, GFP_KERNEL); in verify_and_add_patch()
796 if (!patch->data) { in verify_and_add_patch()
797 pr_err("Patch data allocation failure.\n"); in verify_and_add_patch()
798 kfree(patch); in verify_and_add_patch()
801 patch->size = *patch_size; in verify_and_add_patch()
806 INIT_LIST_HEAD(&patch->plist); in verify_and_add_patch()
807 patch->patch_id = mc_hdr->patch_id; in verify_and_add_patch()
808 patch->equiv_cpu = proc_id; in verify_and_add_patch()
811 __func__, patch->patch_id, proc_id); in verify_and_add_patch()
814 update_cache(patch); in verify_and_add_patch()
878 /* save BSP's matching patch for early load */ in load_microcode_amd()