Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\cpu\microcode\amd.c Create Date:2022-07-28 08:09:15
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:apply_microcode_amd

Proto:static enum ucode_state apply_microcode_amd(int cpu)

Type:enum ucode_state

Parameter:

TypeParameterName
intcpu
671  c = cpu_data(cpu)
678  BUG_ON(These macros fold the SMP functionality into a single CPU system() != cpu)
680  uci = ucode_cpu_info + cpu
682  p = find_patch(cpu)
683  If Not p Then Return UCODE_NFOUND
686  mc_amd = Intel uses only this one
687  mc = Intel uses only this one
689  Access to machine-specific registers (available on 586 and better only)* Note: the rd* operations modify the parameters directly (without using* pointer indirection), this allows gcc to optimize better(AMD64 MSRs. Not complete. See the architecture manual for a more* complete list., rev, dummy)
692  If rev >= patch_id Then
693  ret = UCODE_OK
694  Go to out
697  If __apply_microcode_amd(mc_amd) Then
698  pr_err("CPU%d: update failed for patch_level=0x%08x\n", cpu, patch_id)
700  Return UCODE_ERROR
703  rev = patch_id
704  ret = UCODE_UPDATED
706  pr_info("CPU%d: new patch_level=0x%08x\n", cpu, rev)
708  out :
709  rev = rev
710  microcode = rev
713  If Index into per_cpu list: == Index into per_cpu list: Then microcode = rev
716  Return ret