Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
OpenCorePKG_MOD
提交
4b7fc172
O
OpenCorePKG_MOD
项目概览
btwise
/
OpenCorePKG_MOD
通知
26
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
OpenCorePKG_MOD
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
4b7fc172
编写于
6月 07, 2022
作者:
P
PMheart
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
TestKextInject: Reorder patch tests
上级
03f545e8
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
74 addition
and
55 deletion
+74
-55
Utilities/TestKextInject/KextInject.c
Utilities/TestKextInject/KextInject.c
+74
-55
未找到文件。
Utilities/TestKextInject/KextInject.c
浏览文件 @
4b7fc172
...
...
@@ -294,20 +294,20 @@ ApplyKextPatches (
DEBUG
((
DEBUG_WARN
,
"[OK] Success KernelQuirkAppleCpuPmCfgLock
\n
"
));
}
Status
=
PrelinkedContextApplyQuirk
(
Context
,
KernelQuirk
ExternalDiskIcons
,
KernelVersion
);
Status
=
PrelinkedContextApplyQuirk
(
Context
,
KernelQuirk
CustomSmbiosGuid1
,
KernelVersion
);
if
(
EFI_ERROR
(
Status
))
{
DEBUG
((
DEBUG_WARN
,
"[FAIL] Failed to apply KernelQuirk
ExternalDiskIcons
- %r
\n
"
,
Status
));
DEBUG
((
DEBUG_WARN
,
"[FAIL] Failed to apply KernelQuirk
CustomSmbiosGuid1
- %r
\n
"
,
Status
));
FailedToProcess
=
TRUE
;
}
else
{
DEBUG
((
DEBUG_WARN
,
"[OK] Success KernelQuirk
ExternalDiskIcons
\n
"
));
DEBUG
((
DEBUG_WARN
,
"[OK] Success KernelQuirk
CustomSmbiosGuid1
\n
"
));
}
Status
=
PrelinkedContextApplyQuirk
(
Context
,
KernelQuirk
ThirdPartyDrives
,
KernelVersion
);
Status
=
PrelinkedContextApplyQuirk
(
Context
,
KernelQuirk
CustomSmbiosGuid2
,
KernelVersion
);
if
(
EFI_ERROR
(
Status
))
{
DEBUG
((
DEBUG_WARN
,
"[FAIL] Failed to apply KernelQuirk
ThirdPartyDrives
- %r
\n
"
,
Status
));
DEBUG
((
DEBUG_WARN
,
"[FAIL] Failed to apply KernelQuirk
CustomSmbiosGuid2
- %r
\n
"
,
Status
));
FailedToProcess
=
TRUE
;
}
else
{
DEBUG
((
DEBUG_WARN
,
"[OK] Success KernelQuirk
ThirdPartyDrives
\n
"
));
DEBUG
((
DEBUG_WARN
,
"[OK] Success KernelQuirk
CustomSmbiosGuid2
\n
"
));
}
Status
=
PrelinkedContextApplyQuirk
(
Context
,
KernelQuirkDisableIoMapper
,
KernelVersion
);
...
...
@@ -326,84 +326,92 @@ ApplyKextPatches (
DEBUG
((
DEBUG_WARN
,
"[OK] Success KernelQuirkDisableRtcChecksum
\n
"
));
}
Status
=
PrelinkedContextApplyQuirk
(
Context
,
KernelQuirk
IncreasePciBarSize
,
KernelVersion
);
Status
=
PrelinkedContextApplyQuirk
(
Context
,
KernelQuirk
DummyPowerManagement
,
KernelVersion
);
if
(
EFI_ERROR
(
Status
))
{
DEBUG
((
DEBUG_WARN
,
"[FAIL] Failed to apply KernelQuirk
IncreasePciBarSize
- %r
\n
"
,
Status
));
DEBUG
((
DEBUG_WARN
,
"[FAIL] Failed to apply KernelQuirk
DummyPowerManagement
- %r
\n
"
,
Status
));
FailedToProcess
=
TRUE
;
}
else
{
DEBUG
((
DEBUG_WARN
,
"[OK] Success KernelQuirk
IncreasePciBarSize
\n
"
));
DEBUG
((
DEBUG_WARN
,
"[OK] Success KernelQuirk
DummyPowerManagement
\n
"
));
}
Status
=
PrelinkedContextApplyQuirk
(
Context
,
KernelQuirk
DummyPowerManagement
,
KernelVersion
);
Status
=
PrelinkedContextApplyQuirk
(
Context
,
KernelQuirk
ExtendBTFeatureFlags
,
KernelVersion
);
if
(
EFI_ERROR
(
Status
))
{
DEBUG
((
DEBUG_WARN
,
"[FAIL] Failed to apply KernelQuirk
DummyPowerManagement
- %r
\n
"
,
Status
));
DEBUG
((
DEBUG_WARN
,
"[FAIL] Failed to apply KernelQuirk
ExtendBTFeatureFlags
- %r
\n
"
,
Status
));
FailedToProcess
=
TRUE
;
}
else
{
DEBUG
((
DEBUG_WARN
,
"[OK] Success KernelQuirk
DummyPowerManagement
\n
"
));
DEBUG
((
DEBUG_WARN
,
"[OK] Success KernelQuirk
ExtendBTFeatureFlags
\n
"
));
}
Status
=
PrelinkedContextApplyQuirk
(
Context
,
KernelQuirk
XhciPortLimit1
,
KernelVersion
);
Status
=
PrelinkedContextApplyQuirk
(
Context
,
KernelQuirk
ExternalDiskIcons
,
KernelVersion
);
if
(
EFI_ERROR
(
Status
))
{
DEBUG
((
DEBUG_WARN
,
"[FAIL] Failed to apply KernelQuirk
XhciPortLimit1
- %r
\n
"
,
Status
));
DEBUG
((
DEBUG_WARN
,
"[FAIL] Failed to apply KernelQuirk
ExternalDiskIcons
- %r
\n
"
,
Status
));
FailedToProcess
=
TRUE
;
}
else
{
DEBUG
((
DEBUG_WARN
,
"[OK] Success KernelQuirk
XhciPortLimit1
\n
"
));
DEBUG
((
DEBUG_WARN
,
"[OK] Success KernelQuirk
ExternalDiskIcons
\n
"
));
}
Status
=
PrelinkedContextApplyQuirk
(
Context
,
KernelQuirk
XhciPortLimit2
,
KernelVersion
);
Status
=
PrelinkedContextApplyQuirk
(
Context
,
KernelQuirk
ForceAquantiaEthernet
,
KernelVersion
);
if
(
EFI_ERROR
(
Status
))
{
DEBUG
((
DEBUG_WARN
,
"[FAIL] Failed to apply KernelQuirk
XhciPortLimit2
- %r
\n
"
,
Status
));
DEBUG
((
DEBUG_WARN
,
"[FAIL] Failed to apply KernelQuirk
ForceAquantiaEthernet
- %r
\n
"
,
Status
));
FailedToProcess
=
TRUE
;
}
else
{
DEBUG
((
DEBUG_WARN
,
"[OK] Success KernelQuirk
XhciPortLimit2
\n
"
));
DEBUG
((
DEBUG_WARN
,
"[OK] Success KernelQuirk
ForceAquantiaEthernet
\n
"
));
}
Status
=
PrelinkedContextApplyQuirk
(
Context
,
KernelQuirk
XhciPortLimit3
,
KernelVersion
);
Status
=
PrelinkedContextApplyQuirk
(
Context
,
KernelQuirk
ForceSecureBootScheme
,
KernelVersion
);
if
(
EFI_ERROR
(
Status
))
{
DEBUG
((
DEBUG_WARN
,
"[FAIL] Failed to apply KernelQuirk
XhciPortLimit3
- %r
\n
"
,
Status
));
DEBUG
((
DEBUG_WARN
,
"[FAIL] Failed to apply KernelQuirk
ForceSecureBootScheme
- %r
\n
"
,
Status
));
FailedToProcess
=
TRUE
;
}
else
{
DEBUG
((
DEBUG_WARN
,
"[OK] Success KernelQuirk
XhciPortLimit3
\n
"
));
DEBUG
((
DEBUG_WARN
,
"[OK] Success KernelQuirk
ForceSecureBootScheme
\n
"
));
}
Status
=
PrelinkedContextApplyQuirk
(
Context
,
KernelQuirk
CustomSmbiosGuid1
,
KernelVersion
);
Status
=
PrelinkedContextApplyQuirk
(
Context
,
KernelQuirk
IncreasePciBarSize
,
KernelVersion
);
if
(
EFI_ERROR
(
Status
))
{
DEBUG
((
DEBUG_WARN
,
"[FAIL] Failed to apply KernelQuirk
CustomSmbiosGuid1
- %r
\n
"
,
Status
));
DEBUG
((
DEBUG_WARN
,
"[FAIL] Failed to apply KernelQuirk
IncreasePciBarSize
- %r
\n
"
,
Status
));
FailedToProcess
=
TRUE
;
}
else
{
DEBUG
((
DEBUG_WARN
,
"[OK] Success KernelQuirk
CustomSmbiosGuid1
\n
"
));
DEBUG
((
DEBUG_WARN
,
"[OK] Success KernelQuirk
IncreasePciBarSize
\n
"
));
}
Status
=
PrelinkedContextApplyQuirk
(
Context
,
KernelQuirk
CustomSmbiosGuid2
,
KernelVersion
);
Status
=
PrelinkedContextApplyQuirk
(
Context
,
KernelQuirk
SetApfsTrimTimeout
,
KernelVersion
);
if
(
EFI_ERROR
(
Status
))
{
DEBUG
((
DEBUG_WARN
,
"[FAIL] Failed to apply KernelQuirk
CustomSmbiosGuid2
- %r
\n
"
,
Status
));
DEBUG
((
DEBUG_WARN
,
"[FAIL] Failed to apply KernelQuirk
SetApfsTrimTimeout
- %r
\n
"
,
Status
));
FailedToProcess
=
TRUE
;
}
else
{
DEBUG
((
DEBUG_WARN
,
"[OK] Success KernelQuirk
CustomSmbiosGuid2
\n
"
));
DEBUG
((
DEBUG_WARN
,
"[OK] Success KernelQuirk
SetApfsTrimTimeout
\n
"
));
}
Status
=
PrelinkedContextApplyQuirk
(
Context
,
KernelQuirk
ExtendBTFeatureFlag
s
,
KernelVersion
);
Status
=
PrelinkedContextApplyQuirk
(
Context
,
KernelQuirk
ThirdPartyDrive
s
,
KernelVersion
);
if
(
EFI_ERROR
(
Status
))
{
DEBUG
((
DEBUG_WARN
,
"[FAIL] Failed to apply KernelQuirk
ExtendBTFeatureFlag
s - %r
\n
"
,
Status
));
DEBUG
((
DEBUG_WARN
,
"[FAIL] Failed to apply KernelQuirk
ThirdPartyDrive
s - %r
\n
"
,
Status
));
FailedToProcess
=
TRUE
;
}
else
{
DEBUG
((
DEBUG_WARN
,
"[OK] Success KernelQuirk
ExtendBTFeatureFlag
s
\n
"
));
DEBUG
((
DEBUG_WARN
,
"[OK] Success KernelQuirk
ThirdPartyDrive
s
\n
"
));
}
Status
=
PrelinkedContextApplyQuirk
(
Context
,
KernelQuirk
ForceSecureBootScheme
,
KernelVersion
);
Status
=
PrelinkedContextApplyQuirk
(
Context
,
KernelQuirk
XhciPortLimit1
,
KernelVersion
);
if
(
EFI_ERROR
(
Status
))
{
DEBUG
((
DEBUG_WARN
,
"[FAIL] Failed to apply KernelQuirk
ForceSecureBootScheme
- %r
\n
"
,
Status
));
DEBUG
((
DEBUG_WARN
,
"[FAIL] Failed to apply KernelQuirk
XhciPortLimit1
- %r
\n
"
,
Status
));
FailedToProcess
=
TRUE
;
}
else
{
DEBUG
((
DEBUG_WARN
,
"[OK] Success KernelQuirk
ForceSecureBootScheme
\n
"
));
DEBUG
((
DEBUG_WARN
,
"[OK] Success KernelQuirk
XhciPortLimit1
\n
"
));
}
Status
=
PrelinkedContextApplyQuirk
(
Context
,
KernelQuirk
SetApfsTrimTimeout
,
KernelVersion
);
Status
=
PrelinkedContextApplyQuirk
(
Context
,
KernelQuirk
XhciPortLimit2
,
KernelVersion
);
if
(
EFI_ERROR
(
Status
))
{
DEBUG
((
DEBUG_WARN
,
"[FAIL] Failed to apply KernelQuirk
SetApfsTrimTimeout
- %r
\n
"
,
Status
));
DEBUG
((
DEBUG_WARN
,
"[FAIL] Failed to apply KernelQuirk
XhciPortLimit2
- %r
\n
"
,
Status
));
FailedToProcess
=
TRUE
;
}
else
{
DEBUG
((
DEBUG_WARN
,
"[OK] Success KernelQuirkSetApfsTrimTimeout
\n
"
));
DEBUG
((
DEBUG_WARN
,
"[OK] Success KernelQuirkXhciPortLimit2
\n
"
));
}
Status
=
PrelinkedContextApplyQuirk
(
Context
,
KernelQuirkXhciPortLimit3
,
KernelVersion
);
if
(
EFI_ERROR
(
Status
))
{
DEBUG
((
DEBUG_WARN
,
"[FAIL] Failed to apply KernelQuirkXhciPortLimit3 - %r
\n
"
,
Status
));
FailedToProcess
=
TRUE
;
}
else
{
DEBUG
((
DEBUG_WARN
,
"[OK] Success KernelQuirkXhciPortLimit3
\n
"
));
}
}
...
...
@@ -479,48 +487,59 @@ ApplyKernelPatches (
DEBUG
((
DEBUG_WARN
,
"[OK] KernelQuirkAppleXcpmForceBoost patch
\n
"
));
}
Status
=
KernelApplyQuirk
(
KernelQuirkPanicNoKextDump
,
&
Patcher
,
KernelVersion
);
UINTN
RegisterBasePmio
=
0x2008
;
UINT32
RegisterStride
=
4
;
PatchSetPciSerialDevice
(
RegisterBasePmio
,
RegisterStride
);
Status
=
KernelApplyQuirk
(
KernelQuirkCustomPciSerialDevice
,
&
Patcher
,
KernelVersion
);
if
(
EFI_ERROR
(
Status
))
{
DEBUG
((
DEBUG_WARN
,
"[FAIL]
KernelQuirkPanicNoKextDump
- %r
\n
"
,
Status
));
DEBUG
((
DEBUG_WARN
,
"[FAIL]
CustomPciSerialDevice
- %r
\n
"
,
Status
));
FailedToProcess
=
TRUE
;
}
else
{
DEBUG
((
DEBUG_WARN
,
"[OK]
KernelQuirkPanicNoKextDump
patch
\n
"
));
DEBUG
((
DEBUG_WARN
,
"[OK]
CustomPciSerialDevice
patch
\n
"
));
}
Status
=
KernelApplyQuirk
(
KernelQuirk
LapicKernelPanic
,
&
Patcher
,
KernelVersion
);
Status
=
KernelApplyQuirk
(
KernelQuirk
SegmentJettison
,
&
Patcher
,
KernelVersion
);
if
(
EFI_ERROR
(
Status
))
{
DEBUG
((
DEBUG_WARN
,
"[FAIL] KernelQuirk
LapicKernelPanic
- %r
\n
"
,
Status
));
DEBUG
((
DEBUG_WARN
,
"[FAIL] KernelQuirk
SegmentJettison
- %r
\n
"
,
Status
));
FailedToProcess
=
TRUE
;
}
else
{
DEBUG
((
DEBUG_WARN
,
"[OK] KernelQuirk
LapicKernelPanic
patch
\n
"
));
DEBUG
((
DEBUG_WARN
,
"[OK] KernelQuirk
SegmentJettison
patch
\n
"
));
}
Status
=
KernelApplyQuirk
(
KernelQuirk
PowerTimeout
KernelPanic
,
&
Patcher
,
KernelVersion
);
Status
=
KernelApplyQuirk
(
KernelQuirk
Lapic
KernelPanic
,
&
Patcher
,
KernelVersion
);
if
(
EFI_ERROR
(
Status
))
{
DEBUG
((
DEBUG_WARN
,
"[FAIL] KernelQuirk
PowerTimeout
KernelPanic - %r
\n
"
,
Status
));
DEBUG
((
DEBUG_WARN
,
"[FAIL] KernelQuirk
Lapic
KernelPanic - %r
\n
"
,
Status
));
FailedToProcess
=
TRUE
;
}
else
{
DEBUG
((
DEBUG_WARN
,
"[OK] KernelQuirk
PowerTimeout
KernelPanic patch
\n
"
));
DEBUG
((
DEBUG_WARN
,
"[OK] KernelQuirk
Lapic
KernelPanic patch
\n
"
));
}
Status
=
KernelApplyQuirk
(
KernelQuirkSegmentJettison
,
&
Patcher
,
KernelVersion
);
//
// This is not for modern systems. Commenting out.
//
//
// Status = KernelApplyQuirk (KernelQuirkLegacyCommpage, &Patcher, KernelVersion);
// if (EFI_ERROR (Status)) {
// DEBUG ((DEBUG_WARN, "[FAIL] KernelQuirkLegacyCommpage - %r\n", Status));
// FailedToProcess = TRUE;
// } else {
// DEBUG ((DEBUG_WARN, "[OK] KernelQuirkLegacyCommpage patch\n"));
// }
Status
=
KernelApplyQuirk
(
KernelQuirkPanicNoKextDump
,
&
Patcher
,
KernelVersion
);
if
(
EFI_ERROR
(
Status
))
{
DEBUG
((
DEBUG_WARN
,
"[FAIL] KernelQuirk
SegmentJettison
- %r
\n
"
,
Status
));
DEBUG
((
DEBUG_WARN
,
"[FAIL] KernelQuirk
PanicNoKextDump
- %r
\n
"
,
Status
));
FailedToProcess
=
TRUE
;
}
else
{
DEBUG
((
DEBUG_WARN
,
"[OK] KernelQuirk
SegmentJettison
patch
\n
"
));
DEBUG
((
DEBUG_WARN
,
"[OK] KernelQuirk
PanicNoKextDump
patch
\n
"
));
}
UINTN
RegisterBasePmio
=
0x2008
;
UINT32
RegisterStride
=
4
;
PatchSetPciSerialDevice
(
RegisterBasePmio
,
RegisterStride
);
Status
=
KernelApplyQuirk
(
KernelQuirkCustomPciSerialDevice
,
&
Patcher
,
KernelVersion
);
Status
=
KernelApplyQuirk
(
KernelQuirkPowerTimeoutKernelPanic
,
&
Patcher
,
KernelVersion
);
if
(
EFI_ERROR
(
Status
))
{
DEBUG
((
DEBUG_WARN
,
"[FAIL]
CustomPciSerialDevicePmio
- %r
\n
"
,
Status
));
DEBUG
((
DEBUG_WARN
,
"[FAIL]
KernelQuirkPowerTimeoutKernelPanic
- %r
\n
"
,
Status
));
FailedToProcess
=
TRUE
;
}
else
{
DEBUG
((
DEBUG_WARN
,
"[OK]
CustomPciSerialDevicePmio
patch
\n
"
));
DEBUG
((
DEBUG_WARN
,
"[OK]
KernelQuirkPowerTimeoutKernelPanic
patch
\n
"
));
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录