diff --git a/Docs/Configuration.pdf b/Docs/Configuration.pdf index 262851a4..cfe4659a 100644 Binary files a/Docs/Configuration.pdf and b/Docs/Configuration.pdf differ diff --git a/Docs/Configuration.tex b/Docs/Configuration.tex index db2669b0..1c8f7513 100644 --- a/Docs/Configuration.tex +++ b/Docs/Configuration.tex @@ -1206,6 +1206,15 @@ behaviour that does not go to any other sections \begin{enumerate} +\item + \texttt{ConsoleMode}\\ + \textbf{Type}: \texttt{plist\ string}\\ + \textbf{Default value}: Empty string\\ + \textbf{Description}: Sets console output mode as specified + with the \texttt{WxH} (e.g. \texttt{80x24}) formatted string. + Set to empty string not to change console mode. Set to \texttt{Max} + to try to use largest available console mode. + \item \texttt{HideSelf}\\ \textbf{Type}: \texttt{plist\ boolean}\\ diff --git a/Docs/Sample.plist b/Docs/Sample.plist index dfb063ad..9e6db67e 100644 --- a/Docs/Sample.plist +++ b/Docs/Sample.plist @@ -353,6 +353,8 @@ Boot + ConsoleMode + HideSelf ReinstallProtocol diff --git a/Platform/OpenCore/OpenCoreMisc.c b/Platform/OpenCore/OpenCoreMisc.c index d46d7562..d6373272 100644 --- a/Platform/OpenCore/OpenCoreMisc.c +++ b/Platform/OpenCore/OpenCoreMisc.c @@ -209,5 +209,36 @@ OcMiscLateInit ( )); } + ParseConsoleMode ( + OC_BLOB_GET (&Config->Misc.Boot.ConsoleMode), + &Width, + &Height, + &SetMax + ); + + DEBUG (( + DEBUG_INFO, + "OC: Requested console mode is %u:%u@%u (max: %d) from %a\n", + Width, + Height, + Bpp, + 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 %u:%u@%u (max: %d) from %a - %r\n", + Width, + Height, + Bpp, + SetMax, + OC_BLOB_GET (&Config->Misc.Boot.ConsoleMode), + Status + )); + } + return Status; }