Lines Matching defs:mc

185 bool intel_find_matching_signature(void *mc, struct cpu_signature *sig)
187 struct microcode_header_intel *mc_hdr = mc;
199 ext_hdr = mc + intel_microcode_get_datasize(mc_hdr) + MC_HEADER_SIZE;
213 * @mc: Pointer to the microcode file contents.
225 int intel_microcode_sanity_check(void *mc, bool print_err, int hdr_type)
228 struct microcode_header_intel *mc_header = mc;
261 ext_header = mc + MC_HEADER_SIZE + data_size;
295 orig_sum += ((u32 *)mc)[i];
325 static void update_ucode_pointer(struct microcode_intel *mc)
333 ucode_patch_va = mc;
339 struct microcode_intel *mc;
341 mc = kvmemdup(patch, size, GFP_KERNEL);
342 if (mc)
343 update_ucode_pointer(mc);
683 struct microcode_intel *mc,
688 if (!mc)
697 if (*cur_rev >= mc->hdr.rev) {
703 native_wrmsrq(MSR_IA32_UCODE_WRITE, (unsigned long)mc->bits);
706 if (rev != mc->hdr.rev)
715 struct microcode_intel *mc = uci->mc;
718 return __apply_microcode(uci, mc, &cur_rev);
775 uci.mc = get_microcode_blob(&uci, true);
776 if (uci.mc)
777 save_microcode_patch(uci.mc);
787 uci.mc = get_microcode_blob(&uci, false);
790 if (uci.mc && apply_microcode_early(&uci) == UCODE_UPDATED) {
800 uci.mc = ucode_patch_va;
801 if (uci.mc)
808 struct ucode_cpu_info uci = { .mc = ucode_patch_va, };
810 if (uci.mc)
823 struct microcode_intel *mc = ucode_patch_late;
830 ret = __apply_microcode(uci, mc, &cur_rev);
873 u8 *new_mc = NULL, *mc = NULL;
896 /* For performance reasons, reuse mc area when possible */
897 if (!mc || mc_size > curr_mc_size) {
898 kvfree(mc);
899 mc = kvmalloc(mc_size, GFP_KERNEL);
900 if (!mc)
905 memcpy(mc, &mc_header, sizeof(mc_header));
906 data = mc + sizeof(mc_header);
908 intel_microcode_sanity_check(mc, true, MC_HEADER_TYPE_MICROCODE) < 0)
914 if (!intel_find_matching_signature(mc, &uci->cpu_sig))
923 new_mc = mc;
925 mc = NULL;
931 kvfree(mc);
939 kvfree(mc);