Skip to content

Commit

Permalink
OcConfigurationLib: Replace Block with Delete to reduce confusion
Browse files Browse the repository at this point in the history
  • Loading branch information
vit9696 committed May 16, 2020
1 parent ac4752a commit 0fb09c2
Show file tree
Hide file tree
Showing 14 changed files with 129 additions and 120 deletions.
3 changes: 2 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ OpenCore Changelog
- Fixed assertions on log exhaustion causing boot failures
- Fixed builtin text renderer failing to provide ConsoleControl
- Fixed compatibility with blit-only GOP (e.g. OVMF Bochs)
- Fixed ignoring `#` in DeviceProperty and NVRAM `Block`
- Fixed ignoring `#` in DeviceProperty and NVRAM `Delete`
- Renamed `Block` to `Delete` in `ACPI`,`DeviceProperties`, and `NVRAM`

#### v0.5.8
- Fixed invalid CPU object reference in SSDT-PLUG
Expand Down
Binary file modified Docs/Configuration.pdf
Binary file not shown.
42 changes: 22 additions & 20 deletions Docs/Configuration.tex
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,11 @@ \subsection{Configuration Structure}\label{configuration-structure}
\begin{itemize}
\tightlist
\item
\texttt{Add} provides support for data addition.
\texttt{Add} provides support for data addition. Existing data will
not be overridden, and needs to be handled separately with
\texttt{Delete} if necessary.
\item
\texttt{Block} provides support for data removal or ignorance.
\texttt{Delete} provides support for data removal.
\item
\texttt{Patch} provides support for data modification.
\item
Expand Down Expand Up @@ -770,17 +772,17 @@ \subsection{Properties}\label{acpiprops}
\textbf{Description}: Load selected tables from \texttt{OC/ACPI}
directory.

Designed to be filled with \texttt{plist\ dict} values, describing each block entry.
Designed to be filled with \texttt{plist\ dict} values, describing each add entry.
See \hyperref[acpipropsadd]{Add Properties} section below.

\item
\texttt{Block}\\
\texttt{Delete}\\
\textbf{Type}: \texttt{plist\ array}\\
\textbf{Failsafe}: Empty\\
\textbf{Description}: Remove selected tables from ACPI stack.

Designed to be filled with \texttt{plist\ dict} values, describing each block entry.
See \hyperref[acpipropsblock]{Block Properties} section below.
Designed to be filled with \texttt{plist\ dict} values, describing each delete entry.
See \hyperref[acpipropsdelete]{Delete Properties} section below.

\item
\texttt{Patch}\\
Expand Down Expand Up @@ -835,15 +837,15 @@ \subsection{Add Properties}\label{acpipropsadd}

\end{enumerate}

\subsection{Block Properties}\label{acpipropsblock}
\subsection{Delete Properties}\label{acpipropsdelete}

\begin{enumerate}
\item
\texttt{All}\\
\textbf{Type}: \texttt{plist\ boolean}\\
\textbf{Failsafe}: \texttt{false}\\
\textbf{Description}: If set to \texttt{true}, all ACPI tables matching the
condition will be dropped. Otherwise only first matched table.
condition will be deleted. Otherwise only first matched table.

\item
\texttt{Comment}\\
Expand Down Expand Up @@ -1118,7 +1120,7 @@ \subsection{Introduction}\label{booterintro}
with the same issue are known, consider this option to be first to check if you
have erratic boot failures.
\item \texttt{DisableIoMapper} quirk enabled, or \texttt{VT-d} disabled in
firmware settings if present, or ACPI DMAR table dropped.
firmware settings if present, or ACPI DMAR table deleted.
\item \textbf{No} `slide` boot argument present in NVRAM or anywhere else.
It is not necessary unless you cannot boot at all or see
\texttt{No slide values are usable! Use custom slide!} message in the log.
Expand Down Expand Up @@ -1508,13 +1510,13 @@ \subsection{Properties}\label{devpropsprops}
of deivce paths to a map (\texttt{plist\ dict}) of variable names and their values
in \texttt{plist\ metadata} format. Device paths must be provided in canonic string
format (e.g. \texttt{PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)}). Properties will only
be set if not present and not blocked.
be set if not present and not deleted.

