函数源码

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source File:arch\x86\kernel\cpu\microcode\intel.c Create Date:2022-07-27 09:08:37
首页 Copyright©Brick

623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
int __init save_microcode_in_initrd_intel(void)
{
    struct ucode_cpu_info uci;
    struct cpio_data cp;
 
    /*
     * initrd is going away, clear patch ptr. We will scan the microcode one
     * last time before jettisoning and save a patch, if found. Then we will
     * update that pointer too, with a stable patch address to use when
     * resuming the cores.
     */
    intel_ucode_patch = NULL;
 
    if (!load_builtin_intel_microcode(&cp))
        cp = find_microcode_in_initrd(ucode_path, false);
 
    if (!(cp.data && cp.size))
        return 0;
 
    collect_cpu_info_early(&uci);
 
    scan_microcode(cp.data, cp.size, &uci, true);
 
    show_saved_mc();
 
    return 0;
}