Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
OpenCorePKG_MOD
提交
77b015cf
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,发现更多精彩内容 >>
提交
77b015cf
编写于
2月 08, 2020
作者:
V
vit9696
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
OpenCoreUefi: Sync with new text rendering code
上级
a63fe0fb
变更
11
展开全部
隐藏空白更改
内联
并排
Showing
11 changed file
with
1036 addition
and
555 deletion
+1036
-555
Changelog.md
Changelog.md
+6
-0
Docs/Configuration.pdf
Docs/Configuration.pdf
+0
-0
Docs/Configuration.tex
Docs/Configuration.tex
+199
-210
Docs/Differences/Differences.pdf
Docs/Differences/Differences.pdf
+0
-0
Docs/Differences/Differences.tex
Docs/Differences/Differences.tex
+672
-157
Docs/Sample.plist
Docs/Sample.plist
+23
-24
Docs/SampleFull.plist
Docs/SampleFull.plist
+23
-24
Include/OpenCore.h
Include/OpenCore.h
+0
-13
Platform/OpenCore/OpenCore.c
Platform/OpenCore/OpenCore.c
+4
-17
Platform/OpenCore/OpenCoreMisc.c
Platform/OpenCore/OpenCoreMisc.c
+0
-92
Platform/OpenCore/OpenCoreUefi.c
Platform/OpenCore/OpenCoreUefi.c
+109
-18
未找到文件。
Changelog.md
浏览文件 @
77b015cf
...
...
@@ -6,6 +6,12 @@ OpenCore Changelog
-
Fixed locating DMG recovery in APTIO IV firmwares on FAT32
-
Fixed loading DMG recovery in APTIO IV firmwares on FAT32
-
Removed
`AvoidHighAlloc`
quirk due to removed I/O over 4GB
-
Moved
`ConsoleMode`
,
`Resolution`
options to
`Output`
section
-
Moved console-related UEFI quirks to
`Output`
section
-
Replaced
`ConsoleControl`
and
`BuiltinTextRenderer`
with
`TextRenderer`
-
Added
`Scale`
option to set builtin text renderer scaling
-
Removed
`ConsoleBehaviourOs`
and
`ConsoleBehaviourUi`
-
Fixed providing ConsoleOutHandle GOP when running from Shell
#### v0.5.5
-
Fixed CPU bus ratio calculation for Nehalem and Westmere
...
...
Docs/Configuration.pdf
浏览文件 @
77b015cf
无法预览此类型文件
Docs/Configuration.tex
浏览文件 @
77b015cf
此差异已折叠。
点击以展开。
Docs/Differences/Differences.pdf
浏览文件 @
77b015cf
无法预览此类型文件
Docs/Differences/Differences.tex
浏览文件 @
77b015cf
此差异已折叠。
点击以展开。
Docs/Sample.plist
浏览文件 @
77b015cf
...
...
@@ -579,22 +579,12 @@
<array/>
<key>
Boot
</key>
<dict>
<key>
BuiltinTextRenderer
</key>
<false/>
<key>
ConsoleBehaviourOs
</key>
<string></string>
<key>
ConsoleBehaviourUi
</key>
<string></string>
<key>
ConsoleMode
</key>
<string></string>
<key>
HibernateMode
</key>
<string>
None
</string>
<key>
HideSelf
</key>
<true/>
<key>
PollAppleHotKeys
</key>
<false/>
<key>
Resolution
</key>
<string></string>
<key>
ShowPicker
</key>
<true/>
<key>
TakeoffDelay
</key>
...
...
@@ -800,6 +790,29 @@
<key>
TimerResolution
</key>
<integer>
50000
</integer>
</dict>
<key>
Output
</key>
<dict>
<key>
TextRenderer
</key>
<string>
BuiltinGraphics
</string>
<key>
ConsoleMode
</key>
<string></string>
<key>
Resolution
</key>
<string>
Max
</string>
<key>
ClearScreenOnModeSwitch
</key>
<false/>
<key>
IgnoreTextInGraphics
</key>
<false/>
<key>
ProvideConsoleGop
</key>
<false/>
<key>
ReconnectOnResChange
</key>
<false/>
<key>
ReplaceTabWithSpace
</key>
<false/>
<key>
SanitiseClearScreen
</key>
<false/>
<key>
Scale
</key>
<integer>
100
</integer>
</dict>
<key>
Protocols
</key>
<dict>
<key>
AppleBootPolicy
</key>
...
...
@@ -814,8 +827,6 @@
<false/>
<key>
AppleUserInterfaceTheme
</key>
<false/>
<key>
ConsoleControl
</key>
<false/>
<key>
DataHub
</key>
<false/>
<key>
DeviceProperties
</key>
...
...
@@ -831,28 +842,16 @@
</dict>
<key>
Quirks
</key>
<dict>
<key>
ClearScreenOnModeSwitch
</key>
<false/>
<key>
ExitBootServicesDelay
</key>
<integer>
0
</integer>
<key>
IgnoreInvalidFlexRatio
</key>
<false/>
<key>
IgnoreTextInGraphics
</key>
<false/>
<key>
ProvideConsoleGop
</key>
<false/>
<key>
ReconnectOnResChange
</key>
<false/>
<key>
ReleaseUsbOwnership
</key>
<false/>
<key>
ReplaceTabWithSpace
</key>
<false/>
<key>
RequestBootVarFallback
</key>
<false/>
<key>
RequestBootVarRouting
</key>
<true/>
<key>
SanitiseClearScreen
</key>
<false/>
<key>
UnblockFsConnect
</key>
<false/>
</dict>
...
...
Docs/SampleFull.plist
浏览文件 @
77b015cf
...
...
@@ -579,22 +579,12 @@
<array/>
<key>
Boot
</key>
<dict>
<key>
BuiltinTextRenderer
</key>
<false/>
<key>
ConsoleBehaviourOs
</key>
<string></string>
<key>
ConsoleBehaviourUi
</key>
<string></string>
<key>
ConsoleMode
</key>
<string></string>
<key>
HibernateMode
</key>
<string>
None
</string>
<key>
HideSelf
</key>
<true/>
<key>
PollAppleHotKeys
</key>
<false/>
<key>
Resolution
</key>
<string></string>
<key>
ShowPicker
</key>
<true/>
<key>
TakeoffDelay
</key>
...
...
@@ -903,6 +893,29 @@
<key>
TimerResolution
</key>
<integer>
50000
</integer>
</dict>
<key>
Output
</key>
<dict>
<key>
TextRenderer
</key>
<string>
BuiltinGraphics
</string>
<key>
ConsoleMode
</key>
<string></string>
<key>
Resolution
</key>
<string>
Max
</string>
<key>
ClearScreenOnModeSwitch
</key>
<false/>
<key>
IgnoreTextInGraphics
</key>
<false/>
<key>
ProvideConsoleGop
</key>
<false/>
<key>
ReconnectOnResChange
</key>
<false/>
<key>
ReplaceTabWithSpace
</key>
<false/>
<key>
SanitiseClearScreen
</key>
<false/>
<key>
Scale
</key>
<integer>
100
</integer>
</dict>
<key>
Protocols
</key>
<dict>
<key>
AppleBootPolicy
</key>
...
...
@@ -917,8 +930,6 @@
<false/>
<key>
AppleUserInterfaceTheme
</key>
<false/>
<key>
ConsoleControl
</key>
<false/>
<key>
DataHub
</key>
<false/>
<key>
DeviceProperties
</key>
...
...
@@ -934,28 +945,16 @@
</dict>
<key>
Quirks
</key>
<dict>
<key>
ClearScreenOnModeSwitch
</key>
<false/>
<key>
ExitBootServicesDelay
</key>
<integer>
0
</integer>
<key>
IgnoreInvalidFlexRatio
</key>
<false/>
<key>
IgnoreTextInGraphics
</key>
<false/>
<key>
ProvideConsoleGop
</key>
<false/>
<key>
ReconnectOnResChange
</key>
<false/>
<key>
ReleaseUsbOwnership
</key>
<false/>
<key>
ReplaceTabWithSpace
</key>
<false/>
<key>
RequestBootVarFallback
</key>
<false/>
<key>
RequestBootVarRouting
</key>
<true/>
<key>
SanitiseClearScreen
</key>
<false/>
<key>
UnblockFsConnect
</key>
<false/>
</dict>
...
...
Include/OpenCore.h
浏览文件 @
77b015cf
...
...
@@ -163,19 +163,6 @@ OcLoadUefiSupport (
IN
OC_CPU_INFO
*
CpuInfo
);
/**
Decide whether console controller reconnection is required
upon changing screen resolution.
@param[in] Config OpenCore configuration.
@retval TRUE when required.
**/
BOOLEAN
OcShouldReconnectConsoleOnResolutionChange
(
IN
OC_GLOBAL_CONFIG
*
Config
);
/**
Get human readable version string.
...
...
Platform/OpenCore/OpenCore.c
浏览文件 @
77b015cf
...
...
@@ -69,16 +69,10 @@ OcStartImage (
OUT
CHAR16
**
ExitData
OPTIONAL
)
{
EFI_STATUS
Status
;
EFI_STATUS
Status
;
EFI_CONSOLE_CONTROL_SCREEN_MODE
OldMode
;
//
// Request OS mode.
//
OcConsoleControlSetBehaviour
(
ParseConsoleControlBehaviour
(
OC_BLOB_GET
(
&
mOpenCoreConfiguration
.
Misc
.
Boot
.
ConsoleBehaviourOs
)
)
);
OldMode
=
OcConsoleControlSetMode
(
EfiConsoleControlScreenGraphics
);
Status
=
gBS
->
StartImage
(
ImageHandle
,
...
...
@@ -90,14 +84,7 @@ OcStartImage (
DEBUG
((
DEBUG_WARN
,
"OC: Boot failed - %r
\n
"
,
Status
));
}
//
// Restore ui mode.
//
OcConsoleControlSetBehaviour
(
ParseConsoleControlBehaviour
(
OC_BLOB_GET
(
&
mOpenCoreConfiguration
.
Misc
.
Boot
.
ConsoleBehaviourUi
)
)
);
OcConsoleControlSetMode
(
OldMode
);
return
Status
;
}
...
...
Platform/OpenCore/OpenCoreMisc.c
浏览文件 @
77b015cf
...
...
@@ -290,10 +290,6 @@ OcMiscLateInit (
{
EFI_STATUS
Status
;
EFI_STATUS
HibernateStatus
;
UINT32
Width
;
UINT32
Height
;
UINT32
Bpp
;
BOOLEAN
SetMax
;
CONST
CHAR8
*
HibernateMode
;
UINT32
HibernateMask
;
...
...
@@ -318,76 +314,6 @@ OcMiscLateInit (
}
}
ParseScreenResolution
(
OC_BLOB_GET
(
&
Config
->
Misc
.
Boot
.
Resolution
),
&
Width
,
&
Height
,
&
Bpp
,
&
SetMax
);
DEBUG
((
DEBUG_INFO
,
"OC: Requested resolution is %ux%u@%u (max: %d) from %a
\n
"
,
Width
,
Height
,
Bpp
,
SetMax
,
OC_BLOB_GET
(
&
Config
->
Misc
.
Boot
.
Resolution
)
));
if
(
SetMax
||
(
Width
>
0
&&
Height
>
0
))
{
Status
=
SetConsoleResolution
(
Width
,
Height
,
Bpp
,
OcShouldReconnectConsoleOnResolutionChange
(
Config
)
);
DEBUG
((
EFI_ERROR
(
Status
)
?
DEBUG_WARN
:
DEBUG_INFO
,
"OC: Changed resolution to %ux%u@%u (max: %d) from %a - %r
\n
"
,
Width
,
Height
,
Bpp
,
SetMax
,
OC_BLOB_GET
(
&
Config
->
Misc
.
Boot
.
Resolution
),
Status
));
}
ParseConsoleMode
(
OC_BLOB_GET
(
&
Config
->
Misc
.
Boot
.
ConsoleMode
),
&
Width
,
&
Height
,
&
SetMax
);
DEBUG
((
DEBUG_INFO
,
"OC: Requested console mode is %ux%u (max: %d) from %a
\n
"
,
Width
,
Height
,
SetMax
,
OC_BLOB_GET
(
&
Config
->
Misc
.
Boot
.
ConsoleMode
)
));
if
(
SetMax
||
(
Width
>
0
&&
Height
>
0
))
{
Status
=
SetConsoleMode
(
Width
,
Height
);
DEBUG
((
EFI_ERROR
(
Status
)
?
DEBUG_WARN
:
DEBUG_INFO
,
"OC: Changed console mode to %ux%u (max: %d) from %a - %r
\n
"
,
Width
,
Height
,
SetMax
,
OC_BLOB_GET
(
&
Config
->
Misc
.
Boot
.
ConsoleMode
),
Status
));
}
if
(
Config
->
Misc
.
Boot
.
BuiltinTextRenderer
)
{
OcInstallCustomConOut
();
}
HibernateMode
=
OC_BLOB_GET
(
&
Config
->
Misc
.
Boot
.
HibernateMode
);
if
(
AsciiStrCmp
(
HibernateMode
,
"None"
)
==
0
)
{
...
...
@@ -407,7 +333,6 @@ OcMiscLateInit (
HibernateStatus
=
OcActivateHibernateWake
(
HibernateMask
);
DEBUG
((
DEBUG_INFO
,
"OC: Hibernation detection status is %r
\n
"
,
HibernateStatus
));
(
VOID
)
HibernateStatus
;
return
Status
;
}
...
...
@@ -608,21 +533,4 @@ OcMiscUefiQuirksLoaded (
sizeof
(
Config
->
Misc
.
Security
.
ScanPolicy
),
&
Config
->
Misc
.
Security
.
ScanPolicy
);
//
// Regardless of the mode ensure our cursor is disabled as we do not need it.
// This is a bit ugly, but works for most platforms we have:
// - Firstly disable it on platforms that start with it for whatever reason.
// Generally Insyde laptops are happy with that.
// - Secondly change the mode, on APTIO it may reenable the cursor in Text mode.
// - Thirdly disable it again to ensure it is definitely disabled.
//
OcConsoleDisableCursor
();
OcConsoleControlSetBehaviour
(
ParseConsoleControlBehaviour
(
OC_BLOB_GET
(
&
Config
->
Misc
.
Boot
.
ConsoleBehaviourUi
)
)
);
OcConsoleDisableCursor
();
}
Platform/OpenCore/OpenCoreUefi.c
浏览文件 @
77b015cf
...
...
@@ -267,10 +267,6 @@ OcReinstallProtocols (
DEBUG
((
DEBUG_ERROR
,
"OC: Failed to install boot policy protocol
\n
"
));
}
if
(
OcConsoleControlInstallProtocol
(
Config
->
Uefi
.
Protocols
.
ConsoleControl
)
==
NULL
)
{
DEBUG
((
DEBUG_ERROR
,
"OC: Failed to install console control protocol
\n
"
));
}
if
(
OcDataHubInstallProtocol
(
Config
->
Uefi
.
Protocols
.
DataHub
)
==
NULL
)
{
DEBUG
((
DEBUG_ERROR
,
"OC: Failed to install data hub protocol
\n
"
));
}
...
...
@@ -394,12 +390,116 @@ OcLoadUefiInputSupport (
return
ExitBs
;
}
BOOLEAN
OcShouldReconnectConsoleOnResolutionChange
(
STATIC
VOID
OcLoadUefiOutputSupport
(
IN
OC_GLOBAL_CONFIG
*
Config
)
{
return
Config
->
Uefi
.
Quirks
.
ReconnectOnResChange
;
EFI_STATUS
Status
;
CONST
CHAR8
*
AsciiRenderer
;
OC_CONSOLE_RENDERER
Renderer
;
UINT32
Width
;
UINT32
Height
;
UINT32
Bpp
;
BOOLEAN
SetMax
;
if
(
Config
->
Uefi
.
Output
.
ProvideConsoleGop
)
{
OcProvideConsoleGop
();
}
OcParseScreenResolution
(
OC_BLOB_GET
(
&
Config
->
Uefi
.
Output
.
Resolution
),
&
Width
,
&
Height
,
&
Bpp
,
&
SetMax
);
DEBUG
((
DEBUG_INFO
,
"OC: Requested resolution is %ux%u@%u (max: %d) from %a
\n
"
,
Width
,
Height
,
Bpp
,
SetMax
,
OC_BLOB_GET
(
&
Config
->
Uefi
.
Output
.
Resolution
)
));
if
(
SetMax
||
(
Width
>
0
&&
Height
>
0
))
{
Status
=
OcSetConsoleResolution
(
Width
,
Height
,
Bpp
);
DEBUG
((
EFI_ERROR
(
Status
)
?
DEBUG_WARN
:
DEBUG_INFO
,
"OC: Changed resolution to %ux%u@%u (max: %d) from %a - %r
\n
"
,
Width
,
Height
,
Bpp
,
SetMax
,
OC_BLOB_GET
(
&
Config
->
Uefi
.
Output
.
Resolution
),
Status
));
}
if
(
Config
->
Uefi
.
Output
.
ReconnectOnResChange
)
{
OcReconnectConsole
();
}
AsciiRenderer
=
OC_BLOB_GET
(
&
Config
->
Uefi
.
Output
.
TextRenderer
);
if
(
AsciiRenderer
[
0
]
==
'\0'
||
AsciiStrCmp
(
AsciiRenderer
,
"BuiltinGraphics"
)
==
0
)
{
Renderer
=
OcConsoleRendererBuiltinGraphics
;
}
else
if
(
AsciiStrCmp
(
AsciiRenderer
,
"SystemGraphics"
)
==
0
)
{
Renderer
=
OcConsoleRendererSystemGraphics
;
}
else
if
(
AsciiStrCmp
(
AsciiRenderer
,
"SystemText"
)
==
0
)
{
Renderer
=
OcConsoleRendererSystemText
;
}
else
if
(
AsciiStrCmp
(
AsciiRenderer
,
"SystemGeneric"
)
==
0
)
{
Renderer
=
OcConsoleRendererSystemGeneric
;
}
else
{
DEBUG
((
DEBUG_WARN
,
"OC: Requested unknown renderer %a
\n
"
,
AsciiRenderer
));
Renderer
=
OcConsoleRendererBuiltinGraphics
;
}
OcSetupConsole
(
Renderer
,
Config
->
Uefi
.
Output
.
Scale
,
Config
->
Uefi
.
Output
.
IgnoreTextInGraphics
,
Config
->
Uefi
.
Output
.
SanitiseClearScreen
,
Config
->
Uefi
.
Output
.
ClearScreenOnModeSwitch
,
Config
->
Uefi
.
Output
.
ReplaceTabWithSpace
);
OcParseConsoleMode
(
OC_BLOB_GET
(
&
Config
->
Uefi
.
Output
.
ConsoleMode
),
&
Width
,
&
Height
,
&
SetMax
);
DEBUG
((
DEBUG_INFO
,
"OC: Requested console mode is %ux%u (max: %d) from %a
\n
"
,
Width
,
Height
,
SetMax
,
OC_BLOB_GET
(
&
Config
->
Uefi
.
Output
.
ConsoleMode
)
));
if
(
SetMax
||
(
Width
>
0
&&
Height
>
0
))
{
Status
=
OcSetConsoleMode
(
Width
,
Height
);
DEBUG
((
EFI_ERROR
(
Status
)
?
DEBUG_WARN
:
DEBUG_INFO
,
"OC: Changed console mode to %ux%u (max: %d) from %a - %r
\n
"
,
Width
,
Height
,
SetMax
,
OC_BLOB_GET
(
&
Config
->
Uefi
.
Output
.
ConsoleMode
),
Status
));
}
}
VOID
...
...
@@ -473,6 +573,7 @@ OcLoadUefiSupport (
OcReinstallProtocols
(
Config
);
AgiExitBs
=
OcLoadUefiInputSupport
(
Config
);
//
// Setup Apple bootloader specific UEFI features.
//
...
...
@@ -482,17 +583,6 @@ OcLoadUefiSupport (
OcCpuCorrectFlexRatio
(
CpuInfo
);
}
if
(
Config
->
Uefi
.
Quirks
.
ProvideConsoleGop
)
{
OcProvideConsoleGop
();
}
OcConsoleControlConfigure
(
Config
->
Uefi
.
Quirks
.
IgnoreTextInGraphics
,
Config
->
Uefi
.
Quirks
.
SanitiseClearScreen
,
Config
->
Uefi
.
Quirks
.
ClearScreenOnModeSwitch
,
Config
->
Uefi
.
Quirks
.
ReplaceTabWithSpace
);
//
// Inform platform support whether we want Boot#### routing or not.
//
...
...
@@ -574,6 +664,7 @@ OcLoadUefiSupport (
OcUnblockUnmountedPartitions
();
}
OcLoadUefiOutputSupport
(
Config
);
OcMiscUefiQuirksLoaded
(
Config
);
if
(
Config
->
Uefi
.
ConnectDrivers
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录