Revision: 18828
          http://sourceforge.net/p/edk2/code/18828
Author:   vanjeff
Date:     2015-11-17 04:54:19 +0000 (Tue, 17 Nov 2015)
Log Message:
-----------
UefiCpuPkg: Add Cpuid.h include files for CPUID related defines

Move CPUID related defines from LocalApic.h to Cpuid.h
Update LocalApicLib instances to include Cpuid.h
Update CpuMpPei module to include Cpuid.h

(Sync patch r18633 from main trunk.)

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <[email protected]>
Reviewed-by: Jeff Fan <[email protected]>

Revision Links:
--------------
    http://sourceforge.net/p/edk2/code/18633

Modified Paths:
--------------
    branches/UDK2015/UefiCpuPkg/CpuMpPei/CpuMpPei.h
    branches/UDK2015/UefiCpuPkg/Include/Register/LocalApic.h
    branches/UDK2015/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c
    branches/UDK2015/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c

Added Paths:
-----------
    branches/UDK2015/UefiCpuPkg/Include/Register/Cpuid.h

Modified: branches/UDK2015/UefiCpuPkg/CpuMpPei/CpuMpPei.h
===================================================================
--- branches/UDK2015/UefiCpuPkg/CpuMpPei/CpuMpPei.h     2015-11-17 04:53:12 UTC 
(rev 18827)
+++ branches/UDK2015/UefiCpuPkg/CpuMpPei/CpuMpPei.h     2015-11-17 04:54:19 UTC 
(rev 18828)
@@ -22,6 +22,7 @@
 #include <Ppi/SecPlatformInformation2.h>
 #include <Ppi/EndOfPeiPhase.h>
 
+#include <Register/Cpuid.h>
 #include <Register/LocalApic.h>
 
 #include <Library/BaseLib.h>

Added: branches/UDK2015/UefiCpuPkg/Include/Register/Cpuid.h
===================================================================
--- branches/UDK2015/UefiCpuPkg/Include/Register/Cpuid.h                        
        (rev 0)
+++ branches/UDK2015/UefiCpuPkg/Include/Register/Cpuid.h        2015-11-17 
04:54:19 UTC (rev 18828)
@@ -0,0 +1,51 @@
+/** @file
+CPUID Definitions.
+
+CPUID definitions based on contents of the Intel(R) 64 and IA-32 Architectures
+Software Developer's Manual, Volume 2A, CPUID instruction.
+
+Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD 
License
+which accompanies this distribution.  The full text of the license may be 
found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#ifndef __CPUID_H__
+#define __CPUID_H__
+
+//
+// Definitions for CPUID instruction
+//
+#define CPUID_SIGNATURE                         0x0
+
+#define CPUID_VERSION_INFO                      0x1
+
+#define CPUID_CACHE_INFO                        0x2
+
+#define CPUID_SERIAL_NUMBER                     0x3
+
+#define CPUID_CACHE_PARAMS                      0x4
+
+#define CPUID_EXTENDED_TOPOLOGY                 0xB
+#define   CPUID_EXTENDED_TOPOLOGY_LEVEL_TYPE_INVALID  0x0
+#define   CPUID_EXTENDED_TOPOLOGY_LEVEL_TYPE_SMT      0x1
+#define   CPUID_EXTENDED_TOPOLOGY_LEVEL_TYPE_CORE     0x2
+
+#define CPUID_EXTENDED_FUNCTION                 0x80000000
+
+#define CPUID_EXTENDED_CPU_SIG                  0x80000001
+
+#define CPUID_BRAND_STRING1                     0x80000002
+
+#define CPUID_BRAND_STRING2                     0x80000003
+
+#define CPUID_BRAND_STRING3                     0x80000004
+
+#define CPUID_VIR_PHY_ADDRESS_SIZE              0x80000008
+
+#endif

Modified: branches/UDK2015/UefiCpuPkg/Include/Register/LocalApic.h
===================================================================
--- branches/UDK2015/UefiCpuPkg/Include/Register/LocalApic.h    2015-11-17 
04:53:12 UTC (rev 18827)
+++ branches/UDK2015/UefiCpuPkg/Include/Register/LocalApic.h    2015-11-17 
04:54:19 UTC (rev 18828)
@@ -21,19 +21,6 @@
 #define MSR_IA32_APIC_BASE_ADDRESS              0x1B
 
 //
-// Definitions for CPUID instruction
-//
-#define CPUID_SIGNATURE                         0x0
-#define CPUID_VERSION_INFO                      0x1
-#define CPUID_CACHE_PARAMS                      0x4
-#define CPUID_EXTENDED_TOPOLOGY                 0xB
-#define   CPUID_EXTENDED_TOPOLOGY_LEVEL_TYPE_INVALID 0x0
-#define   CPUID_EXTENDED_TOPOLOGY_LEVEL_TYPE_SMT     0x1
-#define   CPUID_EXTENDED_TOPOLOGY_LEVEL_TYPE_CORE    0x2
-#define CPUID_EXTENDED_FUNCTION                 0x80000000
-#define CPUID_VIR_PHY_ADDRESS_SIZE              0x80000008
-
-//
 // Definition for Local APIC registers and related values
 //
 #define XAPIC_ID_OFFSET                         0x20

Modified: branches/UDK2015/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c
===================================================================
--- branches/UDK2015/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c     
2015-11-17 04:53:12 UTC (rev 18827)
+++ branches/UDK2015/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c     
2015-11-17 04:54:19 UTC (rev 18828)
@@ -14,6 +14,7 @@
 
 **/
 
+#include <Register/Cpuid.h>
 #include <Register/LocalApic.h>
 
 #include <Library/BaseLib.h>

Modified: 
branches/UDK2015/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c
===================================================================
--- branches/UDK2015/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c 
2015-11-17 04:53:12 UTC (rev 18827)
+++ branches/UDK2015/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c 
2015-11-17 04:54:19 UTC (rev 18828)
@@ -15,6 +15,7 @@
 
 **/
 
+#include <Register/Cpuid.h>
 #include <Register/LocalApic.h>
 
 #include <Library/BaseLib.h>


------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to