TianoCore EDK2 master
Loading...
Searching...
No Matches
Cpuid.h File Reference

Go to the source code of this file.

Data Structures

union  CPUID_AMD_EXTENDED_CPU_SIG_EAX
 
union  CPUID_AMD_EXTENDED_CPU_SIG_EBX
 
union  CPUID_AMD_EXTENDED_CPU_SIG_ECX
 
union  CPUID_AMD_EXTENDED_CPU_SIG_EDX
 
union  CPUID_AMD_VIR_PHY_ADDRESS_SIZE_EAX
 
union  CPUID_AMD_VIR_PHY_ADDRESS_SIZE_EBX
 
union  CPUID_AMD_VIR_PHY_ADDRESS_SIZE_ECX
 
union  CPUID_AMD_PROCESSOR_TOPOLOGY_EAX
 
union  CPUID_AMD_PROCESSOR_TOPOLOGY_EBX
 
union  CPUID_AMD_PROCESSOR_TOPOLOGY_ECX
 
union  CPUID_MEMORY_ENCRYPTION_INFO_EAX
 
union  CPUID_MEMORY_ENCRYPTION_INFO_EBX
 
union  CPUID_MEMORY_ENCRYPTION_INFO_ECX
 
union  CPUID_MEMORY_ENCRYPTION_INFO_EDX
 

Macros

#define AMD_CPUID_EXTENDED_TOPOLOGY   0x80000026
 
#define CPUID_AMD_PROCESSOR_TOPOLOGY   0x8000001E
 
#define CPUID_MEMORY_ENCRYPTION_INFO   0x8000001F
 
#define CPUID_SIGNATURE_AUTHENTIC_AMD_EBX   SIGNATURE_32 ('A', 'u', 't', 'h')
 
#define CPUID_SIGNATURE_AUTHENTIC_AMD_EDX   SIGNATURE_32 ('e', 'n', 't', 'i')
 
#define CPUID_SIGNATURE_AUTHENTIC_AMD_ECX   SIGNATURE_32 ('c', 'A', 'M', 'D')
 

Detailed Description

CPUID leaf definitions.

Provides defines for CPUID leaf indexes. Data structures are provided for registers returned by a CPUID leaf that contain one or more bit fields. If a register returned is a single 32-bit value, then a data structure is not provided for that register.

Copyright (c) 2017 - 2024, Advanced Micro Devices. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Specification Reference:
AMD64 Architecture Programming Manual volume 2, March 2024

Definition in file Cpuid.h.

Macro Definition Documentation

◆ AMD_CPUID_EXTENDED_TOPOLOGY

#define AMD_CPUID_EXTENDED_TOPOLOGY   0x80000026

CPUID Extended Topology Enumeration

Note
Reference: AMD64 Architecture Programmer's Manual Volume 3: General-Purpose and System Instructions, Revision 3.35 Appendix E, E.4.24 Function 8000_0026-Extended CPU Topology: CPUID Fn8000_0026 reports extended topology information for logical processors, including asymmetric and heterogenous topology descriptions. Individual logical processors may report different values in systems with asynchronous and heterogeneous topologies. The topology level is selected by the value passed to the instruction in ECX. To discover the topology of a system, software should execute CPUID Fn8000_0026 with increasing ECX values, starting with a value of zero, until the returned hierarchy level type (CPUID Fn8000_0026_ECX[LevelType]) is equal to zero. It is not guaranteed that all topology level types are present in the system
Parameters
EAXAMD_CPUID_EXTENDED_TOPOLOGY (0x80000026)
ECXLevel number

Definition at line 64 of file Cpuid.h.

◆ CPUID_AMD_PROCESSOR_TOPOLOGY

#define CPUID_AMD_PROCESSOR_TOPOLOGY   0x8000001E

CPUID AMD Processor Topology

Parameters
EAXCPUID_AMD_PROCESSOR_TOPOLOGY (0x8000001E)
Return values
EAXExtended APIC ID described by the type CPUID_AMD_PROCESSOR_TOPOLOGY_EAX.
EBXCore Identifiers described by the type CPUID_AMD_PROCESSOR_TOPOLOGY_EBX.
ECXNode Identifiers described by the type CPUID_AMD_PROCESSOR_TOPOLOGY_ECX.
EDXReserved.

Definition at line 540 of file Cpuid.h.

◆ CPUID_MEMORY_ENCRYPTION_INFO

#define CPUID_MEMORY_ENCRYPTION_INFO   0x8000001F

CPUID Memory Encryption Information

Parameters
EAXCPUID_MEMORY_ENCRYPTION_INFO (0x8000001F)
Return values
EAXReturns the memory encryption feature support status.
EBXIf memory encryption feature is present then return the page table bit number used to enable memory encryption support and reducing of physical address space in bits.
ECXReturns number of encrypted guest supported simultaneously.
EDXReturns minimum SEV enabled and SEV disabled ASID.

Example usage

UINT32 Eax;
UINT32 Ebx;
UINT32 Ecx;
UINT32 Edx;
AsmCpuid (CPUID_MEMORY_ENCRYPTION_INFO, &Eax, &Ebx, &Ecx, &Edx);
#define CPUID_MEMORY_ENCRYPTION_INFO
Definition: Cpuid.h:641
UINT32 EFIAPI AsmCpuid(IN UINT32 Index, OUT UINT32 *RegisterEax OPTIONAL, OUT UINT32 *RegisterEbx OPTIONAL, OUT UINT32 *RegisterEcx OPTIONAL, OUT UINT32 *RegisterEdx OPTIONAL)
Definition: CpuId.c:36

Definition at line 641 of file Cpuid.h.

◆ CPUID_SIGNATURE_AUTHENTIC_AMD_EBX

#define CPUID_SIGNATURE_AUTHENTIC_AMD_EBX   SIGNATURE_32 ('A', 'u', 't', 'h')

CPUID Signature Information

Parameters
EAXCPUID_SIGNATURE (0x00)
Return values
EAXReturns the highest value the CPUID instruction recognizes for returning basic processor information. The value is returned is processor specific.
EBXFirst 4 characters of a vendor identification string.
ECXLast 4 characters of a vendor identification string.
EDXMiddle 4 characters of a vendor identification string. CPUID signature values returned by AMD processors

Definition at line 38 of file Cpuid.h.

◆ CPUID_SIGNATURE_AUTHENTIC_AMD_ECX

#define CPUID_SIGNATURE_AUTHENTIC_AMD_ECX   SIGNATURE_32 ('c', 'A', 'M', 'D')

Definition at line 40 of file Cpuid.h.

◆ CPUID_SIGNATURE_AUTHENTIC_AMD_EDX

#define CPUID_SIGNATURE_AUTHENTIC_AMD_EDX   SIGNATURE_32 ('e', 'n', 't', 'i')

Definition at line 39 of file Cpuid.h.