Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
OpenCorePKG_MOD
提交
73c5de04
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,发现更多精彩内容 >>
提交
73c5de04
编写于
1月 23, 2020
作者:
V
vit9696
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
OpenCoreUefi: Improved driver connection performance on APTIO IV
closes acidanthera/bugtracker#669
上级
f0e43280
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
67 addition
and
33 deletion
+67
-33
Changelog.md
Changelog.md
+2
-0
OpenCorePkg.dsc
OpenCorePkg.dsc
+1
-0
Platform/OpenCore/OpenCore.inf
Platform/OpenCore/OpenCore.inf
+1
-0
Platform/OpenCore/OpenCoreUefi.c
Platform/OpenCore/OpenCoreUefi.c
+63
-33
未找到文件。
Changelog.md
浏览文件 @
73c5de04
...
...
@@ -7,6 +7,8 @@ OpenCore Changelog
-
Improved OpenCore rerun detection for new versions
-
Fixed loading picker on boot failure when it is hidden
-
Added PMC ACPI sample for 300-series chipsets
-
Improved driver connection performance on APTIO IV
-
Fixed boot option saving in LogoutHook.command
#### v0.5.4
-
Added Enter key handling in boot menu for quick proceed
...
...
OpenCorePkg.dsc
浏览文件 @
73c5de04
...
...
@@ -63,6 +63,7 @@
OcDevicePathLib|OcSupportPkg/Library/OcDevicePathLib/OcDevicePathLib.inf
OcDevicePropertyLib|OcSupportPkg/Library/OcDevicePropertyLib/OcDevicePropertyLib.inf
OcDeviceTreeLib|OcSupportPkg/Library/OcDeviceTreeLib/OcDeviceTreeLib.inf
OcDriverConnectionLib|OcSupportPkg/Library/OcDriverConnectionLib/OcDriverConnectionLib.inf
OcFileLib|OcSupportPkg/Library/OcFileLib/OcFileLib.inf
OcFirmwarePasswordLib|OcSupportPkg/Library/OcFirmwarePasswordLib/OcFirmwarePasswordLib.inf
OcFirmwareVolumeLib|OcSupportPkg/Library/OcFirmwareVolumeLib/OcFirmwareVolumeLib.inf
...
...
Platform/OpenCore/OpenCore.inf
浏览文件 @
73c5de04
...
...
@@ -83,6 +83,7 @@
OcDataHubLib
OcDevicePathLib
OcDevicePropertyLib
OcDriverConnectionLib
OcFirmwareVolumeLib
OcGuardLib
OcHashServicesLib
...
...
Platform/OpenCore/OpenCoreUefi.c
浏览文件 @
73c5de04
...
...
@@ -31,6 +31,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/OcCpuLib.h>
#include <Library/OcDataHubLib.h>
#include <Library/OcDevicePropertyLib.h>
#include <Library/OcDriverConnectionLib.h>
#include <Library/OcFirmwareVolumeLib.h>
#include <Library/OcHashServicesLib.h>
#include <Library/OcMiscLib.h>
...
...
@@ -50,8 +51,9 @@ STATIC EFI_EVENT mOcExitBootServicesEvent;
STATIC
VOID
OcLoadDrivers
(
IN
OC_STORAGE_CONTEXT
*
Storage
,
IN
OC_GLOBAL_CONFIG
*
Config
IN
OC_STORAGE_CONTEXT
*
Storage
,
IN
OC_GLOBAL_CONFIG
*
Config
,
OUT
EFI_HANDLE
**
DriversToConnect
OPTIONAL
)
{
EFI_STATUS
Status
;
...
...
@@ -60,6 +62,13 @@ OcLoadDrivers (
UINT32
Index
;
CHAR16
DriverPath
[
64
];
EFI_HANDLE
ImageHandle
;
EFI_HANDLE
*
DriversToConnectIterator
;
VOID
*
DriverBinding
;
DriversToConnectIterator
=
NULL
;
if
(
DriversToConnect
!=
NULL
)
{
*
DriversToConnect
=
NULL
;
}
DEBUG
((
DEBUG_INFO
,
"OC: Got %u drivers
\n
"
,
Config
->
Uefi
.
Drivers
.
Count
));
...
...
@@ -140,39 +149,54 @@ OcLoadDrivers (
OC_BLOB_GET
(
Config
->
Uefi
.
Drivers
.
Values
[
Index
]),
Index
));
}
FreePool
(
Driver
);
}
}
if
(
DriversToConnect
!=
NULL
)
{
Status
=
gBS
->
HandleProtocol
(
ImageHandle
,
&
gEfiDriverBindingProtocolGuid
,
(
VOID
**
)
&
DriverBinding
);
STATIC
VOID
OcConnectDrivers
(
VOID
)
{
EFI_STATUS
Status
;
UINTN
HandleCount
;
EFI_HANDLE
*
HandleBuffer
;
UINTN
Index
;
if
(
!
EFI_ERROR
(
Status
))
{
if
(
*
DriversToConnect
==
NULL
)
{
//
// Allocate enough entries for the drivers to connect.
//
*
DriversToConnect
=
AllocatePool
(
(
Config
->
Uefi
.
Drivers
.
Count
+
1
-
Index
)
*
sizeof
(
**
DriversToConnect
)
);
Status
=
gBS
->
LocateHandleBuffer
(
ByProtocol
,
&
gEfiDevicePathProtocolGuid
,
NULL
,
&
HandleCount
,
&
HandleBuffer
);
if
(
EFI_ERROR
(
Status
))
{
return
;
}
if
(
*
DriversToConnect
!=
NULL
)
{
DriversToConnectIterator
=
*
DriversToConnect
;
}
else
{
DEBUG
((
DEBUG_ERROR
,
"OC: Failed to allocate memory for drivers to connect
\n
"
));
FreePool
(
Driver
);
return
;
}
}
*
DriversToConnectIterator
=
ImageHandle
;
++
DriversToConnectIterator
;
DEBUG
((
DEBUG_INFO
,
"OC: Driver %a at %u needs connection.
\n
"
,
OC_BLOB_GET
(
Config
->
Uefi
.
Drivers
.
Values
[
Index
]),
Index
));
}
}
}
for
(
Index
=
0
;
Index
<
HandleCount
;
++
Index
)
{
gBS
->
ConnectController
(
HandleBuffer
[
Index
],
NULL
,
NULL
,
TRUE
);
FreePool
(
Driver
);
}
FreePool
(
HandleBuffer
);
//
// Driver connection list should be null-terminated.
//
if
(
*
DriversToConnectIterator
!=
NULL
)
{
*
DriversToConnectIterator
=
NULL
;
}
}
STATIC
...
...
@@ -482,6 +506,7 @@ OcLoadUefiSupport (
)
{
EFI_STATUS
Status
;
EFI_HANDLE
*
DriversToConnect
;
UINTN
Index
;
UINTN
Index2
;
UINT16
*
BootOrder
;
...
...
@@ -595,11 +620,16 @@ OcLoadUefiSupport (
OcMiscUefiQuirksLoaded
(
Config
);
OcLoadDrivers
(
Storage
,
Config
);
DEBUG
((
DEBUG_INFO
,
"OC: Connecting drivers...
\n
"
));
if
(
Config
->
Uefi
.
ConnectDrivers
)
{
OcLoadDrivers
(
Storage
,
Config
,
&
DriversToConnect
);
DEBUG
((
DEBUG_INFO
,
"OC: Connecting drivers...
\n
"
));
OcRegisterDriversToHighestPriority
(
DriversToConnect
);
//
// DriversToConnect is not freed as it is owned by OcRegisterDriversToHighestPriority.
//
OcConnectDrivers
();
DEBUG
((
DEBUG_INFO
,
"OC: Connecting drivers done...
\n
"
));
}
else
{
OcLoadDrivers
(
Storage
,
Config
,
NULL
);
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录