Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
OpenCorePKG_MOD
提交
802dcdbf
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,发现更多精彩内容 >>
提交
802dcdbf
编写于
7月 07, 2020
作者:
V
vit9696
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
OcAppleKernelLib: Fix arg order for OcKernelLoadKextsAndReserve
上级
6aac3a2c
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
45 addition
and
4 deletion
+45
-4
Library/OcAppleKernelLib/KextPatcher.c
Library/OcAppleKernelLib/KextPatcher.c
+1
-0
Library/OcAppleKernelLib/PrelinkedContext.c
Library/OcAppleKernelLib/PrelinkedContext.c
+32
-0
Platform/OpenCore/OpenCoreKernel.c
Platform/OpenCore/OpenCoreKernel.c
+12
-4
未找到文件。
Library/OcAppleKernelLib/KextPatcher.c
浏览文件 @
802dcdbf
...
@@ -67,6 +67,7 @@ PatcherInitContextFromBuffer (
...
@@ -67,6 +67,7 @@ PatcherInitContextFromBuffer (
//
//
if
(
!
MachoInitializeContext
(
&
Context
->
MachContext
,
Buffer
,
BufferSize
,
0
))
{
if
(
!
MachoInitializeContext
(
&
Context
->
MachContext
,
Buffer
,
BufferSize
,
0
))
{
DEBUG
((
DEBUG_INFO
,
"OCAK: Patcher init from buffer %p %u has unsupported mach-o
\n
"
,
Buffer
,
BufferSize
));
return
EFI_INVALID_PARAMETER
;
return
EFI_INVALID_PARAMETER
;
}
}
...
...
Library/OcAppleKernelLib/PrelinkedContext.c
浏览文件 @
802dcdbf
...
@@ -212,6 +212,13 @@ InternalConnectExternalSymtab (
...
@@ -212,6 +212,13 @@ InternalConnectExternalSymtab (
"__TEXT_EXEC"
"__TEXT_EXEC"
);
);
if
(
Segment
==
NULL
||
Segment
->
VirtualAddress
<
Segment
->
FileOffset
)
{
if
(
Segment
==
NULL
||
Segment
->
VirtualAddress
<
Segment
->
FileOffset
)
{
DEBUG
((
DEBUG_INFO
,
"OCAK: KC symtab failed locating inner %Lx %Lx (%d)
\n
"
,
Segment
!=
NULL
?
Segment
->
VirtualAddress
:
0
,
Segment
!=
NULL
?
Segment
->
FileOffset
:
0
,
Segment
!=
NULL
));
return
EFI_INVALID_PARAMETER
;
return
EFI_INVALID_PARAMETER
;
}
}
...
@@ -220,10 +227,22 @@ InternalConnectExternalSymtab (
...
@@ -220,10 +227,22 @@ InternalConnectExternalSymtab (
&
Buffer
[
Segment
->
FileOffset
],
&
Buffer
[
Segment
->
FileOffset
],
(
UINT32
)
(
BufferSize
-
Segment
->
FileOffset
),
(
UINT32
)
(
BufferSize
-
Segment
->
FileOffset
),
(
UINT32
)
Segment
->
FileOffset
))
{
(
UINT32
)
Segment
->
FileOffset
))
{
DEBUG
((
DEBUG_INFO
,
"OCAK: KC symtab failed initialising inner %Lx %x
\n
"
,
Segment
->
FileOffset
,
BufferSize
));
return
EFI_INVALID_PARAMETER
;
return
EFI_INVALID_PARAMETER
;
}
}
if
(
!
MachoInitialiseSymtabsExternal64
(
Context
,
InnerContext
))
{
if
(
!
MachoInitialiseSymtabsExternal64
(
Context
,
InnerContext
))
{
DEBUG
((
DEBUG_INFO
,
"OCAK: KC symtab failed getting symtab from inner %Lx %x
\n
"
,
Segment
->
FileOffset
,
BufferSize
));
return
EFI_INVALID_PARAMETER
;
return
EFI_INVALID_PARAMETER
;
}
}
}
}
...
@@ -559,7 +578,20 @@ PrelinkedInjectPrepare (
...
@@ -559,7 +578,20 @@ PrelinkedInjectPrepare (
SegmentEndOffset
=
Context
->
PrelinkedInfoSegment
->
FileOffset
+
Context
->
PrelinkedInfoSegment
->
FileSize
;
SegmentEndOffset
=
Context
->
PrelinkedInfoSegment
->
FileOffset
+
Context
->
PrelinkedInfoSegment
->
FileSize
;
if
(
MACHO_ALIGN
(
SegmentEndOffset
)
==
Context
->
PrelinkedSize
)
{
if
(
MACHO_ALIGN
(
SegmentEndOffset
)
==
Context
->
PrelinkedSize
)
{
DEBUG
((
DEBUG_INFO
,
"OCAK: Reducing prelink size from %X to %X via plist
\n
"
,
Context
->
PrelinkedSize
,
(
UINT32
)
MACHO_ALIGN
(
Context
->
PrelinkedInfoSegment
->
FileOffset
)
));
Context
->
PrelinkedSize
=
(
UINT32
)
MACHO_ALIGN
(
Context
->
PrelinkedInfoSegment
->
FileOffset
);
Context
->
PrelinkedSize
=
(
UINT32
)
MACHO_ALIGN
(
Context
->
PrelinkedInfoSegment
->
FileOffset
);
}
else
{
DEBUG
((
DEBUG_INFO
,
"OCAK:Leaving unchanged prelink size %X due to %LX plist
\n
"
,
Context
->
PrelinkedSize
,
SegmentEndOffset
));
}
}
Context
->
PrelinkedInfoSegment
->
VirtualAddress
=
0
;
Context
->
PrelinkedInfoSegment
->
VirtualAddress
=
0
;
...
...
Platform/OpenCore/OpenCoreKernel.c
浏览文件 @
802dcdbf
...
@@ -320,8 +320,8 @@ OcKernelLoadKextsAndReserve (
...
@@ -320,8 +320,8 @@ OcKernelLoadKextsAndReserve (
DEBUG
((
DEBUG
((
DEBUG_INFO
,
DEBUG_INFO
,
"OC: Kext reservation size
%u
\n
"
,
"OC: Kext reservation size
info %X exe %X
\n
"
,
*
ReservedInfoSize
+
*
ReservedExeSize
*
ReservedInfoSize
,
*
ReservedExeSize
));
));
return
EFI_SUCCESS
;
return
EFI_SUCCESS
;
}
}
...
@@ -694,6 +694,14 @@ OcKernelProcessPrelinked (
...
@@ -694,6 +694,14 @@ OcKernelProcessPrelinked (
));
));
}
}
DEBUG
((
DEBUG_INFO
,
"OC: Prelink size %u kext offset %u reserved %u
\n
"
,
Context
.
PrelinkedSize
,
Context
.
KextsFileOffset
,
ReservedExeSize
));
ASSERT
(
Context
.
PrelinkedSize
-
Context
.
KextsFileOffset
<=
ReservedExeSize
);
ASSERT
(
Context
.
PrelinkedSize
-
Context
.
KextsFileOffset
<=
ReservedExeSize
);
Status
=
PrelinkedInjectComplete
(
&
Context
);
Status
=
PrelinkedInjectComplete
(
&
Context
);
...
@@ -764,8 +772,8 @@ OcKernelFileOpen (
...
@@ -764,8 +772,8 @@ OcKernelFileOpen (
OcKernelLoadKextsAndReserve
(
OcKernelLoadKextsAndReserve
(
mOcStorage
,
mOcStorage
,
mOcConfiguration
,
mOcConfiguration
,
&
Reserved
Info
Size
,
&
Reserved
Exe
Size
,
&
Reserved
Exe
Size
&
Reserved
Info
Size
);
);
LinkedExpansion
=
KcGetSegmentFixupChainsSize
(
ReservedExeSize
);
LinkedExpansion
=
KcGetSegmentFixupChainsSize
(
ReservedExeSize
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录