\emph{Note}: Currently properties may only be (formerly) added by the original driver,
so unless a separate driver was installed, there is no reason to block the variables.
so unless a separate driver was installed, there is no reason to delete the variables.

\item
\texttt{Block}\\
\texttt{Delete}\\
\textbf{Type}: \texttt{plist\ dict}\\
\textbf{Description}: Removes device properties from a map (\texttt{plist\ dict})
of deivce paths to an array (\texttt{plist\ array}) of variable names in
Expand Down Expand Up @@ -1993,7 +1995,7 @@ \subsection{Quirks Properties}\label{kernelpropsquirks}
\textbf{Description}: Disables \texttt{IOMapper} support in XNU (VT-d),
which may conflict with the firmware implementation.

\emph{Note}: This option is a preferred alternative to dropping \texttt{DMAR}
\emph{Note}: This option is a preferred alternative to deleting \texttt{DMAR}
ACPI table and disabling VT-d in firmware preferences, which does not break
VT-d support in other systems in case they need it.

Expand Down Expand Up @@ -2189,7 +2191,7 @@ \subsection{Introduction}\label{miscintro}
custom BDS). Without \texttt{BootProtect} it also is possible that other operating systems
overwrite OpenCore, make sure to enable it if you plan to use them.

\emph{Note 2}: UEFI variable boot options' boot arguments will be dropped if present as they
\emph{Note 2}: UEFI variable boot options' boot arguments will be removed if present as they
may contain arguments compromising the operating system, which is undesired once secure boot
is enabled.

Expand Down Expand Up @@ -3030,16 +3032,16 @@ \subsection{Properties}\label{nvramprops}

Created variables get \texttt{EFI\_VARIABLE\_BOOTSERVICE\_ACCESS} and
\texttt{EFI\_VARIABLE\_RUNTIME\_ACCESS} attributes set.
Variables will only be set if not present or blocked. I.e. to overwrite
an existing variable value add the variable name to the \texttt{Block} section.
Variables will only be set if not present or deleted. I.e. to overwrite
an existing variable value add the variable name to the \texttt{Delete} section.
This approach enables to provide default values till the operating system
takes the lead.

\emph{Note}: If \texttt{plist\ key} does not conform to GUID format,
behaviour is undefined.

\item
\texttt{Block}\\
\texttt{Delete}\\
\textbf{Type}: \texttt{plist\ dict}\\
\textbf{Description}: Removes NVRAM variables from a map (\texttt{plist\ dict})
of GUIDs to an array (\texttt{plist\ array}) of variable names in
Expand All @@ -3060,7 +3062,7 @@ \subsection{Properties}\label{nvramprops}
\texttt{config.plist}.
\end{itemize}

Variable loading happens prior to \texttt{Block} (and \texttt{Add}) phases. Unless
Variable loading happens prior to \texttt{Delete} (and \texttt{Add}) phases. Unless
\texttt{LegacyOverwrite} is enabled, it will not overwrite any existing variable.
Variables allowed to be set must be specified in \texttt{LegacySchema}.
Third-party scripts may be used to create \texttt{nvram.plist}
Expand Down Expand Up @@ -5028,14 +5030,14 @@ \subsection{ProtocolOverrides Properties}\label{uefiprotoprops}
\textbf{Type}: \texttt{plist\ boolean}\\
\textbf{Failsafe}: \texttt{false}\\
\textbf{Description}: Reinstalls Data Hub protocol with a builtin version.
This will drop all previous properties if the protocol was already installed.
This will delete all previous properties if the protocol was already installed.

\item
\texttt{DeviceProperties}\\
\textbf{Type}: \texttt{plist\ boolean}\\
\textbf{Failsafe}: \texttt{false}\\
\textbf{Description}: Reinstalls Device Property protocol with a builtin
version. This will drop all previous properties if it was already installed.
version. This will delete all previous properties if it was already installed.
This may be used to ensure full compatibility on VMs or legacy Macs.

