--- /dev/null
+/*++\r
+\r
+Copyright (c) 2005 - 2006, Intel Corporation \r
+All rights reserved. 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
+Module Name:\r
+\r
+ CpuFuncs.h\r
+\r
+Abstract:\r
+\r
+--*/\r
+\r
+#ifndef _CPU_FUNCS_H_\r
+#define _CPU_FUNCS_H_\r
+\r
+#define EFI_CPUID_SIGNATURE 0x0\r
+#define EFI_CPUID_VERSION_INFO 0x1\r
+#define EFI_CPUID_CACHE_INFO 0x2\r
+#define EFI_CPUID_SERIAL_NUMBER 0x3\r
+#define EFI_CPUID_EXTENDED_FUNCTION 0x80000000\r
+#define EFI_CPUID_EXTENDED_CPU_SIG 0x80000001\r
+#define EFI_CPUID_BRAND_STRING1 0x80000002\r
+#define EFI_CPUID_BRAND_STRING2 0x80000003\r
+#define EFI_CPUID_BRAND_STRING3 0x80000004\r
+\r
+//\r
+// CPUID version information masks\r
+// Note: leaving masks here is for the compatibility\r
+// use EfiCpuVersion (...) instead\r
+//\r
+\r
+#define EFI_CPUID_FAMILY 0x0F00\r
+#define EFI_CPUID_MODEL 0x00F0\r
+#define EFI_CPUID_STEPPING 0x000F\r
+\r
+#define EFI_CPUID_PENTIUM_M 0x0600\r
+#define EFI_CPUID_BANIAS 0x0090\r
+#define EFI_CPUID_DOTHAN 0x00D0\r
+#define EFI_CPUID_NETBURST 0x0F00\r
+\r
+#define EFI_MSR_IA32_PLATFORM_ID 0x17\r
+#define EFI_MSR_IA32_APIC_BASE 0x1B\r
+#define EFI_MSR_EBC_HARD_POWERON 0x2A\r
+#define EFI_MSR_EBC_SOFT_POWERON 0x2B\r
+#define BINIT_DRIVER_DISABLE 0x40\r
+#define INTERNAL_MCERR_DISABLE 0x20\r
+#define INITIATOR_MCERR_DISABLE 0x10\r
+#define EFI_MSR_EBC_FREQUENCY_ID 0x2C\r
+#define EFI_MSR_IA32_BIOS_UPDT_TRIG 0x79\r
+#define EFI_MSR_IA32_BIOS_SIGN_ID 0x8B\r
+#define EFI_MSR_PSB_CLOCK_STATUS 0xCD\r
+#define EFI_APIC_GLOBAL_ENABLE 0x800\r
+#define EFI_MSR_IA32_MISC_ENABLE 0x1A0\r
+#define LIMIT_CPUID_MAXVAL_ENABLE_BIT 0x00400000\r
+#define AUTOMATIC_THERMAL_CONTROL_ENABLE_BIT 0x00000008\r
+#define COMPATIBLE_FPU_OPCODE_ENABLE_BIT 0x00000004\r
+#define LOGICAL_PROCESSOR_PRIORITY_ENABLE_BIT 0x00000002\r
+#define FAST_STRING_ENABLE_BIT 0x00000001\r
+\r
+#define EFI_CACHE_VARIABLE_MTRR_BASE 0x200\r
+#define EFI_CACHE_VARIABLE_MTRR_END 0x20F\r
+#define EFI_CACHE_IA32_MTRR_DEF_TYPE 0x2FF\r
+#define EFI_CACHE_VALID_ADDRESS 0xFFFFFF000\r
+#define EFI_CACHE_MTRR_VALID 0x800\r
+#define EFI_CACHE_FIXED_MTRR_VALID 0x400\r
+#define EFI_MSR_VALID_MASK 0xFFFFFFFFF\r
+\r
+#define EFI_IA32_MTRR_FIX64K_00000 0x250\r
+#define EFI_IA32_MTRR_FIX16K_80000 0x258\r
+#define EFI_IA32_MTRR_FIX16K_A0000 0x259\r
+#define EFI_IA32_MTRR_FIX4K_C0000 0x268\r
+#define EFI_IA32_MTRR_FIX4K_C8000 0x269\r
+#define EFI_IA32_MTRR_FIX4K_D0000 0x26A\r
+#define EFI_IA32_MTRR_FIX4K_D8000 0x26B\r
+#define EFI_IA32_MTRR_FIX4K_E0000 0x26C\r
+#define EFI_IA32_MTRR_FIX4K_E8000 0x26D\r
+#define EFI_IA32_MTRR_FIX4K_F0000 0x26E\r
+#define EFI_IA32_MTRR_FIX4K_F8000 0x26F\r
+\r
+#define EFI_IA32_MCG_CAP 0x179\r
+#define EFI_IA32_MCG_CTL 0x17B\r
+#define EFI_IA32_MC0_CTL 0x400\r
+#define EFI_IA32_MC0_STATUS 0x401\r
+\r
+#define EFI_CACHE_UNCACHEABLE 0\r
+#define EFI_CACHE_WRITECOMBINING 1\r
+#define EFI_CACHE_WRITETHROUGH 4\r
+#define EFI_CACHE_WRITEPROTECTED 5\r
+#define EFI_CACHE_WRITEBACK 6\r
+\r
+//\r
+// Combine f(FamilyId), m(Model), s(SteppingId) to a single 32 bit number\r
+//\r
+#define EfiMakeCpuVersion(f, m, s) \\r
+ (((UINT32) (f) << 16) | ((UINT32) (m) << 8) | ((UINT32) (s)))\r
+\r
+\r
+typedef struct {\r
+ UINT32 HeaderVersion;\r
+ UINT32 UpdateRevision;\r
+ UINT32 Date;\r
+ UINT32 ProcessorId;\r
+ UINT32 Checksum;\r
+ UINT32 LoaderRevision;\r
+ UINT32 ProcessorFlags;\r
+ UINT32 DataSize;\r
+ UINT32 TotalSize;\r
+ UINT8 Reserved[12];\r
+} EFI_CPU_MICROCODE_HEADER;\r
+\r
+typedef struct {\r
+ UINT32 ExtSigCount;\r
+ UINT32 ExtChecksum;\r
+ UINT8 Reserved[12];\r
+ UINT32 ProcessorId;\r
+ UINT32 ProcessorFlags;\r
+ UINT32 Checksum;\r
+} EFI_CPU_MICROCODE_EXT_HEADER;\r
+\r
+typedef struct {\r
+ UINT32 RegEax;\r
+ UINT32 RegEbx;\r
+ UINT32 RegEcx;\r
+ UINT32 RegEdx;\r
+} EFI_CPUID_REGISTER;\r
+\r
+VOID\r
+EfiWriteMsr (\r
+ IN UINT32 Input,\r
+ IN UINT64 Value\r
+ )\r
+/*++ \r
+ \r
+Routine Description: \r
+\r
+ Write Cpu MSR\r
+ \r
+Arguments: \r
+\r
+ Input -The index value to select the register\r
+ Value -The value to write to the selected register \r
+ \r
+Returns: \r
+\r
+ None \r
+ \r
+--*/\r
+;\r
+\r
+UINT64\r
+EfiReadMsr (\r
+ IN UINT32 Input\r
+ )\r
+/*++ \r
+ \r
+Routine Description: \r
+\r
+ Read Cpu MSR.\r
+ \r
+Arguments: \r
+\r
+ Input: -The index value to select the register\r
+ \r
+Returns: \r
+\r
+ Return the read data \r
+ \r
+--*/\r
+;\r
+\r
+VOID\r
+EfiCpuid (\r
+ IN UINT32 RegEax,\r
+ OUT EFI_CPUID_REGISTER *Reg\r
+ )\r
+/*++ \r
+ \r
+Routine Description: \r
+ \r
+ Get the Cpu info by excute the CPUID instruction.\r
+ \r
+Arguments: \r
+\r
+ RegEax -The input value to put into register EAX\r
+ Reg -The Output value \r
+ \r
+Returns: \r
+ \r
+ None \r
+ \r
+--*/\r
+;\r
+\r
+VOID\r
+EfiCpuVersion (\r
+ IN UINT16 *FamilyId, OPTIONAL\r
+ IN UINT8 *Model, OPTIONAL\r
+ IN UINT8 *SteppingId, OPTIONAL\r
+ IN UINT8 *Processor OPTIONAL\r
+ )\r
+/*++\r
+\r
+Routine Description:\r
+ Extract CPU detail version infomation\r
+\r
+Arguments:\r
+ FamilyId - FamilyId, including ExtendedFamilyId\r
+ Model - Model, including ExtendedModel\r
+ SteppingId - SteppingId\r
+ Processor - Processor\r
+\r
+--*/\r
+;\r
+\r
+UINT64\r
+EfiReadTsc (\r
+ VOID\r
+ )\r
+/*++ \r
+ \r
+Routine Description: \r
+\r
+ Read Time stamp.\r
+ \r
+Arguments: \r
+\r
+ None \r
+ \r
+Returns: \r
+\r
+ Return the read data \r
+ \r
+--*/\r
+;\r
+VOID\r
+EfiCpuidExt (\r
+ IN UINT32 RegisterInEax,\r
+ IN UINT32 CacheLevel,\r
+ OUT EFI_CPUID_REGISTER *Regs\r
+ )\r
+/*++ \r
+Routine Description: \r
+ When RegisterInEax != 4, the functionality is the same as EfiCpuid.\r
+ When RegisterInEax == 4, the function return the deterministic cache\r
+ parameters by excuting the CPUID instruction\r
+Arguments: \r
+ RegisterInEax: - The input value to put into register EAX\r
+ CacheLevel: - The deterministic cache level\r
+ Regs: - The Output value \r
+Returns: \r
+ None \r
+--*/\r
+;\r
+\r
+#endif\r
--- /dev/null
+/*++\r
+\r
+Copyright (c) 2005, Intel Corporation \r
+All rights reserved. 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
+Module Name:\r
+\r
+ ProcDep.h\r
+\r
+Abstract:\r
+\r
+ x64 specific Runtime Lib code. At this time there is non. \r
+ IPF has different code due to extra API requirements.\r
+\r
+--*/\r
+\r
+#ifndef _PROC_DEP_H_\r
+#define _PROC_DEP_H_\r
+\r
+\r
+\r
+#endif\r
+++ /dev/null
-/*++\r
-\r
-Copyright (c) 2005 - 2006, Intel Corporation \r
-All rights reserved. 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
-Module Name:\r
-\r
- CpuFuncs.h\r
-\r
-Abstract:\r
-\r
---*/\r
-\r
-#ifndef _CPU_FUNCS_H_\r
-#define _CPU_FUNCS_H_\r
-\r
-#define EFI_CPUID_SIGNATURE 0x0\r
-#define EFI_CPUID_VERSION_INFO 0x1\r
-#define EFI_CPUID_CACHE_INFO 0x2\r
-#define EFI_CPUID_SERIAL_NUMBER 0x3\r
-#define EFI_CPUID_EXTENDED_FUNCTION 0x80000000\r
-#define EFI_CPUID_EXTENDED_CPU_SIG 0x80000001\r
-#define EFI_CPUID_BRAND_STRING1 0x80000002\r
-#define EFI_CPUID_BRAND_STRING2 0x80000003\r
-#define EFI_CPUID_BRAND_STRING3 0x80000004\r
-\r
-//\r
-// CPUID version information masks\r
-// Note: leaving masks here is for the compatibility\r
-// use EfiCpuVersion (...) instead\r
-//\r
-\r
-#define EFI_CPUID_FAMILY 0x0F00\r
-#define EFI_CPUID_MODEL 0x00F0\r
-#define EFI_CPUID_STEPPING 0x000F\r
-\r
-#define EFI_CPUID_PENTIUM_M 0x0600\r
-#define EFI_CPUID_BANIAS 0x0090\r
-#define EFI_CPUID_DOTHAN 0x00D0\r
-#define EFI_CPUID_NETBURST 0x0F00\r
-\r
-#define EFI_MSR_IA32_PLATFORM_ID 0x17\r
-#define EFI_MSR_IA32_APIC_BASE 0x1B\r
-#define EFI_MSR_EBC_HARD_POWERON 0x2A\r
-#define EFI_MSR_EBC_SOFT_POWERON 0x2B\r
-#define BINIT_DRIVER_DISABLE 0x40\r
-#define INTERNAL_MCERR_DISABLE 0x20\r
-#define INITIATOR_MCERR_DISABLE 0x10\r
-#define EFI_MSR_EBC_FREQUENCY_ID 0x2C\r
-#define EFI_MSR_IA32_BIOS_UPDT_TRIG 0x79\r
-#define EFI_MSR_IA32_BIOS_SIGN_ID 0x8B\r
-#define EFI_MSR_PSB_CLOCK_STATUS 0xCD\r
-#define EFI_APIC_GLOBAL_ENABLE 0x800\r
-#define EFI_MSR_IA32_MISC_ENABLE 0x1A0\r
-#define LIMIT_CPUID_MAXVAL_ENABLE_BIT 0x00400000\r
-#define AUTOMATIC_THERMAL_CONTROL_ENABLE_BIT 0x00000008\r
-#define COMPATIBLE_FPU_OPCODE_ENABLE_BIT 0x00000004\r
-#define LOGICAL_PROCESSOR_PRIORITY_ENABLE_BIT 0x00000002\r
-#define FAST_STRING_ENABLE_BIT 0x00000001\r
-\r
-#define EFI_CACHE_VARIABLE_MTRR_BASE 0x200\r
-#define EFI_CACHE_VARIABLE_MTRR_END 0x20F\r
-#define EFI_CACHE_IA32_MTRR_DEF_TYPE 0x2FF\r
-#define EFI_CACHE_VALID_ADDRESS 0xFFFFFF000\r
-#define EFI_CACHE_MTRR_VALID 0x800\r
-#define EFI_CACHE_FIXED_MTRR_VALID 0x400\r
-#define EFI_MSR_VALID_MASK 0xFFFFFFFFF\r
-\r
-#define EFI_IA32_MTRR_FIX64K_00000 0x250\r
-#define EFI_IA32_MTRR_FIX16K_80000 0x258\r
-#define EFI_IA32_MTRR_FIX16K_A0000 0x259\r
-#define EFI_IA32_MTRR_FIX4K_C0000 0x268\r
-#define EFI_IA32_MTRR_FIX4K_C8000 0x269\r
-#define EFI_IA32_MTRR_FIX4K_D0000 0x26A\r
-#define EFI_IA32_MTRR_FIX4K_D8000 0x26B\r
-#define EFI_IA32_MTRR_FIX4K_E0000 0x26C\r
-#define EFI_IA32_MTRR_FIX4K_E8000 0x26D\r
-#define EFI_IA32_MTRR_FIX4K_F0000 0x26E\r
-#define EFI_IA32_MTRR_FIX4K_F8000 0x26F\r
-\r
-#define EFI_IA32_MCG_CAP 0x179\r
-#define EFI_IA32_MCG_CTL 0x17B\r
-#define EFI_IA32_MC0_CTL 0x400\r
-#define EFI_IA32_MC0_STATUS 0x401\r
-\r
-#define EFI_CACHE_UNCACHEABLE 0\r
-#define EFI_CACHE_WRITECOMBINING 1\r
-#define EFI_CACHE_WRITETHROUGH 4\r
-#define EFI_CACHE_WRITEPROTECTED 5\r
-#define EFI_CACHE_WRITEBACK 6\r
-\r
-//\r
-// Combine f(FamilyId), m(Model), s(SteppingId) to a single 32 bit number\r
-//\r
-#define EfiMakeCpuVersion(f, m, s) \\r
- (((UINT32) (f) << 16) | ((UINT32) (m) << 8) | ((UINT32) (s)))\r
-\r
-\r
-typedef struct {\r
- UINT32 HeaderVersion;\r
- UINT32 UpdateRevision;\r
- UINT32 Date;\r
- UINT32 ProcessorId;\r
- UINT32 Checksum;\r
- UINT32 LoaderRevision;\r
- UINT32 ProcessorFlags;\r
- UINT32 DataSize;\r
- UINT32 TotalSize;\r
- UINT8 Reserved[12];\r
-} EFI_CPU_MICROCODE_HEADER;\r
-\r
-typedef struct {\r
- UINT32 ExtSigCount;\r
- UINT32 ExtChecksum;\r
- UINT8 Reserved[12];\r
- UINT32 ProcessorId;\r
- UINT32 ProcessorFlags;\r
- UINT32 Checksum;\r
-} EFI_CPU_MICROCODE_EXT_HEADER;\r
-\r
-typedef struct {\r
- UINT32 RegEax;\r
- UINT32 RegEbx;\r
- UINT32 RegEcx;\r
- UINT32 RegEdx;\r
-} EFI_CPUID_REGISTER;\r
-\r
-VOID\r
-EfiWriteMsr (\r
- IN UINT32 Input,\r
- IN UINT64 Value\r
- )\r
-/*++ \r
- \r
-Routine Description: \r
-\r
- Write Cpu MSR\r
- \r
-Arguments: \r
-\r
- Input -The index value to select the register\r
- Value -The value to write to the selected register \r
- \r
-Returns: \r
-\r
- None \r
- \r
---*/\r
-;\r
-\r
-UINT64\r
-EfiReadMsr (\r
- IN UINT32 Input\r
- )\r
-/*++ \r
- \r
-Routine Description: \r
-\r
- Read Cpu MSR.\r
- \r
-Arguments: \r
-\r
- Input: -The index value to select the register\r
- \r
-Returns: \r
-\r
- Return the read data \r
- \r
---*/\r
-;\r
-\r
-VOID\r
-EfiCpuid (\r
- IN UINT32 RegEax,\r
- OUT EFI_CPUID_REGISTER *Reg\r
- )\r
-/*++ \r
- \r
-Routine Description: \r
- \r
- Get the Cpu info by excute the CPUID instruction.\r
- \r
-Arguments: \r
-\r
- RegEax -The input value to put into register EAX\r
- Reg -The Output value \r
- \r
-Returns: \r
- \r
- None \r
- \r
---*/\r
-;\r
-\r
-VOID\r
-EfiCpuVersion (\r
- IN UINT16 *FamilyId, OPTIONAL\r
- IN UINT8 *Model, OPTIONAL\r
- IN UINT8 *SteppingId, OPTIONAL\r
- IN UINT8 *Processor OPTIONAL\r
- )\r
-/*++\r
-\r
-Routine Description:\r
- Extract CPU detail version infomation\r
-\r
-Arguments:\r
- FamilyId - FamilyId, including ExtendedFamilyId\r
- Model - Model, including ExtendedModel\r
- SteppingId - SteppingId\r
- Processor - Processor\r
-\r
---*/\r
-;\r
-\r
-UINT64\r
-EfiReadTsc (\r
- VOID\r
- )\r
-/*++ \r
- \r
-Routine Description: \r
-\r
- Read Time stamp.\r
- \r
-Arguments: \r
-\r
- None \r
- \r
-Returns: \r
-\r
- Return the read data \r
- \r
---*/\r
-;\r
-VOID\r
-EfiCpuidExt (\r
- IN UINT32 RegisterInEax,\r
- IN UINT32 CacheLevel,\r
- OUT EFI_CPUID_REGISTER *Regs\r
- )\r
-/*++ \r
-Routine Description: \r
- When RegisterInEax != 4, the functionality is the same as EfiCpuid.\r
- When RegisterInEax == 4, the function return the deterministic cache\r
- parameters by excuting the CPUID instruction\r
-Arguments: \r
- RegisterInEax: - The input value to put into register EAX\r
- CacheLevel: - The deterministic cache level\r
- Regs: - The Output value \r
-Returns: \r
- None \r
---*/\r
-;\r
-\r
-#endif\r
+++ /dev/null
-/*++\r
-\r
-Copyright (c) 2005, Intel Corporation \r
-All rights reserved. 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
-Module Name:\r
-\r
- ProcDep.h\r
-\r
-Abstract:\r
-\r
- x64 specific Runtime Lib code. At this time there is non. \r
- IPF has different code due to extra API requirements.\r
-\r
---*/\r
-\r
-#ifndef _PROC_DEP_H_\r
-#define _PROC_DEP_H_\r
-\r
-\r
-\r
-#endif\r