Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
OpenCorePKG_MOD
提交
18a231ee
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,发现更多精彩内容 >>
提交
18a231ee
编写于
7月 22, 2022
作者:
J
John Davis
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
OcAppleKernelLib: Inject only current arch during cacheless boot
上级
e7ad34e1
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
25 addition
and
6 deletion
+25
-6
Changelog.md
Changelog.md
+1
-0
Include/Acidanthera/Library/OcAppleKernelLib.h
Include/Acidanthera/Library/OcAppleKernelLib.h
+1
-1
Library/OcAppleKernelLib/CachelessContext.c
Library/OcAppleKernelLib/CachelessContext.c
+13
-1
Library/OcAppleKernelLib/MkextContext.c
Library/OcAppleKernelLib/MkextContext.c
+3
-4
Library/OcAppleKernelLib/MkextInternal.h
Library/OcAppleKernelLib/MkextInternal.h
+7
-0
未找到文件。
Changelog.md
浏览文件 @
18a231ee
...
@@ -11,6 +11,7 @@ OpenCore Changelog
...
@@ -11,6 +11,7 @@ OpenCore Changelog
-
Removed default codec connection delay from AudioDxe
-
Removed default codec connection delay from AudioDxe
-
Added optional
`--codec-setup-delay`
argument to AudioDxe
-
Added optional
`--codec-setup-delay`
argument to AudioDxe
-
Changed units of
`Audio`
->
`SetupDelay`
from microseconds to milliseconds (divide previous value by 1000 if using this setting)
-
Changed units of
`Audio`
->
`SetupDelay`
from microseconds to milliseconds (divide previous value by 1000 if using this setting)
-
Fixed incorrect FAT binary slice being selected under macOS 10.4.11 when performing a cacheless boot
#### v0.8.2
#### v0.8.2
-
Fixed
`AppleCpuPmCfgLock`
on macOS 13
-
Fixed
`AppleCpuPmCfgLock`
on macOS 13
...
...
Include/Acidanthera/Library/OcAppleKernelLib.h
浏览文件 @
18a231ee
...
@@ -1307,7 +1307,7 @@ CachelessContextAddKext (
...
@@ -1307,7 +1307,7 @@ CachelessContextAddKext (
IN
OUT
CACHELESS_CONTEXT
*
Context
,
IN
OUT
CACHELESS_CONTEXT
*
Context
,
IN
CONST
CHAR8
*
InfoPlist
,
IN
CONST
CHAR8
*
InfoPlist
,
IN
UINT32
InfoPlistSize
,
IN
UINT32
InfoPlistSize
,
IN
CONST
UINT8
*
Executable
OPTIONAL
,
IN
UINT8
*
Executable
OPTIONAL
,
IN
UINT32
ExecutableSize
OPTIONAL
,
IN
UINT32
ExecutableSize
OPTIONAL
,
OUT
CHAR8
BundleVersion
[
MAX_INFO_BUNDLE_VERSION_KEY_SIZE
]
OPTIONAL
OUT
CHAR8
BundleVersion
[
MAX_INFO_BUNDLE_VERSION_KEY_SIZE
]
OPTIONAL
);
);
...
...
Library/OcAppleKernelLib/CachelessContext.c
浏览文件 @
18a231ee
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
#include <Library/OcVirtualFsLib.h>
#include <Library/OcVirtualFsLib.h>
#include "CachelessInternal.h"
#include "CachelessInternal.h"
#include "MkextInternal.h"
#include "PrelinkedInternal.h"
#include "PrelinkedInternal.h"
STATIC
STATIC
...
@@ -807,7 +808,7 @@ CachelessContextAddKext (
...
@@ -807,7 +808,7 @@ CachelessContextAddKext (
IN
OUT
CACHELESS_CONTEXT
*
Context
,
IN
OUT
CACHELESS_CONTEXT
*
Context
,
IN
CONST
CHAR8
*
InfoPlist
,
IN
CONST
CHAR8
*
InfoPlist
,
IN
UINT32
InfoPlistSize
,
IN
UINT32
InfoPlistSize
,
IN
CONST
UINT8
*
Executable
OPTIONAL
,
IN
UINT8
*
Executable
OPTIONAL
,
IN
UINT32
ExecutableSize
OPTIONAL
,
IN
UINT32
ExecutableSize
OPTIONAL
,
OUT
CHAR8
BundleVersion
[
MAX_INFO_BUNDLE_VERSION_KEY_SIZE
]
OPTIONAL
OUT
CHAR8
BundleVersion
[
MAX_INFO_BUNDLE_VERSION_KEY_SIZE
]
OPTIONAL
)
)
...
@@ -1031,6 +1032,17 @@ CachelessContextAddKext (
...
@@ -1031,6 +1032,17 @@ CachelessContextAddKext (
//
//
ASSERT
(
NewKext
->
BinaryFileName
!=
NULL
);
ASSERT
(
NewKext
->
BinaryFileName
!=
NULL
);
//
// Use only the binary for the current arch.
// Some versions of macOS 10.4 may incorrectly chose the 64-bit slice
// despite 32-bit being the only supported Intel architecture.
//
if
(
!
InternalParseKextBinary
(
&
Executable
,
&
ExecutableSize
,
Context
->
Is32Bit
))
{
FreePool
(
NewKext
->
PlistData
);
FreePool
(
NewKext
);
return
EFI_INVALID_PARAMETER
;
}
NewKext
->
BinaryData
=
AllocateCopyPool
(
ExecutableSize
,
Executable
);
NewKext
->
BinaryData
=
AllocateCopyPool
(
ExecutableSize
,
Executable
);
if
(
NewKext
->
BinaryData
==
NULL
)
{
if
(
NewKext
->
BinaryData
==
NULL
)
{
if
(
NewKext
->
BinaryFileName
!=
NULL
)
{
if
(
NewKext
->
BinaryFileName
!=
NULL
)
{
...
...
Library/OcAppleKernelLib/MkextContext.c
浏览文件 @
18a231ee
...
@@ -32,9 +32,8 @@
...
@@ -32,9 +32,8 @@
//
//
#define MKEXT_ALIGN(a) (ALIGN_VALUE (a, sizeof (UINT64)))
#define MKEXT_ALIGN(a) (ALIGN_VALUE (a, sizeof (UINT64)))
STATIC
BOOLEAN
BOOLEAN
ParseKextBinary
(
Internal
ParseKextBinary
(
IN
OUT
UINT8
**
Buffer
,
IN
OUT
UINT8
**
Buffer
,
IN
OUT
UINT32
*
BufferSize
,
IN
OUT
UINT32
*
BufferSize
,
IN
BOOLEAN
Is32Bit
IN
BOOLEAN
Is32Bit
...
@@ -1363,7 +1362,7 @@ MkextInjectKext (
...
@@ -1363,7 +1362,7 @@ MkextInjectKext (
ASSERT
(
ExecutableSize
>
0
);
ASSERT
(
ExecutableSize
>
0
);
BinOffset
=
MkextNewSize
;
BinOffset
=
MkextNewSize
;
if
(
!
ParseKextBinary
(
&
Executable
,
&
ExecutableSize
,
Context
->
Is32Bit
))
{
if
(
!
Internal
ParseKextBinary
(
&
Executable
,
&
ExecutableSize
,
Context
->
Is32Bit
))
{
return
EFI_INVALID_PARAMETER
;
return
EFI_INVALID_PARAMETER
;
}
}
...
@@ -1412,7 +1411,7 @@ MkextInjectKext (
...
@@ -1412,7 +1411,7 @@ MkextInjectKext (
ASSERT
(
ExecutableSize
>
0
);
ASSERT
(
ExecutableSize
>
0
);
BinOffset
=
PlistOffset
;
BinOffset
=
PlistOffset
;
if
(
!
ParseKextBinary
(
&
Executable
,
&
ExecutableSize
,
Context
->
Is32Bit
))
{
if
(
!
Internal
ParseKextBinary
(
&
Executable
,
&
ExecutableSize
,
Context
->
Is32Bit
))
{
XmlDocumentFree
(
PlistXml
);
XmlDocumentFree
(
PlistXml
);
FreePool
(
PlistBuffer
);
FreePool
(
PlistBuffer
);
return
EFI_INVALID_PARAMETER
;
return
EFI_INVALID_PARAMETER
;
...
...
Library/OcAppleKernelLib/MkextInternal.h
浏览文件 @
18a231ee
...
@@ -68,4 +68,11 @@ InternalCachedMkextKext (
...
@@ -68,4 +68,11 @@ InternalCachedMkextKext (
IN
CONST
CHAR8
*
BundleId
IN
CONST
CHAR8
*
BundleId
);
);
BOOLEAN
InternalParseKextBinary
(
IN
OUT
UINT8
**
Buffer
,
IN
OUT
UINT32
*
BufferSize
,
IN
BOOLEAN
Is32Bit
);
#endif // MKEXT_INTERNAL_H
#endif // MKEXT_INTERNAL_H
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录