Skip to content

Commit

Permalink
OpenCoreUefi: Add support for ProtectSecureBoot
Browse files Browse the repository at this point in the history
  • Loading branch information
vit9696 committed Feb 8, 2020
1 parent 7186530 commit d811725
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 2 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ OpenCore Changelog
- Removed `ConsoleBehaviourOs` and `ConsoleBehaviourUi`
- Fixed providing ConsoleOutHandle GOP when running from Shell
- Added `PickerAttributes` option to colour picker
- Added `ProtectSecureBoot` option through FwRuntimeServices

#### v0.5.5
- Fixed CPU bus ratio calculation for Nehalem and Westmere
Expand Down
Binary file modified Docs/Configuration.pdf
Binary file not shown.
12 changes: 12 additions & 0 deletions Docs/Configuration.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1303,6 +1303,18 @@ \subsection{Quirks Properties}\label{booterpropsquirks}
As \texttt{AvoidRuntimeDefrag} resolves a similar problem, no known firmwares should need
this quirk. Do not use this unless you fully understand the consequences.

\item
\texttt{ProtectSecureBoot}\\
\textbf{Type}: \texttt{plist\ boolean}\\
\textbf{Failsafe}: \texttt{false}\\
\textbf{Description}: Protect UEFI Secure Boot variables from being written.

Reports security violation during attempts to write to \texttt{db}, \texttt{dbx},
\texttt{PK}, and \texttt{KEK} variables from the operating system.

\emph{Note}: This quirk mainly attempts to avoid issues with NVRAM implementations
with problematic defragmentation, such as select Insyde or \texttt{MacPro5,1}.

\item
\texttt{ProvideCustomSlide}\\
\textbf{Type}: \texttt{plist\ boolean}\\
Expand Down
Binary file modified Docs/Differences/Differences.pdf
Binary file not shown.
19 changes: 17 additions & 2 deletions Docs/Differences/Differences.tex
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
\documentclass[]{article}
%DIF LATEXDIFF DIFFERENCE FILE
%DIF DEL PreviousConfiguration.tex Thu Feb 6 00:43:28 2020
%DIF ADD ../Configuration.tex Sat Feb 8 22:43:16 2020
%DIF ADD ../Configuration.tex Sat Feb 8 23:35:07 2020

\usepackage{lmodern}
\usepackage{amssymb,amsmath}
Expand Down Expand Up @@ -1364,7 +1364,22 @@ \subsection{Quirks Properties}\label{booterpropsquirks}
this quirk. Do not use this unless you fully understand the consequences.

\item
\texttt{ProvideCustomSlide}\\
\DIFaddbegin \texttt{\DIFadd{ProtectSecureBoot}}\\
\textbf{\DIFadd{Type}}\DIFadd{: }\texttt{\DIFadd{plist\ boolean}}\\
\textbf{\DIFadd{Failsafe}}\DIFadd{: }\texttt{\DIFadd{false}}\\
\textbf{\DIFadd{Description}}\DIFadd{: Protect UEFI Secure Boot variables from being written.
}

\DIFadd{Reports security violation during attempts to write to }\texttt{\DIFadd{db}}\DIFadd{, }\texttt{\DIFadd{dbx}}\DIFadd{,
}\texttt{\DIFadd{PK}}\DIFadd{, and }\texttt{\DIFadd{KEK}} \DIFadd{variables from the operating system.
}

\emph{\DIFadd{Note}}\DIFadd{: This quirk mainly attempts to avoid issues with NVRAM implementations
with problematic defragmentation, such as select Insyde or }\texttt{\DIFadd{MacPro5,1}}\DIFadd{.
}

\item
\DIFaddend \texttt{ProvideCustomSlide}\\
\textbf{Type}: \texttt{plist\ boolean}\\
\textbf{Failsafe}: \texttt{false}\\
\textbf{Description}: Provide custom KASLR slide on low memory.
Expand Down
2 changes: 2 additions & 0 deletions Docs/Sample.plist
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,8 @@
<false/>
<key>ProtectCsmRegion</key>
<false/>
<key>ProtectSecureBoot</key>
<false/>
<key>ProvideCustomSlide</key>
<true/>
<key>SetupVirtualMap</key>
Expand Down
2 changes: 2 additions & 0 deletions Docs/SampleFull.plist
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,8 @@
<false/>
<key>ProtectCsmRegion</key>
<false/>
<key>ProtectSecureBoot</key>
<false/>
<key>ProvideCustomSlide</key>
<true/>
<key>SetupVirtualMap</key>
Expand Down
1 change: 1 addition & 0 deletions Platform/OpenCore/OpenCoreUefi.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@ OcLoadBooterUefiSupport (
AbcSettings.DevirtualiseMmio = Config->Booter.Quirks.DevirtualiseMmio;
AbcSettings.DisableSingleUser = Config->Booter.Quirks.DisableSingleUser;
AbcSettings.DisableVariableWrite = Config->Booter.Quirks.DisableVariableWrite;
AbcSettings.ProtectSecureBoot = Config->Booter.Quirks.ProtectSecureBoot;
AbcSettings.DiscardHibernateMap = Config->Booter.Quirks.DiscardHibernateMap;
AbcSettings.EnableSafeModeSlide = Config->Booter.Quirks.EnableSafeModeSlide;
AbcSettings.EnableWriteUnprotector = Config->Booter.Quirks.EnableWriteUnprotector;
Expand Down

0 comments on commit d811725

Please sign in to comment.