\item
Expand Down
Binary file modified Docs/Differences/Differences.pdf
Binary file not shown.
52 changes: 29 additions & 23 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 Fri May 15 23:18:56 2020
%DIF ADD ../Configuration.tex Sat May 16 00:25:16 2020
%DIF DEL PreviousConfiguration.tex Mon May 11 17:11:58 2020
%DIF ADD ../Configuration.tex Sun May 17 01:56:11 2020

\usepackage{lmodern}
\usepackage{amssymb,amsmath}
Expand Down Expand Up @@ -392,9 +392,11 @@ \subsection{Configuration Structure}\label{configuration-structure}
\begin{itemize}
\tightlist
\item
\texttt{Add} provides support for data addition.
\item
\texttt{Block} provides support for data removal or ignorance.
\texttt{Add} provides support for data addition. \DIFaddbegin \DIFadd{Existing data will
not be overridden, and needs to be handled separately with
}\texttt{\DIFadd{Delete}} \DIFadd{if necessary.
}\DIFaddend \item
\texttt{\DIFdelbegin \DIFdel{Block}\DIFdelend \DIFaddbegin \DIFadd{Delete}\DIFaddend } provides support for data removal\DIFdelbegin \DIFdel{or ignorance}\DIFdelend .
\item
\texttt{Patch} provides support for data modification.
\item
Expand Down Expand Up @@ -937,17 +939,18 @@ \subsection{Properties}\label{acpiprops}
\textbf{Description}: Load selected tables from \texttt{OC/ACPI}
directory.

Designed to be filled with \texttt{plist\ dict} values, describing each block entry.
Designed to be filled with \texttt{plist\ dict} values, describing each \DIFdelbegin \DIFdel{block }\DIFdelend \DIFaddbegin \DIFadd{add }\DIFaddend entry.
See \hyperref[acpipropsadd]{Add Properties} section below.

\item
\texttt{Block}\\
\texttt{\DIFdelbegin \DIFdel{Block}\DIFdelend \DIFaddbegin \DIFadd{Delete}\DIFaddend }\\
\textbf{Type}: \texttt{plist\ array}\\
\textbf{Failsafe}: Empty\\
\textbf{Description}: Remove selected tables from ACPI stack.

Designed to be filled with \texttt{plist\ dict} values, describing each block entry.
See \hyperref[acpipropsblock]{Block Properties} section below.
Designed to be filled with \texttt{plist\ dict} values, describing each \DIFdelbegin \DIFdel{block }\DIFdelend \DIFaddbegin \DIFadd{delete }\DIFaddend entry.
See \DIFdelbegin %DIFDELCMD < \hyperref[acpipropsblock]{Block Properties} %%%
\DIFdelend \DIFaddbegin \hyperref[acpipropsdelete]{Delete Properties} \DIFaddend section below.

\item
\texttt{Patch}\\
Expand Down Expand Up @@ -1002,15 +1005,18 @@ \subsection{Add Properties}\label{acpipropsadd}

\end{enumerate}

\subsection{Block Properties}\label{acpipropsblock}
\subsection{\DIFdelbegin \DIFdel{Block }\DIFdelend \DIFaddbegin \DIFadd{Delete }\DIFaddend Properties}\DIFdelbegin %DIFDELCMD < \label{acpipropsblock}
%DIFDELCMD < %%%
\DIFdelend \DIFaddbegin \label{acpipropsdelete}
\DIFaddend

\begin{enumerate}
\item
\texttt{All}\\
\textbf{Type}: \texttt{plist\ boolean}\\
\textbf{Failsafe}: \texttt{false}\\
\textbf{Description}: If set to \texttt{true}, all ACPI tables matching the
condition will be dropped. Otherwise only first matched table.
condition will be \DIFdelbegin \DIFdel{dropped}\DIFdelend \DIFaddbegin \DIFadd{deleted}\DIFaddend . Otherwise only first matched table.

\item
\texttt{Comment}\\
Expand Down Expand Up @@ -1285,7 +1291,7 @@ \subsection{Introduction}\label{booterintro}
with the same issue are known, consider this option to be first to check if you
have erratic boot failures.
\item \texttt{DisableIoMapper} quirk enabled, or \texttt{VT-d} disabled in
firmware settings if present, or ACPI DMAR table dropped.
firmware settings if present, or ACPI DMAR table \DIFdelbegin \DIFdel{dropped}\DIFdelend \DIFaddbegin \DIFadd{deleted}\DIFaddend .
\item \textbf{No} `slide` boot argument present in NVRAM or anywhere else.
It is not necessary unless you cannot boot at all or see
\texttt{No slide values are usable! Use custom slide!} message in the log.
Expand Down Expand Up @@ -1676,13 +1682,13 @@ \subsection{Properties}\label{devpropsprops}
of deivce paths to a map (\texttt{plist\ dict}) of variable names and their values
in \texttt{plist\ metadata} format. Device paths must be provided in canonic string
format (e.g. \texttt{PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)}). Properties will only
be set if not present and not blocked.
be set if not present and not \DIFdelbegin \DIFdel{blocked}\DIFdelend \DIFaddbegin \DIFadd{deleted}\DIFaddend .

\emph{Note}: Currently properties may only be (formerly) added by the original driver,
so unless a separate driver was installed, there is no reason to block the variables.
so unless a separate driver was installed, there is no reason to \DIFdelbegin \DIFdel{block }\DIFdelend \DIFaddbegin \DIFadd{delete }\DIFaddend the variables.

\item
\texttt{Block}\\
\texttt{\DIFdelbegin \DIFdel{Block}\DIFdelend \DIFaddbegin \DIFadd{Delete}\DIFaddend }\\
\textbf{Type}: \texttt{plist\ dict}\\
\textbf{Description}: Removes device properties from a map (\texttt{plist\ dict})
of deivce paths to an array (\texttt{plist\ array}) of variable names in
Expand Down Expand Up @@ -2161,7 +2167,7 @@ \subsection{Quirks Properties}\label{kernelpropsquirks}
\textbf{Description}: Disables \texttt{IOMapper} support in XNU (VT-d),
which may conflict with the firmware implementation.

\emph{Note}: This option is a preferred alternative to dropping \texttt{DMAR}
\emph{Note}: This option is a preferred alternative to \DIFdelbegin \DIFdel{dropping }\DIFdelend \DIFaddbegin \DIFadd{deleting }\DIFaddend \texttt{DMAR}
ACPI table and disabling VT-d in firmware preferences, which does not break
VT-d support in other systems in case they need it.

Expand Down Expand Up @@ -2364,7 +2370,7 @@ \subsection{Introduction}\label{miscintro}
overwrite OpenCore, make sure to enable it if you plan to use them.
}

