]> xenbits.xensource.com Git - people/aperard/ovmf.git/commitdiff
MdePkg: Adds AMD Extended CPU topology CPUID
authorAbdul Lateef Attar <AbdulLateef.Attar@amd.com>
Thu, 18 Jan 2024 03:54:08 +0000 (09:24 +0530)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 31 Jan 2024 13:08:29 +0000 (13:08 +0000)
Adds cpuid macro for AMD extended CPU topology.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
Message-Id: <15199aaefbc497bb1ea7b20028c13ebedd8c488b.1705549445.git.AbdulLateef.Attar@amd.com>
Acked-by: Michael D Kinney <michael.d.kinney@intel.com>
Acked-by: Ray Ni <ray.ni@intel.com>
Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
MdePkg/Include/Register/Amd/Cpuid.h

index 44394fc7a4f69a4ab27d22c3e838e6b9cff2288b..add43c40aa475c5a205a550a68f769c98508a9a9 100644 (file)
@@ -6,7 +6,7 @@
   If a register returned is a single 32-bit value, then a data structure is\r
   not provided for that register.\r
 \r
-  Copyright (c) 2017, Advanced Micro Devices. All rights reserved.<BR>\r
+  Copyright (c) 2017 - 2024, Advanced Micro Devices. All rights reserved.<BR>\r
 \r
   SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
@@ -42,6 +42,27 @@ CPUID Signature Information
 /// @}\r
 ///\r
 \r
+/**\r
+  CPUID Extended Topology Enumeration\r
+\r
+  @note\r
+  Reference: AMD64 Architecture Programmer’s Manual Volume 3: General-Purpose and System Instructions,\r
+             Revision 3.35 Appendix E,\r
+  E.4.24 Function 8000_0026—Extended CPU Topology:\r
+    CPUID Fn8000_0026 reports extended topology information for logical processors, including\r
+    asymmetric and heterogenous topology descriptions. Individual logical processors may report\r
+    different values in systems with asynchronous and heterogeneous topologies.\r
+    The topology level is selected by the value passed to the instruction in ECX. To discover the topology\r
+    of a system, software should execute CPUID Fn8000_0026 with increasing ECX values, starting with\r
+    a value of zero, until the returned hierarchy level type (CPUID Fn8000_0026_ECX[LevelType]) is\r
+    equal to zero. It is not guaranteed that all topology level types are present in the system\r
+\r
+  @param   EAX  AMD_CPUID_EXTENDED_TOPOLOGY   (0x80000026)\r
+  @param   ECX  Level number\r
+\r
+**/\r
+#define AMD_CPUID_EXTENDED_TOPOLOGY  0x80000026\r
+\r
 /**\r
   CPUID Extended Processor Signature and Features\r
 \r