UefiCpuPkg: Add Cpuid.h include files for CPUID related defines
authorMichael Kinney <michael.d.kinney@intel.com>
Mon, 19 Oct 2015 19:09:15 +0000 (19:09 +0000)
committermdkinney <mdkinney@Edk2>
Mon, 19 Oct 2015 19:09:15 +0000 (19:09 +0000)
Move CPUID related defines from LocalApic.h to Cpuid.h
Update LocalApicLib instances to include Cpuid.h
Update CpuMpPei module to include Cpuid.h

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18633 6f19259b-4bc3-4df7-8a09-765794883524

UefiCpuPkg/CpuMpPei/CpuMpPei.h
UefiCpuPkg/Include/Register/Cpuid.h [new file with mode: 0644]
UefiCpuPkg/Include/Register/LocalApic.h
UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c
UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c

index 19e649e..9325a12 100644 (file)
@@ -22,6 +22,7 @@
 #include <Ppi/SecPlatformInformation2.h>\r
 #include <Ppi/EndOfPeiPhase.h>\r
 \r
+#include <Register/Cpuid.h>\r
 #include <Register/LocalApic.h>\r
 \r
 #include <Library/BaseLib.h>\r
diff --git a/UefiCpuPkg/Include/Register/Cpuid.h b/UefiCpuPkg/Include/Register/Cpuid.h
new file mode 100644 (file)
index 0000000..6730551
--- /dev/null
@@ -0,0 +1,51 @@
+/** @file\r
+CPUID Definitions.\r
+\r
+CPUID definitions based on contents of the Intel(R) 64 and IA-32 Architectures\r
+Software Developer's Manual, Volume 2A, CPUID instruction.\r
+\r
+Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#ifndef __CPUID_H__\r
+#define __CPUID_H__\r
+\r
+//\r
+// Definitions for CPUID instruction\r
+//\r
+#define CPUID_SIGNATURE                         0x0\r
+\r
+#define CPUID_VERSION_INFO                      0x1\r
+\r
+#define CPUID_CACHE_INFO                        0x2\r
+\r
+#define CPUID_SERIAL_NUMBER                     0x3\r
+\r
+#define CPUID_CACHE_PARAMS                      0x4\r
+\r
+#define CPUID_EXTENDED_TOPOLOGY                 0xB\r
+#define   CPUID_EXTENDED_TOPOLOGY_LEVEL_TYPE_INVALID  0x0\r
+#define   CPUID_EXTENDED_TOPOLOGY_LEVEL_TYPE_SMT      0x1\r
+#define   CPUID_EXTENDED_TOPOLOGY_LEVEL_TYPE_CORE     0x2\r
+\r
+#define CPUID_EXTENDED_FUNCTION                 0x80000000\r
+\r
+#define CPUID_EXTENDED_CPU_SIG                  0x80000001\r
+\r
+#define CPUID_BRAND_STRING1                     0x80000002\r
+\r
+#define CPUID_BRAND_STRING2                     0x80000003\r
+\r
+#define CPUID_BRAND_STRING3                     0x80000004\r
+\r
+#define CPUID_VIR_PHY_ADDRESS_SIZE              0x80000008\r
+\r
+#endif\r
index cf335a6..346cce6 100644 (file)
 //\r
 #define MSR_IA32_APIC_BASE_ADDRESS              0x1B\r
 \r
-//\r
-// Definitions for CPUID instruction\r
-//\r
-#define CPUID_SIGNATURE                         0x0\r
-#define CPUID_VERSION_INFO                      0x1\r
-#define CPUID_CACHE_PARAMS                      0x4\r
-#define CPUID_EXTENDED_TOPOLOGY                 0xB\r
-#define   CPUID_EXTENDED_TOPOLOGY_LEVEL_TYPE_INVALID 0x0\r
-#define   CPUID_EXTENDED_TOPOLOGY_LEVEL_TYPE_SMT     0x1\r
-#define   CPUID_EXTENDED_TOPOLOGY_LEVEL_TYPE_CORE    0x2\r
-#define CPUID_EXTENDED_FUNCTION                 0x80000000\r
-#define CPUID_VIR_PHY_ADDRESS_SIZE              0x80000008\r
-\r
 //\r
 // Definition for Local APIC registers and related values\r
 //\r
index 08bcef7..6cf36cb 100644 (file)
@@ -14,6 +14,7 @@
 \r
 **/\r
 \r
+#include <Register/Cpuid.h>\r
 #include <Register/LocalApic.h>\r
 \r
 #include <Library/BaseLib.h>\r
index 1a91116..0503942 100644 (file)
@@ -15,6 +15,7 @@
 \r
 **/\r
 \r
+#include <Register/Cpuid.h>\r
 #include <Register/LocalApic.h>\r
 \r
 #include <Library/BaseLib.h>\r