OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
CpuidPatches.c File Reference
#include <Base.h>
#include <IndustryStandard/AppleIntelCpuInfo.h>
#include <Library/BaseMemoryLib.h>
#include <Library/OcDebugLogLib.h>
#include <Library/OcAppleKernelLib.h>
#include <Library/PrintLib.h>
#include <Library/OcFileLib.h>
#include <Library/OcStringLib.h>
#include <Library/UefiLib.h>

Go to the source code of this file.

Data Structures

struct  INTERNAL_CPUID_FN_PATCH
 
struct  INTERNAL_CPUID_PATCH
 
struct  INTERNAL_MICROCODE_PATCH
 

Macros

#define CURRENT_CPU_INFO_CORE_COUNT_OFFSET   1
 

Functions

 STATIC_ASSERT (sizeof(INTERNAL_CPUID_FN_PATCH)==sizeof(mKernelCpuidReplaceDbg), "Check your CPUID patch layout")
 
STATIC EFI_STATUS PatchKernelCpuIdLegacy (IN OUT PATCHER_CONTEXT *Patcher, IN UINT32 KernelVersion, IN OC_CPU_INFO *CpuInfo, IN UINT32 *Data, IN UINT32 *DataMask, IN UINT8 *Start, IN UINT8 *Last)
 
EFI_STATUS PatchKernelCpuId (IN OUT PATCHER_CONTEXT *Patcher, IN OC_CPU_INFO *CpuInfo, IN UINT32 *Data, IN UINT32 *DataMask, IN UINT32 KernelVersion)
 
STATIC UINT8 * PatchMovVar (IN OUT UINT8 *Location, IN BOOLEAN Is32Bit, IN OUT UINT64 *FuncAddr, IN UINT64 VarSymAddr, IN UINT64 Value)
 
STATIC EFI_STATUS PatchProvideCurrentCpuInfoMSR35h (IN OUT PATCHER_CONTEXT *Patcher, IN OC_CPU_INFO *CpuInfo, IN UINT32 KernelVersion)
 
EFI_STATUS PatchProvideCurrentCpuInfo (IN OUT PATCHER_CONTEXT *Patcher, IN OC_CPU_INFO *CpuInfo, IN UINT32 KernelVersion)
 

Variables

struct { 
 
   UINT8   value 
 
   cache_type_t   type 
 
   UINT32   size 
 
   UINT8   associativity 
 
   UINT8   linesize 
 
   UINT8   partitions 
 
mCpuCacheDescriptorValues [] 
 
STATIC CONST UINT8 mKernelCpuIdFindRelNew []
 
STATIC CONST UINT8 mKernelCpuIdFindRelOld []
 
STATIC CONST UINT8 mKernelCpuidFindMcRel []
 
STATIC CONST UINT8 mKernelCpuidReplaceDbg []
 
STATIC UINT8 mProvideCurrentCpuInfoTopologyValidationReplace []
 
STATIC PATCHER_GENERIC_PATCH mProvideCurrentCpuInfoTopologyValidationPatch
 
STATIC UINT8 mProvideCurrentCpuInfoZeroMsrThreadCoreCountFind []
 
STATIC UINT8 mProvideCurrentCpuInfoZeroMsrThreadCoreCountReplace []
 
STATIC PATCHER_GENERIC_PATCH mProvideCurrentCpuInfoZeroMsrThreadCoreCountPatch
 
STATIC CONST UINT8 mProvideCurrentCpuInfoTopologyCoreCountFind []
 
STATIC UINT8 mProvideCurrentCpuInfoTopologyCoreCountReplace []
 
STATIC PATCHER_GENERIC_PATCH mProvideCurrentCpuInfoTopologyCoreCountPatch
 
STATIC CONST UINT8 mProvideCurrentCpuInfoTopologyCorePerPackageV1Find []
 
STATIC CONST UINT8 mProvideCurrentCpuInfoTopologyCorePerPackageV1Replace []
 
STATIC PATCHER_GENERIC_PATCH mProvideCurrentCpuInfoTopologyCorePerPackageV1Patch
 
STATIC CONST UINT8 mProvideCurrentCpuInfoTopologyCorePerPackageV1_5Find []
 
STATIC CONST UINT8 mProvideCurrentCpuInfoTopologyCorePerPackageV1_5Replace []
 
STATIC PATCHER_GENERIC_PATCH mProvideCurrentCpuInfoTopologyCorePerPackageV1_5Patch
 
STATIC CONST UINT8 mProvideCurrentCpuInfoTopologyCorePerPackageV2Find []
 
STATIC CONST UINT8 mProvideCurrentCpuInfoTopologyCorePerPackageV2Mask []
 
STATIC CONST UINT8 mProvideCurrentCpuInfoTopologyCorePerPackageV2Replace []
 
STATIC PATCHER_GENERIC_PATCH mProvideCurrentCpuInfoTopologyCorePerPackageV2Patch
 
STATIC CONST UINT8 mProvideCurrentCpuInfoLeopardSysctlMibInitFind1 []
 
STATIC CONST UINT8 mProvideCurrentCpuInfoLeopardSysctlMibInitMask1 []
 
STATIC UINT8 mProvideCurrentCpuInfoLeopardSysctlMibInitReplace1 []
 
STATIC PATCHER_GENERIC_PATCH mProvideCurrentCpuInfoLeopardSysctlMibInitPatch1
 
STATIC CONST UINT8 mProvideCurrentCpuInfoLeopardSysctlMibInitFind2 []
 
STATIC CONST UINT8 mProvideCurrentCpuInfoLeopardSysctlMibInitMask2 []
 
STATIC UINT8 mProvideCurrentCpuInfoLeopardSysctlMibInitReplace2 []
 
STATIC PATCHER_GENERIC_PATCH mProvideCurrentCpuInfoLeopardSysctlMibInitPatch2
 
STATIC CONST UINT8 mProvideCurrentCpuInfoSnowLeopardSysctlMibInitFind []
 
STATIC CONST UINT8 mProvideCurrentCpuInfoSnowLeopardSysctlMibInitFindMask []
 
STATIC UINT8 mProvideCurrentCpuInfoSnowLeopardSysctlMibInitReplace []
 
STATIC CONST UINT8 mProvideCurrentCpuInfoSnowLeopardSysctlMibInitReplaceMask []
 
STATIC PATCHER_GENERIC_PATCH mProvideCurrentCpuInfoSnowLeopardSysctlMibInitPatch
 

Detailed Description

CPUID kernel patches.

Copyright (c) 2018-2020, vit9696, Goldfish64. All rights reserved.
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.

Definition in file CpuidPatches.c.

Macro Definition Documentation

◆ CURRENT_CPU_INFO_CORE_COUNT_OFFSET

#define CURRENT_CPU_INFO_CORE_COUNT_OFFSET   1

Definition at line 1076 of file CpuidPatches.c.

Function Documentation

◆ PatchKernelCpuId()

EFI_STATUS PatchKernelCpuId ( IN OUT PATCHER_CONTEXT * Patcher,
IN OC_CPU_INFO * CpuInfo,
IN UINT32 * Data,
IN UINT32 * DataMask,
IN UINT32 KernelVersion )

Apply modification to CPUID 1.

Parameters
PatcherPatcher context.
CpuInfoCPU information.
Data4 32-bit integers with CPUID data.
DataMask4 32-bit integers with CPUID enabled overrides data.
KernelVersionCurrent kernel version.
Returns
EFI_SUCCESS on success.

Definition at line 879 of file CpuidPatches.c.

◆ PatchKernelCpuIdLegacy()

STATIC EFI_STATUS PatchKernelCpuIdLegacy ( IN OUT PATCHER_CONTEXT * Patcher,
IN UINT32 KernelVersion,
IN OC_CPU_INFO * CpuInfo,
IN UINT32 * Data,
IN UINT32 * DataMask,
IN UINT8 * Start,
IN UINT8 * Last )

Definition at line 210 of file CpuidPatches.c.

◆ PatchMovVar()

STATIC UINT8 * PatchMovVar ( IN OUT UINT8 * Location,
IN BOOLEAN Is32Bit,
IN OUT UINT64 * FuncAddr,
IN UINT64 VarSymAddr,
IN UINT64 Value )

Definition at line 1109 of file CpuidPatches.c.

◆ PatchProvideCurrentCpuInfo()

EFI_STATUS PatchProvideCurrentCpuInfo ( IN OUT PATCHER_CONTEXT * Patcher,
IN OC_CPU_INFO * CpuInfo,
IN UINT32 KernelVersion )

Apply current CPU information patches.

Parameters
PatcherPatcher context.
CpuInfoCPU information.
KernelVersionCurrent kernel version.
Returns
EFI_SUCCESS on success.

Definition at line 1557 of file CpuidPatches.c.

◆ PatchProvideCurrentCpuInfoMSR35h()

STATIC EFI_STATUS PatchProvideCurrentCpuInfoMSR35h ( IN OUT PATCHER_CONTEXT * Patcher,
IN OC_CPU_INFO * CpuInfo,
IN UINT32 KernelVersion )

Definition at line 1344 of file CpuidPatches.c.

◆ STATIC_ASSERT()

STATIC_ASSERT ( sizeof(INTERNAL_CPUID_FN_PATCH) = =sizeof(mKernelCpuidReplaceDbg),
"Check your CPUID patch layout"  )

Variable Documentation

◆ associativity

UINT8 associativity

Definition at line 34 of file CpuidPatches.c.

◆ linesize

UINT8 linesize

Definition at line 35 of file CpuidPatches.c.

◆ [struct]

STATIC CONST struct { ... } mCpuCacheDescriptorValues[]

◆ mKernelCpuidFindMcRel

STATIC CONST UINT8 mKernelCpuidFindMcRel[]
Initial value:
= {
0xB9, 0x8B, 0x00, 0x00, 0x00,
0x0F, 0x32
}

Definition at line 127 of file CpuidPatches.c.

◆ mKernelCpuIdFindRelNew

STATIC CONST UINT8 mKernelCpuIdFindRelNew[]
Initial value:
= {
0xB9, 0x8B, 0x00, 0x00, 0x00,
0x31, 0xC0,
0x31, 0xD2,
0x0F, 0x30,
0xB8, 0x01, 0x00, 0x00, 0x00,
0x31, 0xDB,
0x31, 0xC9,
0x31, 0xD2,
0x0F, 0xA2
}

Definition at line 100 of file CpuidPatches.c.

◆ mKernelCpuIdFindRelOld

STATIC CONST UINT8 mKernelCpuIdFindRelOld[]
Initial value:
= {
0xB9, 0x8B, 0x00, 0x00, 0x00,
0x31, 0xD2,
0x0F, 0x30,
0xB8, 0x01, 0x00, 0x00, 0x00,
0x31, 0xDB,
0x31, 0xC9,
0x31, 0xD2,
0x0F, 0xA2
}

Definition at line 114 of file CpuidPatches.c.

◆ mKernelCpuidReplaceDbg

STATIC CONST UINT8 mKernelCpuidReplaceDbg[]
Initial value:
= {
0xC7, 0x47, 0x68, 0x11, 0x11, 0x11, 0x11,
0xC6, 0x47, 0x50, 0x22,
0x48, 0xB8, 0x55, 0x55, 0x55, 0x55, 0x44, 0x33, 0x66, 0x77,
0x48, 0x89, 0x47, 0x48,
0x48, 0xB8, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
0x48, 0x89, 0x47, 0x58,
0xC7, 0x87, 0xCC, 0x00, 0x00, 0x00, 0x99, 0x99, 0x99, 0x99,
0xC7, 0x87, 0x88, 0x01, 0x00, 0x00, 0xAA, 0xAA, 0xAA, 0xAA,
0xB8, 0xAA, 0xAA, 0xAA, 0xAA,
0xC3
}

cpu->cpuid_signature = 0x11111111; cpu->cpuid_stepping = 0x22; cpu->cpuid_model = 0x33; cpu->cpuid_family = 0x44; cpu->cpuid_type = 0x55555555; cpu->cpuid_extmodel = 0x66; cpu->cpuid_extfamily = 0x77; cpu->cpuid_features = 0x8888888888888888; cpu->cpuid_logical_per_package = 0x99999999; cpu->cpuid_cpufamily = 0xAAAAAAAA; return 0xAAAAAAAA;

Definition at line 148 of file CpuidPatches.c.

◆ mProvideCurrentCpuInfoLeopardSysctlMibInitFind1

STATIC CONST UINT8 mProvideCurrentCpuInfoLeopardSysctlMibInitFind1[]
Initial value:
= {
0xE8, 0x00, 0x00, 0x00, 0x00,
0xC7, 0x04, 0x24, 0x02, 0x00, 0x00, 0x00
}

Definition at line 1420 of file CpuidPatches.c.

◆ mProvideCurrentCpuInfoLeopardSysctlMibInitFind2

STATIC CONST UINT8 mProvideCurrentCpuInfoLeopardSysctlMibInitFind2[]
Initial value:
= {
0xE8, 0x00, 0x00, 0x00, 0x00,
0xC7, 0x04, 0x24, 0x00, 0x00, 0x00, 0x00
}

Definition at line 1461 of file CpuidPatches.c.

◆ mProvideCurrentCpuInfoLeopardSysctlMibInitMask1

STATIC CONST UINT8 mProvideCurrentCpuInfoLeopardSysctlMibInitMask1[]
Initial value:
= {
0xFF, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFE, 0xFF,0xFF, 0xFF
}

Definition at line 1427 of file CpuidPatches.c.

◆ mProvideCurrentCpuInfoLeopardSysctlMibInitMask2

STATIC CONST UINT8 mProvideCurrentCpuInfoLeopardSysctlMibInitMask2[]
Initial value:
= {
0xFF, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF,0xFF, 0xFF
}

Definition at line 1468 of file CpuidPatches.c.

◆ mProvideCurrentCpuInfoLeopardSysctlMibInitPatch1

STATIC PATCHER_GENERIC_PATCH mProvideCurrentCpuInfoLeopardSysctlMibInitPatch1
Initial value:
= {
.Comment = DEBUG_POINTER ("_sysctl_mib_init Leopard patch 1"),
.Base = "_sysctl_mib_init",
.ReplaceMask = NULL,
.Count = 1,
.Skip = 0,
.Limit = 0
}
STATIC CONST UINT8 mProvideCurrentCpuInfoLeopardSysctlMibInitFind1[]
STATIC CONST UINT8 mProvideCurrentCpuInfoLeopardSysctlMibInitMask1[]
STATIC UINT8 mProvideCurrentCpuInfoLeopardSysctlMibInitReplace1[]

Definition at line 1446 of file CpuidPatches.c.

◆ mProvideCurrentCpuInfoLeopardSysctlMibInitPatch2

STATIC PATCHER_GENERIC_PATCH mProvideCurrentCpuInfoLeopardSysctlMibInitPatch2
Initial value:
= {
.Comment = DEBUG_POINTER ("_sysctl_mib_init Leopard patch 2"),
.Base = "_sysctl_mib_init",
.ReplaceMask = NULL,
.Count = 1,
.Skip = 0,
.Limit = 0
}
STATIC CONST UINT8 mProvideCurrentCpuInfoLeopardSysctlMibInitMask2[]
STATIC UINT8 mProvideCurrentCpuInfoLeopardSysctlMibInitReplace2[]
STATIC CONST UINT8 mProvideCurrentCpuInfoLeopardSysctlMibInitFind2[]

Definition at line 1482 of file CpuidPatches.c.

◆ mProvideCurrentCpuInfoLeopardSysctlMibInitReplace1

STATIC UINT8 mProvideCurrentCpuInfoLeopardSysctlMibInitReplace1[]
Initial value:
= {
0xB8, 0x00, 0x00, 0x00, 0x00,
0x31, 0xD2,
0x90,
0x90,
0x90,
0x90,
0x90
}

Definition at line 1434 of file CpuidPatches.c.

◆ mProvideCurrentCpuInfoLeopardSysctlMibInitReplace2

STATIC UINT8 mProvideCurrentCpuInfoLeopardSysctlMibInitReplace2[]
Initial value:
= {
0xB8, 0x00, 0x00, 0x00, 0x00,
0xC7, 0x04, 0x24, 0x00, 0x00, 0x00, 0x00
}

Definition at line 1475 of file CpuidPatches.c.

◆ mProvideCurrentCpuInfoSnowLeopardSysctlMibInitFind

STATIC CONST UINT8 mProvideCurrentCpuInfoSnowLeopardSysctlMibInitFind[]
Initial value:
= {
0xA3, 0x00, 0x00, 0x00, 0x00,
0x89, 0x15, 0x00, 0x00, 0x00, 0x00,
0xC7, 0x04, 0x24, 0x00, 0x00, 0x00, 0x00,
0xE8, 0x00, 0x00, 0x00, 0x00
}

Definition at line 1497 of file CpuidPatches.c.

◆ mProvideCurrentCpuInfoSnowLeopardSysctlMibInitFindMask

STATIC CONST UINT8 mProvideCurrentCpuInfoSnowLeopardSysctlMibInitFindMask[]
Initial value:
= {
0xFF, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0x00, 0x00, 0x00,0x00,
0xFF, 0xFF, 0xFF, 0x00, 0x00,0x00, 0x00,
0xFF, 0x00, 0x00, 0x00, 0x00
}

Definition at line 1506 of file CpuidPatches.c.

◆ mProvideCurrentCpuInfoSnowLeopardSysctlMibInitPatch

STATIC PATCHER_GENERIC_PATCH mProvideCurrentCpuInfoSnowLeopardSysctlMibInitPatch
Initial value:
= {
.Comment = DEBUG_POINTER ("_sysctl_mib_init Snow Leopard patch"),
.Base = "_sysctl_mib_init",
.Count = 1,
.Skip = 0,
.Limit = 0
}
STATIC CONST UINT8 mProvideCurrentCpuInfoSnowLeopardSysctlMibInitReplaceMask[]
STATIC CONST UINT8 mProvideCurrentCpuInfoSnowLeopardSysctlMibInitFind[]
STATIC CONST UINT8 mProvideCurrentCpuInfoSnowLeopardSysctlMibInitFindMask[]
STATIC UINT8 mProvideCurrentCpuInfoSnowLeopardSysctlMibInitReplace[]

Definition at line 1543 of file CpuidPatches.c.

◆ mProvideCurrentCpuInfoSnowLeopardSysctlMibInitReplace

STATIC UINT8 mProvideCurrentCpuInfoSnowLeopardSysctlMibInitReplace[]
Initial value:
= {
0xA3, 0x00, 0x00, 0x00, 0x00,
0x89, 0x15, 0x00, 0x00, 0x00, 0x00,
0xB8, 0x00, 0x00, 0x00, 0x00,
0x31, 0xD2,
0x90,
0x90,
0x90,
0x90,
0x90
}

Definition at line 1515 of file CpuidPatches.c.

◆ mProvideCurrentCpuInfoSnowLeopardSysctlMibInitReplaceMask

STATIC CONST UINT8 mProvideCurrentCpuInfoSnowLeopardSysctlMibInitReplaceMask[]
Initial value:
= {
0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF,
0xFF,
0xFF,
0xFF,
0xFF,
0xFF
}

Definition at line 1529 of file CpuidPatches.c.

◆ mProvideCurrentCpuInfoTopologyCoreCountFind

STATIC CONST UINT8 mProvideCurrentCpuInfoTopologyCoreCountFind[]
Initial value:
= {
0xB9, 0x35, 0x00, 0x00, 0x00, 0x0F, 0x32
}

Definition at line 1207 of file CpuidPatches.c.

◆ mProvideCurrentCpuInfoTopologyCoreCountPatch

STATIC PATCHER_GENERIC_PATCH mProvideCurrentCpuInfoTopologyCoreCountPatch
Initial value:
= {
.Comment = DEBUG_POINTER ("Set core count to thread count"),
.Base = "_cpuid_set_info",
.Mask = NULL,
.ReplaceMask = NULL,
.Count = 2,
.Skip = 0,
.Limit = 0
}
STATIC CONST UINT8 mProvideCurrentCpuInfoTopologyCoreCountFind[]
STATIC UINT8 mProvideCurrentCpuInfoTopologyCoreCountReplace[]

Definition at line 1219 of file CpuidPatches.c.

◆ mProvideCurrentCpuInfoTopologyCoreCountReplace

STATIC UINT8 mProvideCurrentCpuInfoTopologyCoreCountReplace[]
Initial value:
= {
0xB8, 0x00, 0x00, 0x00, 0x00, 0x31, 0xD2
}

Definition at line 1213 of file CpuidPatches.c.

◆ mProvideCurrentCpuInfoTopologyCorePerPackageV1_5Find

STATIC CONST UINT8 mProvideCurrentCpuInfoTopologyCorePerPackageV1_5Find[]
Initial value:
= {
0xC1, 0xEA, 0x1A, 0xFF, 0xC2, 0x89
}

Definition at line 1268 of file CpuidPatches.c.

◆ mProvideCurrentCpuInfoTopologyCorePerPackageV1_5Patch

STATIC PATCHER_GENERIC_PATCH mProvideCurrentCpuInfoTopologyCorePerPackageV1_5Patch
Initial value:
= {
.Comment = DEBUG_POINTER ("Set core per package count to 128 V1_5"),
.Base = NULL,
.Mask = NULL,
.ReplaceMask = NULL,
.Count = 1,
.Skip = 0,
.Limit = 0
}
STATIC CONST UINT8 mProvideCurrentCpuInfoTopologyCorePerPackageV1_5Replace[]
STATIC CONST UINT8 mProvideCurrentCpuInfoTopologyCorePerPackageV1_5Find[]

Definition at line 1287 of file CpuidPatches.c.

◆ mProvideCurrentCpuInfoTopologyCorePerPackageV1_5Replace

STATIC CONST UINT8 mProvideCurrentCpuInfoTopologyCorePerPackageV1_5Replace[]
Initial value:
= {
0xBA, 0x80, 0x00, 0x00, 0x00, 0x89
}

Definition at line 1278 of file CpuidPatches.c.

◆ mProvideCurrentCpuInfoTopologyCorePerPackageV1Find

STATIC CONST UINT8 mProvideCurrentCpuInfoTopologyCorePerPackageV1Find[]
Initial value:
= {
0xC1, 0xE8, 0x1A, 0xFF, 0xC0, 0x89
}

Definition at line 1234 of file CpuidPatches.c.

◆ mProvideCurrentCpuInfoTopologyCorePerPackageV1Patch

STATIC PATCHER_GENERIC_PATCH mProvideCurrentCpuInfoTopologyCorePerPackageV1Patch
Initial value:
= {
.Comment = DEBUG_POINTER ("Set core per package count to 128 V1"),
.Base = NULL,
.Mask = NULL,
.ReplaceMask = NULL,
.Count = 1,
.Skip = 0,
.Limit = 0
}
STATIC CONST UINT8 mProvideCurrentCpuInfoTopologyCorePerPackageV1Find[]
STATIC CONST UINT8 mProvideCurrentCpuInfoTopologyCorePerPackageV1Replace[]

Definition at line 1253 of file CpuidPatches.c.

◆ mProvideCurrentCpuInfoTopologyCorePerPackageV1Replace

STATIC CONST UINT8 mProvideCurrentCpuInfoTopologyCorePerPackageV1Replace[]
Initial value:
= {
0xB8, 0x80, 0x00, 0x00, 0x00, 0x89
}

Definition at line 1244 of file CpuidPatches.c.

◆ mProvideCurrentCpuInfoTopologyCorePerPackageV2Find

STATIC CONST UINT8 mProvideCurrentCpuInfoTopologyCorePerPackageV2Find[]
Initial value:
= {
0xC1, 0xE8 , 0x1A, 0x83, 0xC0 , 0x01, 0x89
}

Definition at line 1302 of file CpuidPatches.c.

◆ mProvideCurrentCpuInfoTopologyCorePerPackageV2Mask

STATIC CONST UINT8 mProvideCurrentCpuInfoTopologyCorePerPackageV2Mask[]
Initial value:
= {
0xFF, 0xFD, 0xFF, 0xFF, 0xFD, 0xFF, 0xFF
}

Definition at line 1312 of file CpuidPatches.c.

◆ mProvideCurrentCpuInfoTopologyCorePerPackageV2Patch

STATIC PATCHER_GENERIC_PATCH mProvideCurrentCpuInfoTopologyCorePerPackageV2Patch
Initial value:
= {
.Comment = DEBUG_POINTER ("Set core per package count to 128 V2"),
.Base = NULL,
.Count = 1,
.Skip = 0,
.Limit = 0
}
STATIC CONST UINT8 mProvideCurrentCpuInfoTopologyCorePerPackageV2Replace[]
STATIC CONST UINT8 mProvideCurrentCpuInfoTopologyCorePerPackageV2Find[]
STATIC CONST UINT8 mProvideCurrentCpuInfoTopologyCorePerPackageV2Mask[]

Definition at line 1329 of file CpuidPatches.c.

◆ mProvideCurrentCpuInfoTopologyCorePerPackageV2Replace

STATIC CONST UINT8 mProvideCurrentCpuInfoTopologyCorePerPackageV2Replace[]
Initial value:
= {
0xC1, 0xE8 , 0x1A, 0x90, 0xB0 , 0x80, 0x89
}

Definition at line 1318 of file CpuidPatches.c.

◆ mProvideCurrentCpuInfoTopologyValidationPatch

STATIC PATCHER_GENERIC_PATCH mProvideCurrentCpuInfoTopologyValidationPatch
Initial value:
= {
.Comment = DEBUG_POINTER ("ProvideCurrentCpuInfoTopologyValidation"),
.Base = "_x86_validate_topology",
.Find = NULL,
.Mask = NULL,
.ReplaceMask = NULL,
.Count = 1,
.Skip = 0,
.Limit = 0
}
STATIC UINT8 mProvideCurrentCpuInfoTopologyValidationReplace[]

Definition at line 1062 of file CpuidPatches.c.

◆ mProvideCurrentCpuInfoTopologyValidationReplace

STATIC UINT8 mProvideCurrentCpuInfoTopologyValidationReplace[]
Initial value:
= {
0xC3
}

Definition at line 1055 of file CpuidPatches.c.

◆ mProvideCurrentCpuInfoZeroMsrThreadCoreCountFind

STATIC UINT8 mProvideCurrentCpuInfoZeroMsrThreadCoreCountFind[]
Initial value:
= {
0xB9, 0x01, 0x00, 0x01, 0x00
}

Definition at line 1080 of file CpuidPatches.c.

◆ mProvideCurrentCpuInfoZeroMsrThreadCoreCountPatch

STATIC PATCHER_GENERIC_PATCH mProvideCurrentCpuInfoZeroMsrThreadCoreCountPatch
Initial value:
= {
.Comment = DEBUG_POINTER ("ProvideCurrentCpuInfoZeroMsrThreadCoreCount"),
.Base = "_cpuid_set_info",
.Mask = NULL,
.ReplaceMask = NULL,
.Count = 1,
.Skip = 0,
.Limit = 0
}
STATIC UINT8 mProvideCurrentCpuInfoZeroMsrThreadCoreCountReplace[]
STATIC UINT8 mProvideCurrentCpuInfoZeroMsrThreadCoreCountFind[]

Definition at line 1094 of file CpuidPatches.c.

◆ mProvideCurrentCpuInfoZeroMsrThreadCoreCountReplace

STATIC UINT8 mProvideCurrentCpuInfoZeroMsrThreadCoreCountReplace[]
Initial value:
= {
0xB9, 0x00, 0x00, 0x00, 0x00
}

Definition at line 1087 of file CpuidPatches.c.

◆ partitions

UINT8 partitions

Definition at line 36 of file CpuidPatches.c.

◆ size

UINT32 size

Definition at line 33 of file CpuidPatches.c.

◆ type

Definition at line 32 of file CpuidPatches.c.

◆ value

UINT8 value

Definition at line 31 of file CpuidPatches.c.