\emph{\DIFadd{Note 2}}\DIFadd{: UEFI variable boot options' boot arguments will be dropped if present as they
\emph{\DIFadd{Note 2}}\DIFadd{: UEFI variable boot options' boot arguments will be removed if present as they
may contain arguments compromising the operating system, which is undesired once secure boot
is enabled.
}
Expand Down Expand Up @@ -3243,16 +3249,16 @@ \subsection{Properties}\label{nvramprops}

Created variables get \texttt{EFI\_VARIABLE\_BOOTSERVICE\_ACCESS} and
\texttt{EFI\_VARIABLE\_RUNTIME\_ACCESS} attributes set.
Variables will only be set if not present or blocked. I.e. to overwrite
an existing variable value add the variable name to the \texttt{Block} section.
Variables will only be set if not present or \DIFdelbegin \DIFdel{blocked}\DIFdelend \DIFaddbegin \DIFadd{deleted}\DIFaddend . I.e. to overwrite
an existing variable value add the variable name to the \texttt{\DIFdelbegin \DIFdel{Block}\DIFdelend \DIFaddbegin \DIFadd{Delete}\DIFaddend } section.
This approach enables to provide default values till the operating system
takes the lead.

\emph{Note}: If \texttt{plist\ key} does not conform to GUID format,
behaviour is undefined.

\item
\texttt{Block}\\
\texttt{\DIFdelbegin \DIFdel{Block}\DIFdelend \DIFaddbegin \DIFadd{Delete}\DIFaddend }\\
\textbf{Type}: \texttt{plist\ dict}\\
\textbf{Description}: Removes NVRAM variables from a map (\texttt{plist\ dict})
of GUIDs to an array (\texttt{plist\ array}) of variable names in
Expand All @@ -3273,7 +3279,7 @@ \subsection{Properties}\label{nvramprops}
\texttt{config.plist}.
\end{itemize}

Variable loading happens prior to \texttt{Block} (and \texttt{Add}) phases. Unless
Variable loading happens prior to \texttt{\DIFdelbegin \DIFdel{Block}\DIFdelend \DIFaddbegin \DIFadd{Delete}\DIFaddend } (and \texttt{Add}) phases. Unless
\texttt{LegacyOverwrite} is enabled, it will not overwrite any existing variable.
Variables allowed to be set must be specified in \texttt{LegacySchema}.
Third-party scripts may be used to create \texttt{nvram.plist}
Expand Down Expand Up @@ -5283,14 +5289,14 @@ \subsection{ProtocolOverrides Properties}\label{uefiprotoprops}
\textbf{Type}: \texttt{plist\ boolean}\\
\textbf{Failsafe}: \texttt{false}\\
\textbf{Description}: Reinstalls Data Hub protocol with a builtin version.
This will drop all previous properties if the protocol was already installed.
This will \DIFdelbegin \DIFdel{drop }\DIFdelend \DIFaddbegin \DIFadd{delete }\DIFaddend all previous properties if the protocol was already installed.

\item
\texttt{DeviceProperties}\\
\textbf{Type}: \texttt{plist\ boolean}\\
\textbf{Failsafe}: \texttt{false}\\
\textbf{Description}: Reinstalls Device Property protocol with a builtin
version. This will drop all previous properties if it was already installed.
version. This will \DIFdelbegin \DIFdel{drop }\DIFdelend \DIFaddbegin \DIFadd{delete }\DIFaddend all previous properties if it was already installed.
This may be used to ensure full compatibility on VMs or legacy Macs.

\item
Expand Down
10 changes: 5 additions & 5 deletions Docs/Sample.plist
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,13 @@
<string>SSDT-IMEI.aml</string>
</dict>
</array>
<key>Block</key>
<key>Delete</key>
<array>
<dict>
<key>All</key>
<false/>
<key>Comment</key>
<string>Drop CpuPm</string>
<string>Delete CpuPm</string>
<key>Enabled</key>
<false/>
<key>OemTableId</key>
Expand All @@ -141,7 +141,7 @@
<key>All</key>
<false/>
<key>Comment</key>
<string>Drop Cpu0Ist</string>
<string>Delete Cpu0Ist</string>
<key>Enabled</key>
<false/>
<key>OemTableId</key>
Expand Down Expand Up @@ -288,7 +288,7 @@
<data>AQAAAA==</data>
</dict>
</dict>
<key>Block</key>
<key>Delete</key>
<dict/>
</dict>
<key>Kernel</key>
Expand Down Expand Up @@ -705,7 +705,7 @@
<data>cnUtUlU6MjUy</data>
</dict>
</dict>
<key>Block</key>
<key>Delete</key>
<dict>
<key>4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14</key>
<array>
Expand Down
8 changes: 4 additions & 4 deletions Docs/SampleFull.plist
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,13 @@
<string>SSDT-IMEI.aml</string>
</dict>
</array>
<key>Block</key>
<key>Delete</key>
<array>
<dict>
<key>All</key>
<false/>
<key>Comment</key>
<string>Drop CpuPm</string>
<string>Delete CpuPm</string>
<key>Enabled</key>
<false/>
<key>OemTableId</key>
Expand All @@ -141,7 +141,7 @@
<key>All</key>
<false/>
<key>Comment</key>
<string>Drop Cpu0Ist</string>
<string>Delete Cpu0Ist</string>
<key>Enabled</key>
<false/>
<key>OemTableId</key>
Expand Down Expand Up @@ -705,7 +705,7 @@
<data>cnUtUlU6MjUy</data>
</dict>
</dict>
<key>Block</key>
<key>Delete</key>
<dict>
<key>4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14</key>
<array>
Expand Down
Loading

0 comments on commit 0fb09c2

Please sign in to comment.