Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Total Number of Cores and Hyper Threading are displayed correctly #8

Merged
merged 4 commits into from
Jan 29, 2022

Conversation

b00t0x
Copy link
Owner

@b00t0x b00t0x commented Jan 29, 2022

Fixes

Total Number of Cores fix

Modify machine_info.physical_cpu_max to change "Total Number of Cores" in System Profiler. It also changes sysctl hw.physicalcpu_max result.

Hyper Threading fix

fix #3.

Add patches_ht.plist to change Hyper Threading status in System Profiler. It also changes sysctl hw.cputhreadtype result.

This patch modifies here

return cpuinfo->thread_count > cpuinfo->core_count; // will be false with ProvideCurrentCpuInfo
↓
return 255 > cpuinfo->core_count; // always true

Note

cpuid_info()->core_count and machdep.cpu.core_count are still unchanged. It can be changed with OpenCore patch, but it causes instability so I don't introduce this change now.

Due to machdep.cpu.core_count is unchanged, About This Mac still shows wrong core count, but this string can be changed easily by RestrictEvents.kext 1.0.7 or higher.

Screenshots

16c24t

Before

16c24t_before

After

16c24t_after

8c24t ( -ctrsmt )

Before

8c24t_before

After

8c24t_after

@b00t0x b00t0x merged commit 46f2b42 into master Jan 29, 2022
@b00t0x b00t0x deleted the fix_cpu_max branch January 29, 2022 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HT core support in XNU
1 participant