Skip to content

Instantly share code, notes, and snippets.

@b00t0x
Last active January 10, 2022 15:40
Show Gist options
  • Save b00t0x/a13cefd4644e9d6d57908ce3420c3002 to your computer and use it in GitHub Desktop.
Save b00t0x/a13cefd4644e9d6d57908ce3420c3002 to your computer and use it in GitHub Desktop.
CpuTopologySync for 16c24t, 8c24t, 8c16t(HT disabled+E-Core) recognition ( ProvideCurrentCpuInfo=true required )
moved to https://github.com/b00t0x/CpuTopologyRebuild
diff --git a/RestrictEvents/RestrictEvents.cpp b/RestrictEvents/RestrictEvents.cpp
index 8d56ebb..8749170 100644
--- a/RestrictEvents/RestrictEvents.cpp
+++ b/RestrictEvents/RestrictEvents.cpp
@@ -14,6 +14,7 @@
#include <Headers/kern_policy.hpp>
extern "C" {
+#include <i386/cpuid.h>
#include <i386/pmCPU.h>
}
@@ -293,7 +294,7 @@ struct RestrictEventsPolicy {
* Compute CPU brand string patch
*/
static void calculatePatchedBrandString() {
- auto cc = getCoreCount();
+ auto cc = cpuid_info()->core_count;
switch (cc) {
case 1:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment