Function report |
Source Code:arch\x86\kernel\cpu\intel.c |
Create Date:2022-07-28 07:57:26 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:detect_tme
Proto:static void detect_tme(struct cpuinfo_x86 *c)
Type:void
Parameter:
Type | Parameter | Name |
---|---|---|
struct cpuinfo_x86 * | c |
566 | keyid_bits = 0 , nr_keyids = 0 |
567 | tme_activate_cpu0 = 0 |
571 | If mktme_status != MKTME_UNINITIALIZED Then |
572 | If tme_activate != tme_activate_cpu0 Then |
574 | pr_err_once("x86/tme: configuration is inconsistent between CPUs\n") |
575 | pr_err_once("x86/tme: MKTME is not usable\n") |
576 | mktme_status = MKTME_DISABLED |
580 | Else |
584 | If Not Helpers to access TME_ACTIVATE MSR (tme_activate) || Not TME_ACTIVATE_ENABLED(tme_activate) Then |
590 | If mktme_status != MKTME_UNINITIALIZED Then Go to detect_keyid_bits |
593 | pr_info("x86/tme: enabled by BIOS\n") |
595 | tme_policy = Bits 7:4 (tme_activate) |
596 | If tme_policy != TME_ACTIVATE_POLICY_AES_XTS_128 Then pr_warn("x86/tme: Unknown policy is active: %#llx\n", tme_policy) |
599 | tme_crypto_algs = Bits 63:48 (tme_activate) |
600 | If Not (tme_crypto_algs & TME_ACTIVATE_CRYPTO_AES_XTS_128) Then |
601 | pr_err("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 | If nr_keyids Then |
609 | pr_info_once("x86/mktme: enabled by BIOS\n") |
610 | pr_info_once("x86/mktme: %d KeyIDs available\n", nr_keyids) |
611 | Else |
612 | pr_info_once("x86/mktme: disabled by BIOS\n") |
615 | If mktme_status == MKTME_UNINITIALIZED Then |
624 | x86_phys_bits -= keyid_bits |
Name | Describe |
---|---|
init_intel |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |