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:22
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:AMD microcode firmware naming convention, up to family 15h they are in* the legacy file:* amd-ucode/microcode_amd.bin* This legacy file is always smaller than 2K in size.* Beginning with family 15h, they are in family-specific firmware files:

Proto:static enum ucode_state request_microcode_amd(int cpu, struct device *device, bool refresh_fw)

Type:enum ucode_state

Parameter:

TypeParameterName
intcpu
struct device *device
boolrefresh_fw
891  fw_name[36] = "amd-ucode/microcode_amd.bin"
892  c = cpu_data(cpu)
893  bsp = Index into per_cpu list: == Index into per_cpu list:
894  ret = UCODE_NFOUND
898  If Not refresh_fw || Not bsp Then Return UCODE_OK
901  If CPU family >= 0x15 Then snprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
904  If request_firmware_direct( & fw, (constchar * )fw_name, device) Then
905  pr_debug("failed to load file %s\n", fw_name)
906  Go to out
909  ret = UCODE_ERROR
910  If Not Check whether there is a valid microcode container file at the beginning* of @buf of size @buf_size. Set @early to use this function in the early path. Then Go to fw_release
913  ret = load_microcode_amd(bsp, CPU family , data, size)
915  fw_release :
916  release_firmware(fw)
918  out :
919  Return ret