Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
OpenCorePKG_MOD
提交
e094c2bd
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,发现更多精彩内容 >>
提交
e094c2bd
编写于
5月 09, 2021
作者:
V
vit9696
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
OcConsoleLib: Fix rotation and EfiBoot bridging
上级
479a5b15
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
73 addition
and
11 deletion
+73
-11
Docs/Configuration.pdf
Docs/Configuration.pdf
+0
-0
Docs/Configuration.tex
Docs/Configuration.tex
+3
-1
Docs/Differences/Differences.pdf
Docs/Differences/Differences.pdf
+0
-0
Docs/Differences/Differences.tex
Docs/Differences/Differences.tex
+4
-2
Docs/Errata/Errata.pdf
Docs/Errata/Errata.pdf
+0
-0
Library/OcConsoleLib/ConsoleGop.c
Library/OcConsoleLib/ConsoleGop.c
+39
-8
Library/OcConsoleLib/ConsoleGopInternal.h
Library/OcConsoleLib/ConsoleGopInternal.h
+13
-0
Library/OcConsoleLib/FramebufferInfo.c
Library/OcConsoleLib/FramebufferInfo.c
+13
-0
Library/OcConsoleLib/OcConsoleLib.inf
Library/OcConsoleLib/OcConsoleLib.inf
+1
-0
未找到文件。
Docs/Configuration.pdf
浏览文件 @
e094c2bd
无法预览此类型文件
Docs/Configuration.tex
浏览文件 @
e094c2bd
...
...
@@ -6782,7 +6782,9 @@ functioning. Feature highlights:
there is an obvious benefit as it may result in issues such as slower scrolling.
This renderer fully supports
\texttt
{
AppleEg
2
Info
}
protocol and will provide
screen rotation for all EFI applications.
screen rotation for all EFI applications. In order to provide seamless rotation
compatibility with
\texttt
{
EfiBoot
}
, builtin
\texttt
{
AppleFramebufferInfo
}
should
also be used, i.e. it may need to be overridden on Mac EFI.
\item
\texttt
{
GopPassThrough
}
\\
...
...
Docs/Differences/Differences.pdf
浏览文件 @
e094c2bd
无法预览此类型文件
Docs/Differences/Differences.tex
浏览文件 @
e094c2bd
\documentclass
[]
{
article
}
%DIF LATEXDIFF DIFFERENCE FILE
%DIF DEL PreviousConfiguration.tex Fri May 7 10:26:40 2021
%DIF ADD ../Configuration.tex Sun May 9 0
0:12:30
2021
%DIF ADD ../Configuration.tex Sun May 9 0
2:38:36
2021
\usepackage
{
lmodern
}
\usepackage
{
amssymb,amsmath
}
...
...
@@ -6842,7 +6842,9 @@ functioning. Feature highlights:
there is an obvious benefit as it may result in issues such as slower scrolling.
\DIFaddbegin
\DIFadd
{
This renderer fully supports
}
\texttt
{
\DIFadd
{
AppleEg
2
Info
}}
\DIFadd
{
protocol and will provide
screen rotation for all EFI applications.
screen rotation for all EFI applications. In order to provide seamless rotation
compatibility with
}
\texttt
{
\DIFadd
{
EfiBoot
}}
\DIFadd
{
, builtin
}
\texttt
{
\DIFadd
{
AppleFramebufferInfo
}}
\DIFadd
{
should
also be used, i.e. it may need to be overridden on Mac EFI.
}
\DIFaddend
\item
...
...
Docs/Errata/Errata.pdf
浏览文件 @
e094c2bd
无法预览此类型文件
Library/OcConsoleLib/ConsoleGop.c
浏览文件 @
e094c2bd
...
...
@@ -194,13 +194,24 @@ STATIC
VOID
SwitchMode
(
IN
OUT
EFI_GRAPHICS_OUTPUT_PROTOCOL
*
This
,
IN
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
*
Source
IN
BOOLEAN
UseCustom
)
{
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
*
Source
;
ASSERT
(
This
!=
NULL
);
ASSERT
(
This
->
Mode
!=
NULL
);
ASSERT
(
This
->
Mode
->
Info
!=
NULL
);
ASSERT
(
Source
!=
NULL
);
if
(
UseCustom
)
{
Source
=
&
mGop
.
CustomModeInfo
;
This
->
Mode
->
FrameBufferBase
=
0
;
This
->
Mode
->
FrameBufferSize
=
0
;
}
else
{
Source
=
&
mGop
.
OriginalModeInfo
;
This
->
Mode
->
FrameBufferBase
=
mGop
.
OriginalFrameBufferBase
;
This
->
Mode
->
FrameBufferSize
=
mGop
.
OriginalFrameBufferSize
;
}
This
->
Mode
->
Info
->
VerticalResolution
=
Source
->
VerticalResolution
;
This
->
Mode
->
Info
->
HorizontalResolution
=
Source
->
HorizontalResolution
;
...
...
@@ -233,6 +244,14 @@ RotateMode (
This
->
Mode
->
Info
->
PixelsPerScanLine
=
This
->
Mode
->
Info
->
HorizontalResolution
;
}
mGop
.
OriginalFrameBufferBase
=
This
->
Mode
->
FrameBufferBase
;
mGop
.
OriginalFrameBufferSize
=
This
->
Mode
->
FrameBufferSize
;
if
(
Rotation
!=
0
)
{
This
->
Mode
->
FrameBufferBase
=
0
;
This
->
Mode
->
FrameBufferSize
=
0
;
}
CopyMem
(
&
mGop
.
CustomModeInfo
,
This
->
Mode
->
Info
,
sizeof
(
mGop
.
CustomModeInfo
));
}
...
...
@@ -309,11 +328,11 @@ DirectGopSetMode (
//
// Protect from mishandling of rotated info.
//
SwitchMode
(
This
,
&
mGop
.
OriginalModeInfo
);
SwitchMode
(
This
,
FALSE
);
Status
=
mGop
.
OriginalGopSetMode
(
This
,
ModeNumber
);
if
(
EFI_ERROR
(
Status
))
{
SwitchMode
(
This
,
&
mGop
.
CustomModeInfo
);
SwitchMode
(
This
,
TRUE
);
mGop
.
FramebufferContext
=
Original
;
gBS
->
RestoreTPL
(
OldTpl
);
return
Status
;
...
...
@@ -326,7 +345,7 @@ DirectGopSetMode (
RotateMode
(
This
,
mGop
.
Rotation
);
mGop
.
FramebufferContext
=
DirectGopFromTarget
(
This
->
Mode
->
FrameBufferBase
,
mGop
.
Original
FrameBufferBase
,
&
mGop
.
OriginalModeInfo
,
&
mGop
.
FramebufferContextPageCount
);
...
...
@@ -360,10 +379,10 @@ DirectQueryMode (
EFI_STATUS
Status
;
UINT32
HorizontalResolution
;
SwitchMode
(
This
,
&
mGop
.
OriginalModeInfo
);
SwitchMode
(
This
,
FALSE
);
Status
=
mGop
.
OriginalGopQueryMode
(
This
,
ModeNumber
,
SizeOfInfo
,
Info
);
if
(
EFI_ERROR
(
Status
))
{
SwitchMode
(
This
,
&
mGop
.
CustomModeInfo
);
SwitchMode
(
This
,
TRUE
);
return
Status
;
}
...
...
@@ -523,7 +542,7 @@ OcUseDirectGop (
RotateMode
(
Gop
,
mGop
.
Rotation
);
mGop
.
FramebufferContext
=
DirectGopFromTarget
(
Gop
->
Mode
->
FrameBufferBase
,
mGop
.
Original
FrameBufferBase
,
&
mGop
.
OriginalModeInfo
,
&
mGop
.
FramebufferContextPageCount
);
...
...
@@ -562,3 +581,15 @@ OcUseDirectGop (
return
EFI_SUCCESS
;
}
CONST
CONSOLE_GOP_CONTEXT
*
InternalGetDirectGopContext
(
VOID
)
{
if
(
mGop
.
Rotation
!=
0
&&
mGop
.
OriginalGopSetMode
!=
NULL
)
{
return
&
mGop
;
}
return
NULL
;
}
Library/OcConsoleLib/ConsoleGopInternal.h
浏览文件 @
e094c2bd
...
...
@@ -56,9 +56,22 @@ typedef struct CONSOLE_GOP_CONTEXT {
///
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
OriginalModeInfo
;
///
/// Original (not rotated) linear frame buffer.
///
EFI_PHYSICAL_ADDRESS
OriginalFrameBufferBase
;
///
/// Original (not rotated) linear frame buffer size.
///
UINTN
OriginalFrameBufferSize
;
///
/// Ours (rotated) mode informaation.
///
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
CustomModeInfo
;
}
CONSOLE_GOP_CONTEXT
;
CONST
CONSOLE_GOP_CONTEXT
*
InternalGetDirectGopContext
(
VOID
);
#endif // CONSOLE_GOP_INTERNAL_H
Library/OcConsoleLib/FramebufferInfo.c
浏览文件 @
e094c2bd
...
...
@@ -13,6 +13,7 @@
**/
#include "OcConsoleLibInternal.h"
#include "ConsoleGopInternal.h"
#include <Protocol/AppleFramebufferInfo.h>
#include <Protocol/GraphicsOutput.h>
...
...
@@ -41,6 +42,7 @@ AppleFramebufferGetInfo (
EFI_GRAPHICS_OUTPUT_PROTOCOL
*
GraphicsOutput
;
EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE
*
Mode
;
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
*
Info
;
CONST
CONSOLE_GOP_CONTEXT
*
DirectConsole
;
if
(
This
==
NULL
||
FramebufferBase
==
NULL
...
...
@@ -52,6 +54,17 @@ AppleFramebufferGetInfo (
return
EFI_INVALID_PARAMETER
;
}
DirectConsole
=
InternalGetDirectGopContext
();
if
(
DirectConsole
!=
NULL
)
{
*
FramebufferBase
=
DirectConsole
->
OriginalFrameBufferBase
;
*
FramebufferSize
=
(
UINT32
)
DirectConsole
->
OriginalFrameBufferSize
;
*
ScreenRowBytes
=
(
UINT32
)
(
DirectConsole
->
OriginalModeInfo
.
PixelsPerScanLine
*
sizeof
(
EFI_GRAPHICS_OUTPUT_BLT_PIXEL
));
*
ScreenWidth
=
DirectConsole
->
CustomModeInfo
.
HorizontalResolution
;
*
ScreenHeight
=
DirectConsole
->
CustomModeInfo
.
VerticalResolution
;
*
ScreenDepth
=
DEFAULT_COLOUR_DEPTH
;
return
EFI_SUCCESS
;
}
Status
=
gBS
->
HandleProtocol
(
gST
->
ConsoleOutHandle
,
&
gEfiGraphicsOutputProtocolGuid
,
...
...
Library/OcConsoleLib/OcConsoleLib.inf
浏览文件 @
e094c2bd
...
...
@@ -29,6 +29,7 @@
[Guids]
gAppleVendorVariableGuid
gAppleBootVariableGuid
[Protocols]
gAppleFramebufferInfoProtocolGuid
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录