Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\cpu\microcode\core.c Create Date:2022-07-28 08:07:54
Last Modify:2020-03-16 20:13:29 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:microcode_init

Proto:int __init microcode_init(void)

Type:int

Parameter:Nothing

838  c = common cpu data for all cpus
841  If dis_ucode_ldr Then Return -EINVAL
844  If CPU vendor == X86_VENDOR_INTEL Then microcode_ops = init_intel_microcode()
846  Else if CPU vendor == X86_VENDOR_AMD Then microcode_ops = init_amd_microcode()
848  Else pr_err("no support for this CPU vendor\n")
851  If Not microcode_ops Then Return -ENODEV
854  ake device for request_firmware = platform_device_register_simple - add a platform-level device and its resources*@name: base name of the device we're adding*@id: instance id*@res: set of resources that needs to be allocated for the device*@num: number of resources* This function creates
856  If IS_ERR(ake device for request_firmware ) Then Return PTR_ERR(ake device for request_firmware )
859  get_online_cpus()
860  mutex_lock( & Synchronization.* All non cpu-hotplug-callback call sites use:* - microcode_mutex to synchronize with each other;* - get/put_online_cpus() to synchronize with* the cpu-hotplug-callback call sites.* We guarantee that only a single cpu is being)
862  error = subsys_interface_register( & mc_cpu_interface)
863  If Not error Then perf_check_microcode()
865  mutex_unlock( & Synchronization.* All non cpu-hotplug-callback call sites use:* - microcode_mutex to synchronize with each other;* - get/put_online_cpus() to synchronize with* the cpu-hotplug-callback call sites.* We guarantee that only a single cpu is being)
866  put_online_cpus()
868  If error Then Go to out_pdev
871  error = sysfs_create_group( & kobj, & cpu_root_microcode_group)
874  If error Then
875  pr_err("Error creating microcode group!\n")
876  Go to out_driver
879  error = microcode_dev_init()
880  If error Then Go to out_ucode_group
883  register_syscore_ops( & mc_syscore_ops)
884  puhp_setup_state_nocalls - Setup hotplug state callbacks without calling the* callbacks*@state: The state for which the calls are installed*@name: Name of the callback
886  puhp_setup_state_nocalls - Setup hotplug state callbacks without calling the* callbacks*@state: The state for which the calls are installed*@name: Name of the callback
889  pr_info("Microcode Update Driver: v%s.", DRIVER_VERSION)
891  Return 0
893  out_ucode_group :
894  sysfs_remove_group( & kobj, & cpu_root_microcode_group)
897  out_driver :
898  get_online_cpus()
899  mutex_lock( & Synchronization.* All non cpu-hotplug-callback call sites use:* - microcode_mutex to synchronize with each other;* - get/put_online_cpus() to synchronize with* the cpu-hotplug-callback call sites.* We guarantee that only a single cpu is being)
901  subsys_interface_unregister( & mc_cpu_interface)
903  mutex_unlock( & Synchronization.* All non cpu-hotplug-callback call sites use:* - microcode_mutex to synchronize with each other;* - get/put_online_cpus() to synchronize with* the cpu-hotplug-callback call sites.* We guarantee that only a single cpu is being)
904  put_online_cpus()
906  out_pdev :
907  platform_device_unregister(ake device for request_firmware )
908  Return error