提交 24214b8a 编写于 作者: P PMheart

OcAppleKernelLib: macOS 12.0 support for AppleXcpmForceBoost

closes https://github.com/acidanthera/bugtracker/issues/1685
上级 80c8dec5
......@@ -448,6 +448,14 @@ mPerfCtrlFind2[] = {
0x0F, 0x30 ///< wrmsr
};
STATIC
UINT8
mPerfCtrlFind3[] = {
0xB9, 0x99, 0x01, 0x00, 0x00, ///< mov ecx, 199h
0x4C, 0x89, 0xF0, ///< mov rax, r14
0x0F, 0x30 ///< wrmsr
};
STATIC
UINT8
mPerfCtrlMax[] = {
......@@ -487,7 +495,8 @@ PatchAppleXcpmForceBoost (
&& Current[2] == mPerfCtrlFind1[2]
&& Current[3] == mPerfCtrlFind1[3]) {
if (CompareMem (&Current[4], &mPerfCtrlFind1[4], sizeof (mPerfCtrlFind1) - 4) == 0
|| CompareMem (&Current[4], &mPerfCtrlFind2[4], sizeof (mPerfCtrlFind2) - 4) == 0) {
|| CompareMem (&Current[4], &mPerfCtrlFind2[4], sizeof (mPerfCtrlFind2) - 4) == 0
|| CompareMem (&Current[4], &mPerfCtrlFind3[4], sizeof (mPerfCtrlFind3) - 4) == 0) {
break;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册