Lines Matching refs:cur_rev
232 static bool need_sha_check(u32 cur_rev) in need_sha_check() argument
236 if (!cur_rev) { in need_sha_check()
237 cur_rev = cpuid_to_ucode_rev(bsp_cpuid_1_eax); in need_sha_check()
238 pr_info_once("No current revision, generating the lowest one: 0x%x\n", cur_rev); in need_sha_check()
241 cutoff = get_cutoff_revision(cur_rev); in need_sha_check()
243 return cur_rev <= cutoff; in need_sha_check()
246 pr_info("CPUID(1).EAX: 0x%x, current revision: 0x%x\n", bsp_cpuid_1_eax, cur_rev); in need_sha_check()
268 static bool verify_sha256_digest(u32 patch_id, u32 cur_rev, const u8 *data, unsigned int len) in verify_sha256_digest() argument
277 if (!need_sha_check(cur_rev)) in verify_sha256_digest()
508 u32 cur_rev, cutoff, patch_rev; in verify_patch() local
551 cur_rev = get_patch_level(); in verify_patch()
554 cutoff = get_cutoff_revision(cur_rev); in verify_patch()
561 cur_rev, cutoff, patch_rev); in verify_patch()
563 if (cur_rev <= cutoff && patch_rev <= cutoff) in verify_patch()
566 if (cur_rev > cutoff && patch_rev > cutoff) in verify_patch()
694 static bool __apply_microcode_amd(struct microcode_amd *mc, u32 *cur_rev, in __apply_microcode_amd() argument
699 if (!verify_sha256_digest(mc->hdr.patch_id, *cur_rev, (const u8 *)p_addr, psize)) in __apply_microcode_amd()
721 *cur_rev = get_patch_level(); in __apply_microcode_amd()
723 ucode_dbg("updated rev: 0x%x\n", *cur_rev); in __apply_microcode_amd()
725 if (*cur_rev != mc->hdr.patch_id) in __apply_microcode_amd()