提交 42c0095c 编写于 作者: V vit9696

Docs: Sync kernel matching documentation

上级 fec17e63
......@@ -12,6 +12,7 @@
\usepackage{longtable,booktabs}
\usepackage{footnote}
\usepackage{listings}
\usepackage{mathtools}
\usepackage{parskip}
\usepackage[margin=0.7in]{geometry}
\usepackage{titlesec}
......@@ -26,6 +27,14 @@
\renewcommand{\dateseparator}{.}
\makeatletter
\newcommand*{\bdiv}{%
\nonscript\mskip-\medmuskip\mkern5mu%
\mathbin{\operator@font div}\penalty900\mkern5mu%
\nonscript\mskip-\medmuskip
}
\makeatother
% Newer LaTeX versions should not add ligatures to listings, but for some reason
% it is not the case for me. As a result select PDF viewers copy wrong data.
\lstdefinestyle{ocbash}{
......@@ -730,6 +739,10 @@ can be downloaded from \href{https://github.com/acidanthera/MaciASL/releases}{Ac
\textbf{Description}: Match table signature to be equal to this value
unless all zero.
\emph{Note}: Make sure not to specify table signature when the sequence
needs to be replaced in multiple places. Especially when performing
different kinds of renames.
\end{enumerate}
\subsection{Patch Properties}\label{acpipropspatch}
......@@ -999,7 +1012,7 @@ sudo pmset powernap 0
sudo pmset standby 0
\end{lstlisting}
\emph{Note}: these settings may reset at hardware change and in certain other circumstances.
\emph{Note}: These settings may reset at hardware change and in certain other circumstances.
To view their current state use \texttt{pmset -g} command in Terminal.
\subsection{Properties}\label{booterprops}
......@@ -1350,13 +1363,56 @@ blocking.
(e.g. \texttt{Contents/MacOS/Lilu}).
\item
\texttt{MatchKernel}\\
\texttt{MaxKernel}\\
\textbf{Type}: \texttt{plist\ string}\\
\textbf{Failsafe}: Empty string\\
\textbf{Description}: Adds kernel driver on selected macOS version only.
The selection happens based on prefix match with the kernel version, i.e.
\texttt{16.7.0} will match macOS 10.12.6 and \texttt{16.} will match
any macOS 10.12.x version.
\textbf{Description}: Adds kernel driver on specified macOS version or older.
\hypertarget{kernmatch}Kernel version interpretation is implemented as follows:
\begin{align*}
\begin{aligned}
ParseDarwinVersion(\kappa,\lambda,\mu)=&(\lfloor\frac{\kappa}{10}\rfloor\cdot10
+ \kappa-\lfloor\frac{\kappa}{10}\rfloor\cdot10)\cdot10000 &&
\text{Where }\kappa\in(0,99)\text{ is kernel version major} \\
+ &(\lfloor\frac{\lambda}{10}\rfloor\cdot10
+ \lambda-\lfloor\frac{\lambda}{10}\rfloor\cdot10)\cdot100 &&
\text{Where }\lambda\in(0,99)\text{ is kernel version minor} \\
+ &(\lfloor\frac{\mu}{10}\rfloor\cdot10
+ \mu-\lfloor\frac{\mu}{10}\rfloor\cdot10) &&
\text{Where }\mu\in(0,99)\text{ is kernel version patch}
\end{aligned}
\end{align*}
Kernel version comparison is implemented as follows:
\begin{align*}
\alpha&=\begin{cases}
\vspace{-0.5cm}\mbox{\hspace{8cm}} & \mbox{\hspace{5cm}} \\
ParseDarwinVersion(\texttt{MinKernel}), & \text{If } \texttt{MinKernel} \text{ is valid} \\
0 & Otherwise
\end{cases} \\
\beta&=\begin{cases}
\vspace{-0.5cm}\mbox{\hspace{8cm}} & \mbox{\hspace{5cm}} \\
ParseDarwinVersion(\texttt{MaxKernel}), & \text{If } \texttt{MaxKernel} \text{ is valid} \\
\infty & Otherwise
\end{cases} \\
\gamma&=\begin{cases}
\vspace{-0.5cm}\mbox{\hspace{8cm}} & \mbox{\hspace{5cm}} \\
ParseDarwinVersion(FindDarwinVersion()), & \text{If valid } \texttt{"Darwin Kernel Version"} \text{ is found} \\
\infty & Otherwise
\end{cases} \\
& \hspace{5cm} f(\alpha,\beta,\gamma)=\alpha\leq\gamma\leq\beta
\end{align*}
Here $ParseDarwinVersion$ argument is assumed to be 3 integers obtained by splitting Darwin kernel version
string from left to right by the \texttt{.} symbol. $FindDarwinVersion$ function looks up
Darwin kernel version by locating \texttt{"Darwin Kernel Version $\kappa$.$\lambda$.$\mu$"} string
in the kernel image.
\item
\texttt{MinKernel}\\
\textbf{Type}: \texttt{plist\ string}\\
\textbf{Failsafe}: Empty string\\
\textbf{Description}: Adds kernel driver on specified macOS version or newer.
\emph{Note}: Refer to \hyperlink{kernmatch}{\texttt{Add} \texttt{MaxKernel} description} for matching logic.
\item
\texttt{PlistPath}\\
......@@ -1393,13 +1449,20 @@ blocking.
(e.g. \texttt{com.apple.driver.AppleTyMCEDriver}).
\item
\texttt{MatchKernel}\\
\texttt{MaxKernel}\\
\textbf{Type}: \texttt{plist\ string}\\
\textbf{Failsafe}: Empty string\\
\textbf{Description}: Blocks kernel driver on specified macOS version or older.
\emph{Note}: Refer to \hyperlink{kernmatch}{\texttt{Add} \texttt{MaxKernel} description} for matching logic.
\item
\texttt{MinKernel}\\
\textbf{Type}: \texttt{plist\ string}\\
\textbf{Failsafe}: Empty string\\
\textbf{Description}: Blocks kernel driver on selected macOS version only.
The selection happens based on prefix match with the kernel version, i.e.
\texttt{16.7.0} will match macOS 10.12.6 and \texttt{16.} will match
any macOS 10.12.x version.
\textbf{Description}: Blocks kernel driver on specified macOS version or newer.
\emph{Note}: Refer to \hyperlink{kernmatch}{\texttt{Add} \texttt{MaxKernel} description} for matching logic.
\end{enumerate}
......@@ -1494,13 +1557,20 @@ blocking.
otherwise.
\item
\texttt{MatchKernel}\\
\texttt{MaxKernel}\\
\textbf{Type}: \texttt{plist\ string}\\
\textbf{Failsafe}: Empty string\\
\textbf{Description}: Patches data on specified macOS version or older.
\emph{Note}: Refer to \hyperlink{kernmatch}{\texttt{Add} \texttt{MaxKernel} description} for matching logic.
\item
\texttt{MinKernel}\\
\textbf{Type}: \texttt{plist\ string}\\
\textbf{Failsafe}: Empty string\\
\textbf{Description}: Adds kernel driver to selected macOS version only.
The selection happens based on prefix match with the kernel version, i.e.
\texttt{16.7.0} will match macOS 10.12.6 and \texttt{16.} will match
any macOS 10.12.x version.
\textbf{Description}: Patches data on specified macOS version or newer.
\emph{Note}: Refer to \hyperlink{kernmatch}{\texttt{Add} \texttt{MaxKernel} description} for matching logic.
\item
\texttt{Replace}\\
......
\documentclass[]{article}
%DIF LATEXDIFF DIFFERENCE FILE
%DIF DEL PreviousConfiguration.tex Wed Sep 18 03:30:18 2019
%DIF ADD ../Configuration.tex Wed Sep 18 22:13:33 2019
%DIF DEL PreviousConfiguration.tex Wed Sep 25 12:29:43 2019
%DIF ADD ../Configuration.tex Wed Sep 25 16:55:02 2019
\usepackage{lmodern}
\usepackage{amssymb,amsmath}
......@@ -15,6 +15,9 @@
\usepackage{longtable,booktabs}
\usepackage{footnote}
\usepackage{listings}
%DIF 15a15
\usepackage{mathtools} %DIF >
%DIF -------
\usepackage{parskip}
\usepackage[margin=0.7in]{geometry}
\usepackage{titlesec}
......@@ -28,6 +31,16 @@
\tikzstyle{optional}=[dashed,fill=gray!50]
\renewcommand{\dateseparator}{.}
%DIF 28a29-36
%DIF >
\makeatletter %DIF >
\newcommand*{\bdiv}{% %DIF >
\nonscript\mskip-\medmuskip\mkern5mu% %DIF >
\mathbin{\operator@font div}\penalty900\mkern5mu% %DIF >
\nonscript\mskip-\medmuskip %DIF >
} %DIF >
\makeatother %DIF >
%DIF -------
% Newer LaTeX versions should not add ligatures to listings, but for some reason
% it is not the case for me. As a result select PDF viewers copy wrong data.
......@@ -92,8 +105,6 @@
\providecommand{\DIFaddend}{\global\booltrue{DIFkeeppage}\global\boolfalse{DIFchange}} %DIF PREAMBLE
\providecommand{\DIFdelbegin}{\global\booltrue{DIFkeeppage}\global\booltrue{DIFchange}} %DIF PREAMBLE
\providecommand{\DIFdelend}{\global\booltrue{DIFkeeppage}\global\boolfalse{DIFchange}} %DIF PREAMBLE
\providecommand{\DIFmodbegin}{\global\booltrue{DIFkeeppage}\global\booltrue{DIFchange}} %DIF PREAMBLE
\providecommand{\DIFmodend}{\global\booltrue{DIFkeeppage}\global\boolfalse{DIFchange}} %DIF PREAMBLE
%DIF IDENTICAL PREAMBLE %DIF PREAMBLE
\providecommand{\DIFaddFL}[1]{\DIFadd{#1}} %DIF PREAMBLE
\providecommand{\DIFdelFL}[1]{\DIFdel{#1}} %DIF PREAMBLE
......@@ -105,21 +116,17 @@
\providecommand{\DIFadd}[1]{\texorpdfstring{\DIFaddtex{#1}}{#1}} %DIF PREAMBLE
\providecommand{\DIFdel}[1]{\texorpdfstring{\DIFdeltex{#1}}{}} %DIF PREAMBLE
%DIF LISTINGS PREAMBLE %DIF PREAMBLE
\RequirePackage{listings} %DIF PREAMBLE
\RequirePackage{color} %DIF PREAMBLE
\lstdefinelanguage{DIFcode}{ %DIF PREAMBLE
%DIF DIFCODE_UNDERLINE %DIF PREAMBLE
moredelim=[il][\color{red}\sout]{\%DIF\ <\ }, %DIF PREAMBLE
moredelim=[il][\color{blue}\uwave]{\%DIF\ >\ } %DIF PREAMBLE
\lstdefinelanguage{codediff}{ %DIF PREAMBLE
moredelim=**[is][\color{red}]{*!----}{----!*}, %DIF PREAMBLE
moredelim=**[is][\color{blue}]{*!++++}{++++!*} %DIF PREAMBLE
} %DIF PREAMBLE
\lstdefinestyle{DIFverbatimstyle}{ %DIF PREAMBLE
language=DIFcode, %DIF PREAMBLE
\lstdefinestyle{codediff}{ %DIF PREAMBLE
belowcaptionskip=.25\baselineskip, %DIF PREAMBLE
language=codediff, %DIF PREAMBLE
basicstyle=\ttfamily, %DIF PREAMBLE
columns=fullflexible, %DIF PREAMBLE
keepspaces=true %DIF PREAMBLE
keepspaces=true, %DIF PREAMBLE
} %DIF PREAMBLE
\lstnewenvironment{DIFverbatim}{\lstset{style=DIFverbatimstyle}}{} %DIF PREAMBLE
\lstnewenvironment{DIFverbatim*}{\lstset{style=DIFverbatimstyle,showspaces=true}}{} %DIF PREAMBLE
%DIF END PREAMBLE EXTENSION ADDED BY LATEXDIFF
\begin{document}
......@@ -790,7 +797,12 @@ can be downloaded from \href{https://github.com/acidanthera/MaciASL/releases}{Ac
\textbf{Description}: Match table signature to be equal to this value
unless all zero.
\end{enumerate}
\DIFaddbegin \emph{\DIFadd{Note}}\DIFadd{: Make sure not to specify table signature when the sequence
needs to be replaced in multiple places. Especially when performing
different kinds of renames.
}
\DIFaddend \end{enumerate}
\subsection{Patch Properties}\label{acpipropspatch}
......@@ -1059,7 +1071,7 @@ sudo pmset powernap 0
sudo pmset standby 0
\end{lstlisting}
\emph{Note}: these settings may reset at hardware change and in certain other circumstances.
\emph{Note}: \DIFdelbegin \DIFdel{these }\DIFdelend \DIFaddbegin \DIFadd{These }\DIFaddend settings may reset at hardware change and in certain other circumstances.
To view their current state use \texttt{pmset -g} command in Terminal.
\subsection{Properties}\label{booterprops}
......@@ -1410,15 +1422,66 @@ blocking.
(e.g. \texttt{Contents/MacOS/Lilu}).
\item
\texttt{MatchKernel}\\
\texttt{\DIFdelbegin \DIFdel{MatchKernel}\DIFdelend \DIFaddbegin \DIFadd{MaxKernel}\DIFaddend }\\
\textbf{Type}: \texttt{plist\ string}\\
\textbf{Failsafe}: Empty string\\
\textbf{Description}: Adds kernel driver on selected macOS version only.
The selection happens based on prefix match with the kernel version, i.e.
\texttt{16.7.0} will match macOS 10.12.6 and \texttt{16.} will match
any macOS 10.12.x version.
\textbf{Description}: Adds kernel driver on \DIFdelbegin \DIFdel{selected macOS version only.
The selection happens based on prefix match with the kernel version, i.
e.
}\DIFdelend \DIFaddbegin \DIFadd{specified macOS version or older.
}
\hypertarget{kernmatch}\DIFadd{Kernel version interpretation is implemented as follows:
}\begin{align*}
\DIFadd{\begin{aligned}
ParseDarwinVersion(\kappa,\lambda,\mu)=&(\lfloor\frac{\kappa}{10}\rfloor\cdot10
+ \kappa-\lfloor\frac{\kappa}{10}\rfloor\cdot10)\cdot10000 &&
\text{Where }\kappa\in(0,99)\text{ is kernel version major} \\
+ &(\lfloor\frac{\lambda}{10}\rfloor\cdot10
+ \lambda-\lfloor\frac{\lambda}{10}\rfloor\cdot10)\cdot100 &&
\text{Where }\lambda\in(0,99)\text{ is kernel version minor} \\
+ &(\lfloor\frac{\mu}{10}\rfloor\cdot10
+ \mu-\lfloor\frac{\mu}{10}\rfloor\cdot10) &&
\text{Where }\mu\in(0,99)\text{ is kernel version patch}
\end{aligned}
}\end{align*}
\DIFadd{Kernel version comparison is implemented as follows:
}\begin{align*}
\DIFadd{\alpha}&\DIFadd{=\begin{cases}
\vspace{-0.5cm}\mbox{\hspace{8cm}} & \mbox{\hspace{5cm}} \\
ParseDarwinVersion(\texttt{MinKernel}), & \text{If } \texttt{MinKernel} \text{ is valid} \\
0 & Otherwise
\end{cases} }\\
\DIFadd{\beta}&\DIFadd{=\begin{cases}
\vspace{-0.5cm}\mbox{\hspace{8cm}} & \mbox{\hspace{5cm}} \\
ParseDarwinVersion(\texttt{MaxKernel}), & \text{If } \texttt{MaxKernel} \text{ is valid} \\
\infty & Otherwise
\end{cases} }\\
\DIFadd{\gamma}&\DIFadd{=\begin{cases}
\vspace{-0.5cm}\mbox{\hspace{8cm}} & \mbox{\hspace{5cm}} \\
ParseDarwinVersion(FindDarwinVersion()), & \text{If valid } \texttt{"Darwin Kernel Version"} \text{ is found} \\
\infty & Otherwise
\end{cases} }\\
& \DIFadd{\hspace{5cm} f(\alpha,\beta,\gamma)=\alpha\leq\gamma\leq\beta
}\end{align*}
\DIFadd{Here $ParseDarwinVersion$ argument is assumed to be 3 integers obtained by splitting Darwin kernel version
string from left to right by the }\texttt{\DIFadd{.}} \DIFadd{symbol. $FindDarwinVersion$ function looks up
Darwin kernel version by locating }\texttt{\DIFadd{"Darwin Kernel Version $\kappa$.$\lambda$.$\mu$"}} \DIFadd{string
in the kernel image.
}
\item
\DIFaddend \texttt{\DIFdelbegin \DIFdel{16.7.0}\DIFdelend \DIFaddbegin \DIFadd{MinKernel}\DIFaddend }\DIFdelbegin \DIFdel{will match macOS 10.12.6 and }\texttt{\DIFdel{16.}} %DIFAUXCMD
\DIFdel{will match
any macOS 10.12.x version }\DIFdelend \DIFaddbegin \\
\textbf{\DIFadd{Type}}\DIFadd{: }\texttt{\DIFadd{plist\ string}}\\
\textbf{\DIFadd{Failsafe}}\DIFadd{: Empty string}\\
\textbf{\DIFadd{Description}}\DIFadd{: Adds kernel driver on specified macOS version or newer}\DIFaddend .
\DIFaddbegin \emph{\DIFadd{Note}}\DIFadd{: Refer to }\hyperlink{kernmatch}{\texttt{Add} \texttt{MaxKernel} description} \DIFadd{for matching logic.
}
\DIFaddend \item
\texttt{PlistPath}\\
\textbf{Type}: \texttt{plist\ string}\\
\textbf{Failsafe}: Empty string\\
......@@ -1453,15 +1516,30 @@ blocking.
(e.g. \texttt{com.apple.driver.AppleTyMCEDriver}).
\item
\texttt{MatchKernel}\\
\texttt{\DIFdelbegin \DIFdel{MatchKernel}\DIFdelend \DIFaddbegin \DIFadd{MaxKernel}\DIFaddend }\\
\textbf{Type}: \texttt{plist\ string}\\
\textbf{Failsafe}: Empty string\\
\textbf{Description}: Blocks kernel driver on selected macOS version only.
The selection happens based on prefix match with the kernel version, i.e.
\texttt{16.7.0} will match macOS 10.12.6 and \texttt{16.} will match
any macOS 10.12.x version.
\textbf{Description}: Blocks kernel driver on \DIFdelbegin \DIFdel{selected macOS version only.
The selection happens based on prefix match with the kernel version, i.
e.
}\DIFdelend \DIFaddbegin \DIFadd{specified macOS version or older.
}
\end{enumerate}
\emph{\DIFadd{Note}}\DIFadd{: Refer to }\hyperlink{kernmatch}{\texttt{Add} \texttt{MaxKernel} description} \DIFadd{for matching logic.
}
\item
\DIFaddend \texttt{\DIFdelbegin \DIFdel{16.7.0}\DIFdelend \DIFaddbegin \DIFadd{MinKernel}\DIFaddend }\DIFdelbegin \DIFdel{will match macOS 10.12.6 and }\texttt{\DIFdel{16.}} %DIFAUXCMD
\DIFdel{will match
any macOS 10.12.x version }\DIFdelend \DIFaddbegin \\
\textbf{\DIFadd{Type}}\DIFadd{: }\texttt{\DIFadd{plist\ string}}\\
\textbf{\DIFadd{Failsafe}}\DIFadd{: Empty string}\\
\textbf{\DIFadd{Description}}\DIFadd{: Blocks kernel driver on specified macOS version or newer}\DIFaddend .
\DIFaddbegin \emph{\DIFadd{Note}}\DIFadd{: Refer to }\hyperlink{kernmatch}{\texttt{Add} \texttt{MaxKernel} description} \DIFadd{for matching logic.
}
\DIFaddend \end{enumerate}
\subsection{Emulate Properties}\label{kernelpropsemu}
......@@ -1554,15 +1632,30 @@ blocking.
otherwise.
\item
\texttt{MatchKernel}\\
\texttt{\DIFdelbegin \DIFdel{MatchKernel}\DIFdelend \DIFaddbegin \DIFadd{MaxKernel}\DIFaddend }\\
\textbf{Type}: \texttt{plist\ string}\\
\textbf{Failsafe}: Empty string\\
\textbf{Description}: Adds kernel driver to selected macOS version only.
The selection happens based on prefix match with the kernel version, i.e.
\texttt{16.7.0} will match macOS 10.12.6 and \texttt{16.} will match
any macOS 10.12.x version.
\textbf{Description}: \DIFdelbegin \DIFdel{Adds kernel driver to selected macOS version only.
The selection happens based on prefix match with the kernel version, i.
e.
}\DIFdelend \DIFaddbegin \DIFadd{Patches data on specified macOS version or older.
}
\emph{\DIFadd{Note}}\DIFadd{: Refer to }\hyperlink{kernmatch}{\texttt{Add} \texttt{MaxKernel} description} \DIFadd{for matching logic.
}
\item
\DIFaddend \texttt{\DIFdelbegin \DIFdel{16.7.0}\DIFdelend \DIFaddbegin \DIFadd{MinKernel}\DIFaddend }\DIFdelbegin \DIFdel{will match macOS 10.12.6 and }\texttt{\DIFdel{16.}} %DIFAUXCMD
\DIFdel{will match
any macOS 10.12.x version }\DIFdelend \DIFaddbegin \\
\textbf{\DIFadd{Type}}\DIFadd{: }\texttt{\DIFadd{plist\ string}}\\
\textbf{\DIFadd{Failsafe}}\DIFadd{: Empty string}\\
\textbf{\DIFadd{Description}}\DIFadd{: Patches data on specified macOS version or newer}\DIFaddend .
\DIFaddbegin \emph{\DIFadd{Note}}\DIFadd{: Refer to }\hyperlink{kernmatch}{\texttt{Add} \texttt{MaxKernel} description} \DIFadd{for matching logic.
}
\DIFaddend \item
\texttt{Replace}\\
\textbf{Type}: \texttt{plist\ data}\\
\textbf{Failsafe}: Empty data\\
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册