2 CPUID leaf definitions.
4 Provides defines for CPUID leaf indexes. Data structures are provided for
5 registers returned by a CPUID leaf that contain one or more bit fields.
6 If a register returned is a single 32-bit value, then a data structure is
7 not provided for that register.
9 Copyright (c) 2017, Advanced Micro Devices. All rights reserved.<BR>
10 This program and the accompanying materials are licensed and made available
11 under the terms and conditions of the BSD License which accompanies this
12 distribution. The full text of the license may be found at
13 http://opensource.org/licenses/bsd-license.php
15 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
16 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 @par Specification Reference:
19 AMD64 Architecture Programming Manaul volume 2, March 2017, Sections 15.34
23 #ifndef __AMD_CPUID_H__
24 #define __AMD_CPUID_H__
28 Memory Encryption Information
30 @param EAX CPUID_MEMORY_ENCRYPTION_INFO (0x8000001F)
32 @retval EAX Returns the memory encryption feature support status.
33 @retval EBX If memory encryption feature is present then return
34 the page table bit number used to enable memory encryption support
35 and reducing of physical address space in bits.
36 @retval ECX Returns number of encrypted guest supported simultaneosuly.
37 @retval EDX Returns minimum SEV enabled and SEV disbled ASID..
46 AsmCpuid (CPUID_MEMORY_ENCRYPTION_INFO, &Eax, &Ebx, &Ecx, &Edx);
50 #define CPUID_MEMORY_ENCRYPTION_INFO 0x8000001F
53 CPUID Memory Encryption support information EAX for CPUID leaf
54 #CPUID_MEMORY_ENCRYPTION_INFO.
58 /// Individual bit fields
62 /// [Bit 0] Secure Memory Encryption (Sme) Support
67 /// [Bit 1] Secure Encrypted Virtualization (Sev) Support
72 /// [Bit 2] Page flush MSR support
74 UINT32 PageFlushMsrBit
:1;
77 /// [Bit 3] Encrypted state support
82 /// [Bit 4:31] Reserved
84 UINT32 ReservedBits
:28;
87 /// All bit fields as a 32-bit value
90 } CPUID_MEMORY_ENCRYPTION_INFO_EAX
;
93 CPUID Memory Encryption support information EBX for CPUID leaf
94 #CPUID_MEMORY_ENCRYPTION_INFO.
98 /// Individual bit fields
102 /// [Bit 0:5] Page table bit number used to enable memory encryption
107 /// [Bit 6:11] Reduction of system physical address space bits when memory encryption is enabled
109 UINT32 ReducedPhysBits
:5;
112 /// [Bit 12:31] Reserved
114 UINT32 ReservedBits
:21;
117 /// All bit fields as a 32-bit value
120 } CPUID_MEMORY_ENCRYPTION_INFO_EBX
;
123 CPUID Memory Encryption support information ECX for CPUID leaf
124 #CPUID_MEMORY_ENCRYPTION_INFO.
128 /// Individual bit fields
132 /// [Bit 0:31] Number of encrypted guest supported simultaneously
137 /// All bit fields as a 32-bit value
140 } CPUID_MEMORY_ENCRYPTION_INFO_ECX
;
143 CPUID Memory Encryption support information EDX for CPUID leaf
144 #CPUID_MEMORY_ENCRYPTION_INFO.
148 /// Individual bit fields
152 /// [Bit 0:31] Minimum SEV enabled, SEV-ES disabled ASID
157 /// All bit fields as a 32-bit value
160 } CPUID_MEMORY_ENCRYPTION_INFO_EDX
;