Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
OpenCorePKG_MOD
提交
6439b435
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,发现更多精彩内容 >>
提交
6439b435
编写于
3月 08, 2020
作者:
V
vit9696
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
OpenCoreUefi: Support MTRR cache policy in direct fb
上级
a2e07526
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
50 addition
and
3 deletion
+50
-3
Changelog.md
Changelog.md
+1
-0
Docs/Sample.plist
Docs/Sample.plist
+2
-0
Docs/SampleFull.plist
Docs/SampleFull.plist
+2
-0
Include/Library/OcConfigurationLib.h
Include/Library/OcConfigurationLib.h
+1
-0
Include/Library/OcConsoleLib.h
Include/Library/OcConsoleLib.h
+5
-1
Library/OcConfigurationLib/OcConfigurationLib.c
Library/OcConfigurationLib/OcConfigurationLib.c
+1
-0
Library/OcConsoleLib/ConsoleGop.c
Library/OcConsoleLib/ConsoleGop.c
+35
-1
Library/OcConsoleLib/OcConsoleLib.inf
Library/OcConsoleLib/OcConsoleLib.inf
+2
-0
Platform/OpenCore/OpenCoreUefiInOut.c
Platform/OpenCore/OpenCoreUefiInOut.c
+1
-1
未找到文件。
Changelog.md
浏览文件 @
6439b435
...
...
@@ -5,6 +5,7 @@ OpenCore Changelog
-
Added TimeMachine detection to picker
-
Added early preview version of BootLiquor
-
Fixed FS discovery on NVMe with legacy drivers
-
Added DirectGopCacheMode option for FB cache policy
#### v0.5.6
-
Various improvements to builtin text renderer
...
...
Docs/Sample.plist
浏览文件 @
6439b435
...
...
@@ -847,6 +847,8 @@
<true/>
<key>
DirectGopRendering
</key>
<false/>
<key>
DirectGopCacheMode
</key>
<integer>
-1
</integer>
<key>
ReconnectOnResChange
</key>
<false/>
<key>
ReplaceTabWithSpace
</key>
...
...
Docs/SampleFull.plist
浏览文件 @
6439b435
...
...
@@ -950,6 +950,8 @@
<true/>
<key>
DirectGopRendering
</key>
<false/>
<key>
DirectGopCacheMode
</key>
<integer>
-1
</integer>
<key>
ReconnectOnResChange
</key>
<false/>
<key>
ReplaceTabWithSpace
</key>
...
...
Include/Library/OcConfigurationLib.h
浏览文件 @
6439b435
...
...
@@ -498,6 +498,7 @@ typedef enum {
_(OC_STRING , ConsoleMode , , OC_STRING_CONSTR ("", _, __), OC_DESTR (OC_STRING)) \
_(OC_STRING , Resolution , , OC_STRING_CONSTR ("", _, __), OC_DESTR (OC_STRING)) \
_(OC_STRING , TextRenderer , , OC_STRING_CONSTR ("", _, __), OC_DESTR (OC_STRING)) \
_(INT32 , DirectGopCacheMode , , -1 , ()) \
_(BOOLEAN , IgnoreTextInGraphics , , FALSE , ()) \
_(BOOLEAN , ClearScreenOnModeSwitch , , FALSE , ()) \
_(BOOLEAN , ProvideConsoleGop , , FALSE , ()) \
...
...
Include/Library/OcConsoleLib.h
浏览文件 @
6439b435
...
...
@@ -144,10 +144,14 @@ OcReconnectConsole (
/**
Use direct GOP renderer for console.
@param[in] CacheType Caching type, e.g. CacheWriteCombining or -1 to disable.
@retval EFI_SUCCESS on success.
**/
EFI_STATUS
OcUseDirectGop
(
VOID
IN
INT32
CacheType
);
/**
...
...
Library/OcConfigurationLib/OcConfigurationLib.c
浏览文件 @
6439b435
...
...
@@ -578,6 +578,7 @@ OC_SCHEMA
mUefiOutputSchema
[]
=
{
OC_SCHEMA_BOOLEAN_IN
(
"ClearScreenOnModeSwitch"
,
OC_GLOBAL_CONFIG
,
Uefi
.
Output
.
ClearScreenOnModeSwitch
),
OC_SCHEMA_STRING_IN
(
"ConsoleMode"
,
OC_GLOBAL_CONFIG
,
Uefi
.
Output
.
ConsoleMode
),
OC_SCHEMA_INTEGER_IN
(
"DirectGopCacheMode"
,
OC_GLOBAL_CONFIG
,
Uefi
.
Output
.
DirectGopCacheMode
),
OC_SCHEMA_BOOLEAN_IN
(
"DirectGopRendering"
,
OC_GLOBAL_CONFIG
,
Uefi
.
Output
.
DirectGopRendering
),
OC_SCHEMA_BOOLEAN_IN
(
"IgnoreTextInGraphics"
,
OC_GLOBAL_CONFIG
,
Uefi
.
Output
.
IgnoreTextInGraphics
),
OC_SCHEMA_BOOLEAN_IN
(
"ProvideConsoleGop"
,
OC_GLOBAL_CONFIG
,
Uefi
.
Output
.
ProvideConsoleGop
),
...
...
Library/OcConsoleLib/ConsoleGop.c
浏览文件 @
6439b435
...
...
@@ -23,6 +23,7 @@
#include <Library/DebugLib.h>
#include <Library/FrameBufferBltLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/MtrrLib.h>
#include <Library/OcConsoleLib.h>
#include <Library/OcMiscLib.h>
#include <Library/OcGuardLib.h>
...
...
@@ -45,6 +46,10 @@ STATIC
EFI_GRAPHICS_OUTPUT_PROTOCOL_SET_MODE
mOriginalGopSetMode
;
STATIC
INT32
mCachePolicy
;
STATIC
EFI_STATUS
EFIAPI
...
...
@@ -260,6 +265,14 @@ DirectGopSetMode (
return
EFI_DEVICE_ERROR
;
}
if
(
mCachePolicy
>=
0
)
{
MtrrSetMemoryAttribute
(
This
->
Mode
->
FrameBufferBase
,
This
->
Mode
->
FrameBufferSize
,
mCachePolicy
);
}
gBS
->
RestoreTPL
(
OldTpl
);
return
EFI_SUCCESS
;
}
...
...
@@ -354,7 +367,7 @@ OcReconnectConsole (
EFI_STATUS
OcUseDirectGop
(
VOID
IN
INT32
CacheType
)
{
EFI_STATUS
Status
;
...
...
@@ -384,5 +397,26 @@ OcUseDirectGop (
mOriginalGopSetMode
=
Gop
->
SetMode
;
Gop
->
SetMode
=
DirectGopSetMode
;
Gop
->
Blt
=
DirectGopBlt
;
mCachePolicy
=
-
1
;
if
(
CacheType
>=
0
)
{
Status
=
MtrrSetMemoryAttribute
(
Gop
->
Mode
->
FrameBufferBase
,
Gop
->
Mode
->
FrameBufferSize
,
CacheType
);
DEBUG
((
DEBUG_INFO
,
"OCC: FB (%Lx, %Lx) MTRR (%x) - %r
\n
"
,
(
UINT64
)
Gop
->
Mode
->
FrameBufferBase
,
(
UINT64
)
Gop
->
Mode
->
FrameBufferSize
,
CacheType
,
Status
));
if
(
!
EFI_ERROR
(
Status
))
{
mCachePolicy
=
CacheType
;
}
}
return
EFI_SUCCESS
;
}
Library/OcConsoleLib/OcConsoleLib.inf
浏览文件 @
6439b435
...
...
@@ -52,11 +52,13 @@
MdeModulePkg/MdeModulePkg.dec
MdePkg/MdePkg.dec
OpenCorePkg/OpenCorePkg.dec
UefiCpuPkg/UefiCpuPkg.dec
[LibraryClasses]
BaseLib
BaseMemoryLib
DebugLib
FrameBufferBltLib
MtrrLib
UefiBootServicesTableLib
UefiRuntimeServicesTableLib
Platform/OpenCore/OpenCoreUefiInOut.c
浏览文件 @
6439b435
...
...
@@ -237,7 +237,7 @@ OcLoadUefiOutputSupport (
}
if
(
Config
->
Uefi
.
Output
.
DirectGopRendering
)
{
OcUseDirectGop
();
OcUseDirectGop
(
Config
->
Uefi
.
Output
.
DirectGopCacheMode
);
}
if
(
Config
->
Uefi
.
Output
.
ReconnectOnResChange
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录