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

Name:Check whether there is a valid, non-truncated CPU equivalence table at the* beginning of @buf of size @buf_size. Set @early to use this function in the* early path.

Proto:static bool verify_equivalence_table(const u8 *buf, size_t buf_size, bool early)

Type:bool

Parameter:

TypeParameterName
const u8 *buf
size_tbuf_size
boolearly
118  hdr = buf
121  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 Return false
124  cont_type = hdr[1]
125  If cont_type != UCODE_EQUIV_CPU_TABLE_TYPE Then
126  If Not early Then pr_debug("Wrong microcode container equivalence table type: %u.\n", cont_type)
130  Return false
133  buf_size -= CONTAINER_HDR_SZ
135  equiv_tbl_len = hdr[2]
136  If equiv_tbl_len < sizeof(structequiv_cpu_entry) || buf_size < equiv_tbl_len Then
138  If Not early Then pr_debug("Truncated equivalence table.\n")
141  Return false
144  Return true
Caller
NameDescribe
parse_containerThis scans the ucode blob for the proper container as we can have multiple* containers glued together. Returns the equivalence ID from the equivalence* table or 0 if none found.* Returns the amount of bytes consumed while scanning. @desc contains all the
install_equiv_cpu_table