函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\cpu\intel.c Create Date:2022-07-27 08:57:49
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:detect_tme

函数原型:static void detect_tme(struct cpuinfo_x86 *c)

返回类型:void

参数:

类型参数名称
struct cpuinfo_x86 *c
566  keyid_bits等于0, nr_keyids等于0
567  tme_activate_cpu0等于0
569  rdmsrl(MSR_IA32_TME_ACTIVATE, tme_activate)
571  如果mktme_status不等于MKTME_UNINITIALIZED
572  如果tme_activate不等于tme_activate_cpu0
574  pr_err_once("x86/tme: configuration is inconsistent between CPUs\n")
575  pr_err_once("x86/tme: MKTME is not usable\n")
580  否则
581  tme_activate_cpu0等于tme_activate
584  如果非Helpers to access TME_ACTIVATE MSR (tme_activate)或非TME_ACTIVATE_ENABLED(tme_activate)则
585  pr_info_once("x86/tme: not enabled by BIOS\n")
586  mktme_status等于MKTME_DISABLED
587  返回
590  如果mktme_status不等于MKTME_UNINITIALIZED则转到:detect_keyid_bits
593  打印信息("x86/tme: enabled by BIOS\n")
595  tme_policy等于Bits 7:4 (tme_activate)
596  如果tme_policy不等于TME_ACTIVATE_POLICY_AES_XTS_128打印警告信息("x86/tme: Unknown policy is active: %#llx\n", tme_policy)
599  tme_crypto_algs等于Bits 63:48 (tme_activate)
600  如果非tme_crypto_algs按位与TME_ACTIVATE_CRYPTO_AES_XTS_128的值则
601  打印错误信息("x86/mktme: No known encryption algorithm is supported: %#llx\n", tme_crypto_algs)
603  mktme_status等于MKTME_DISABLED
605  detect_keyid_bits :
606  keyid_bits等于Bits 35:32 (tme_activate)
607  nr_keyids等于1UL左移keyid_bits位的值减1
608  如果nr_keyids
609  pr_info_once("x86/mktme: enabled by BIOS\n")
610  pr_info_once("x86/mktme: %d KeyIDs available\n", nr_keyids)
611  否则
612  pr_info_once("x86/mktme: disabled by BIOS\n")
615  如果mktme_status恒等于MKTME_UNINITIALIZED
617  mktme_status等于Values for mktme_status (SW only construct)
624  x86_phys_bits减等于keyid_bits
调用者
名称描述
init_intel