提交 c760d990 编写于 作者: V vit9696

Docs: Add various missing bits

closes acidanthera/bugtracker#726
上级 7bd3c46b
...@@ -117,18 +117,24 @@ operating system. It is to be read as the official clarification of expected ...@@ -117,18 +117,24 @@ operating system. It is to be read as the official clarification of expected
OpenCore behaviour. All deviations, if found in published OpenCore releases, OpenCore behaviour. All deviations, if found in published OpenCore releases,
shall be considered documentation or implementation bugs, and are requested to be shall be considered documentation or implementation bugs, and are requested to be
reported through \href{https://github.com/acidanthera/bugtracker}{Acidanthera Bugtracker}. reported through \href{https://github.com/acidanthera/bugtracker}{Acidanthera Bugtracker}.
All other sources or translations of this document are unofficial and may contain errors.
This document is structured as a specification, and is not meant to provide a step by This document is structured as a specification, and is not meant to provide a step by
step algorithm for configuring end-user board support package (BSP). Any third-party step algorithm for configuring end-user board support package (BSP). The intended audience
articles, tools, books, etc., providing such material are prone to their authors' of the document are programmers and engineers with basic understanding of macOS internals
preferences, tastes, this document misinterpretation, and essential obsolescence. and UEFI functioning. For these reasons this document is available exclusively in English,
In case you still use these sources, for example, and all other sources or translations of this document are unofficial and may
contain errors.
Third-party articles, tools, books, and alike may be more useful for a wider audience as
they could provide guide-like material. However, they are prone to their authors' preferences,
tastes, this document misinterpretation, and essential obsolescence.
In case you use these sources, for example, \href{https://dortania.github.io}{Dortania}'s
\href{https://dortania.github.io/OpenCore-Desktop-Guide}{OpenCore Desktop Guide} \href{https://dortania.github.io/OpenCore-Desktop-Guide}{OpenCore Desktop Guide}
(\href{https://dortania.github.io/getting-started}{parent link}), and \href{https://dortania.github.io/getting-started}{related material},
please ensure following this document for every made decision and judging its consequences. please ensure to follow this document for every made decision and judge its consequences.
Regardless of the sources used you are required to fully understand every dedicated OpenCore
configuration option and concept prior to reporting any issues in Be warned that regardless of the sources used you are required to fully understand every
dedicated OpenCore configuration option and concept prior to reporting any issues in
\href{https://github.com/acidanthera/bugtracker}{Acidanthera Bugtracker}. \href{https://github.com/acidanthera/bugtracker}{Acidanthera Bugtracker}.
\subsection{Generic Terms}\label{generic-terms} \subsection{Generic Terms}\label{generic-terms}
...@@ -449,7 +455,7 @@ be relied upon, and all fields must be properly specified in the configuration. ...@@ -449,7 +455,7 @@ be relied upon, and all fields must be properly specified in the configuration.
child [missing] {} child [missing] {}
child [missing] {} child [missing] {}
child [missing] {} child [missing] {}
child { node [optional] {boot}} child { node [optional] {boot}}
child { node [optional] {nvram.plist}} child { node [optional] {nvram.plist}}
child { node [optional] {opencore-YYYY-MM-DD-HHMMSS.txt}} child { node [optional] {opencore-YYYY-MM-DD-HHMMSS.txt}}
child { node [optional] {panic-YYYY-MM-DD-HHMMSS.txt}} child { node [optional] {panic-YYYY-MM-DD-HHMMSS.txt}}
...@@ -726,7 +732,9 @@ is available, and inline for \texttt{static} variables and functions. ...@@ -726,7 +732,9 @@ is available, and inline for \texttt{static} variables and functions.
\href{https://github.com/acidanthera/bugtracker/issues/483}{acidanthera/bugtracker\#483}. \href{https://github.com/acidanthera/bugtracker/issues/483}{acidanthera/bugtracker\#483}.
\end{itemize} \end{itemize}
\textbf{Debugging}. The codebase incorporates EDK II debugging and few custom features to improve the experience. \subsection{Debugging}\label{configuration-debug}
The codebase incorporates EDK II debugging and few custom features to improve the experience.
\begin{itemize} \begin{itemize}
\tightlist \tightlist
\item Use module prefixes, 2-5 letters followed by a colon (\texttt{:}), for debug messages. For \texttt{OpenCorePkg} \item Use module prefixes, 2-5 letters followed by a colon (\texttt{:}), for debug messages. For \texttt{OpenCorePkg}
...@@ -746,6 +754,9 @@ for extensive messages that should not appear in NVRAM log that is heavily limit ...@@ -746,6 +754,9 @@ for extensive messages that should not appear in NVRAM log that is heavily limit
\texttt{DEBUG\_WARN} for all other human visible errors, \texttt{RELEASE} builds included. \texttt{DEBUG\_WARN} for all other human visible errors, \texttt{RELEASE} builds included.
\end{itemize} \end{itemize}
When trying to find the problematic change it is useful to rely on
\href{https://git-scm.com/docs/git-bisect}{\texttt{git-bisect}} functionality.
\section{ACPI}\label{acpi} \section{ACPI}\label{acpi}
\subsection{Introduction}\label{acpiintro} \subsection{Introduction}\label{acpiintro}
...@@ -762,6 +773,26 @@ To compile and disassemble ACPI tables \href{https://github.com/acpica/acpica}{i ...@@ -762,6 +773,26 @@ To compile and disassemble ACPI tables \href{https://github.com/acpica/acpica}{i
can be used developed by \href{https://www.acpica.org}{ACPICA}. GUI front-end to iASL compiler can be used developed by \href{https://www.acpica.org}{ACPICA}. GUI front-end to iASL compiler
can be downloaded from \href{https://github.com/acidanthera/MaciASL/releases}{Acidanthera/MaciASL}. can be downloaded from \href{https://github.com/acidanthera/MaciASL/releases}{Acidanthera/MaciASL}.
ACPI changes apply globally (to every operating system) with the following effective order:
\begin{itemize}
\tightlist
\item \texttt{Patch} is processed.
\item \texttt{Delete} is processed.
\item \texttt{Add} is processed.
\item \texttt{Quirks} are processed.
\end{itemize}
Applying the changes globally resolves the problems of incorrect operating system
detection, which is not possible before the operating system boots according to
the ACPI specification, operating system chainloading, and harder ACPI debugging.
For this reason it may be required to carefully use \texttt{\_OSI} method when
writing the changes.
Applying the patches early makes it possible to write so called ``proxy'' patches,
where the original method is patched in the original table and is implemented in
the patched table.
\subsection{Properties}\label{acpiprops} \subsection{Properties}\label{acpiprops}
\begin{enumerate} \begin{enumerate}
...@@ -1021,6 +1052,11 @@ Several cases, where patching actually does make sense, include: ...@@ -1021,6 +1052,11 @@ Several cases, where patching actually does make sense, include:
Tianocore \href{https://github.com/acidanthera/audk/blob/master/MdePkg/Include/IndustryStandard/AcpiAml.h}{AcpiAml.h} Tianocore \href{https://github.com/acidanthera/audk/blob/master/MdePkg/Include/IndustryStandard/AcpiAml.h}{AcpiAml.h}
source file may help understanding ACPI opcodes. source file may help understanding ACPI opcodes.
\emph{Note}: Patches of different \texttt{Find} and \texttt{Replace} lengths
are unsupported as they may corrupt ACPI tables and make you system unstable
due to area relocation. If you need such changes you may utilities ``proxy''
patching or \texttt{NOP} the remaining area.
\subsection{Quirks Properties}\label{acpipropsquirks} \subsection{Quirks Properties}\label{acpipropsquirks}
\begin{enumerate} \begin{enumerate}
...@@ -2195,8 +2231,8 @@ overwrite OpenCore, make sure to enable it if you plan to use them. ...@@ -2195,8 +2231,8 @@ overwrite OpenCore, make sure to enable it if you plan to use them.
may contain arguments compromising the operating system, which is undesired once secure boot may contain arguments compromising the operating system, which is undesired once secure boot
is enabled. is enabled.
\emph{Note 3}: Some operating systems, namely Windows, will create their boot option and \emph{Note 3}: Some operating systems, namely Windows, will create their boot option and
mark it as top most upon first boot or after NVRAM Reset. When this happens default boot mark it as top most upon first boot or after NVRAM Reset. When this happens default boot
entry choice will update till next manual reconfiguration. entry choice will update till next manual reconfiguration.
\subsection{Properties}\label{miscprops} \subsection{Properties}\label{miscprops}
...@@ -3284,7 +3320,7 @@ troubleshooting: ...@@ -3284,7 +3320,7 @@ troubleshooting:
\item \texttt{0x0B} -- \texttt{EXITBS:END} (forced serial only). \item \texttt{0x0B} -- \texttt{EXITBS:END} (forced serial only).
\item \texttt{0x0C} -- \texttt{UNKNOWN}. \item \texttt{0x0C} -- \texttt{UNKNOWN}.
\end{itemize} \end{itemize}
In 10.15 debugging support was mostly broken before 10.15.4 due to some In 10.15 debugging support was mostly broken before 10.15.4 due to some
kind of refactoring and introduction of a kind of refactoring and introduction of a
\href{https://github.com/acidanthera/EfiPkg/blob/master/Include/Protocol/AppleDebugLog.h}{new debug protocol}. \href{https://github.com/acidanthera/EfiPkg/blob/master/Include/Protocol/AppleDebugLog.h}{new debug protocol}.
...@@ -3551,6 +3587,7 @@ be used. Version with macOS specific enhancements can be downloaded from ...@@ -3551,6 +3587,7 @@ be used. Version with macOS specific enhancements can be downloaded from
It is dangerous to use Apple in SMBIOS vendor fields for reasons given It is dangerous to use Apple in SMBIOS vendor fields for reasons given
in \texttt{SystemManufacturer} description. However, certain firmwares in \texttt{SystemManufacturer} description. However, certain firmwares
may not provide valid values otherwise, which could break some software. may not provide valid values otherwise, which could break some software.
\item \item
\texttt{AdviseWindows}\\ \texttt{AdviseWindows}\\
\textbf{Type}: \texttt{plist\ boolean}\\ \textbf{Type}: \texttt{plist\ boolean}\\
...@@ -4565,8 +4602,8 @@ functioning. Feature highlights: ...@@ -4565,8 +4602,8 @@ functioning. Feature highlights:
\texttt{OCAU: 1/3 PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x1)/VenMsg(<redacted>,00000000) (\textbf{4 outputs})}\\ \texttt{OCAU: 1/3 PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x1)/VenMsg(<redacted>,00000000) (\textbf{4 outputs})}\\
\texttt{OCAU: 2/3 PciRoot(0x0)/Pci(0x3,0x0)/VenMsg(<redacted>,00000000) (\textbf{1 outputs})}\\ \texttt{OCAU: 2/3 PciRoot(0x0)/Pci(0x3,0x0)/VenMsg(<redacted>,00000000) (\textbf{1 outputs})}\\
\texttt{OCAU: 3/3 PciRoot(0x0)/Pci(0x1B,0x0)/VenMsg(<redacted>,02000000) (\textbf{7 outputs})} \texttt{OCAU: 3/3 PciRoot(0x0)/Pci(0x1B,0x0)/VenMsg(<redacted>,02000000) (\textbf{7 outputs})}
The quickest way to find the right port is to bruteforce the values from \texttt{0} to \texttt{N - 1}. The quickest way to find the right port is to bruteforce the values from \texttt{0} to \texttt{N - 1}.
\item \item
\texttt{AudioSupport}\\ \texttt{AudioSupport}\\
...@@ -5408,6 +5445,21 @@ you will need \texttt{debug=0x8} boot argument. ...@@ -5408,6 +5445,21 @@ you will need \texttt{debug=0x8} boot argument.
using \texttt{UEFI Shell} (bundled with OpenCore) may help to see using \texttt{UEFI Shell} (bundled with OpenCore) may help to see
early debug messages. early debug messages.
\item
\textbf{How to debug macOS boot failure?}
\begin{itemize}
\tightlist
\item Refer to \texttt{boot-args} values like \texttt{debug=0x100}, \texttt{keepsyms=1},
\texttt{-v}, and similar.
\item Do not forget about \texttt{AppleDebug} and \texttt{ApplePanic} properties.
\item Take care of \texttt{Booter}, \texttt{Kernel}, and \texttt{UEFI} quirks.
\item Consider using serial port to inspect early kernel boot failures. For this you may
need \texttt{debug=0x108}, \texttt{serial=5}, and \texttt{msgbuf=1048576} arguments.
Refer to the patches in Sample.plist when dying before serial init.
\item Always read the logs carefully.
\end{itemize}
\item \item
\textbf{How to customise boot entries?} \textbf{How to customise boot entries?}
...@@ -5458,8 +5510,8 @@ you will need \texttt{debug=0x8} boot argument. ...@@ -5458,8 +5510,8 @@ you will need \texttt{debug=0x8} boot argument.
Sure, most relatively modern Mac models including \texttt{MacPro5,1} and virtual machines Sure, most relatively modern Mac models including \texttt{MacPro5,1} and virtual machines
are fully supported. Even though there are little to none specific details relevant to are fully supported. Even though there are little to none specific details relevant to
Mac hardware, some ongoing instructions can be found in Mac hardware, some ongoing instructions can be found on
\href{https://github.com/acidanthera/bugtracker/issues/377}{acidanthera/bugtracker\#377}. \href{https://forums.macrumors.com/threads/opencore-on-the-mac-pro.2207814}{MacRumors.com}.
\item \item
\textbf{Why do Find\&Replace patches must equal in length?} \textbf{Why do Find\&Replace patches must equal in length?}
...@@ -5468,7 +5520,41 @@ you will need \texttt{debug=0x8} boot argument. ...@@ -5468,7 +5520,41 @@ you will need \texttt{debug=0x8} boot argument.
\href{https://en.wikipedia.org/w/index.php?title=Relative_addressing}{relative addressing}. \href{https://en.wikipedia.org/w/index.php?title=Relative_addressing}{relative addressing}.
For ACPI code this is risky, and is technically equivalent to ACPI table replacement, For ACPI code this is risky, and is technically equivalent to ACPI table replacement,
thus not implemented. More detailed explanation can be found on thus not implemented. More detailed explanation can be found on
\href{https://applelife.ru/posts/819790}{AppleLife.ru}. \href{https://applelife.ru/posts/819790}{AppleLife.ru} or in the ACPI section of this document.
\item
\textbf{How can I decide which \texttt{Booter} quirks to use?}
These quirks originate from \texttt{AptioMemoryFix} driver but provide a wider
set of changes specific to modern systems. Note, that \texttt{OpenRuntime}
driver is required for most configurations. To get a configuration similar
to \texttt{AptioMemoryFix} you may try enabling the following set of quirks:
\begin{itemize}
\tightlist
\item \texttt{ProvideConsoleGop} (UEFI quirk)
\item \texttt{AvoidRuntimeDefrag}
\item \texttt{DiscardHibernateMap}
\item \texttt{EnableSafeModeSlide}
\item \texttt{EnableWriteUnprotector}
\item \texttt{ForceExitBootServices}
\item \texttt{ProtectMemoryRegions}
\item \texttt{ProvideCustomSlide}
\item \texttt{RebuildAppleMemoryMap}
\item \texttt{SetupVirtualMap}
\end{itemize}
However, as of today such set is strongly discouraged as some of these quirks
are not necessary to be enabled or need additional quirks. For example,
\texttt{DevirtualiseMmio} and \texttt{ProtectUefiServices} are often required,
while \texttt{DiscardHibernateMap} and \texttt{ForceExitBootServices} are rarely
necessary.
Unfortunately for some quirks like \texttt{RebuildAppleMemoryMap},
\texttt{EnableWriteUnprotector}, \texttt{ProtectMemoryRegions},
\texttt{RebuildAppleMemoryMap}, \texttt{SetupVirtualMap},
and \texttt{SyncRuntimePermissions} there is no definite approach even on similar
systems, so trying all their combinations may be required for optimal setup.
Refer to individual quirk descriptions in this document for more details.
\end{enumerate} \end{enumerate}
......
\documentclass[]{article} \documentclass[]{article}
%DIF LATEXDIFF DIFFERENCE FILE %DIF LATEXDIFF DIFFERENCE FILE
%DIF DEL PreviousConfiguration.tex Mon May 11 17:11:58 2020 %DIF DEL PreviousConfiguration.tex Mon May 11 17:11:58 2020
%DIF ADD ../Configuration.tex Sun May 17 01:56:11 2020 %DIF ADD ../Configuration.tex Sun May 17 03:32:30 2020
\usepackage{lmodern} \usepackage{lmodern}
\usepackage{amssymb,amsmath} \usepackage{amssymb,amsmath}
...@@ -181,20 +181,32 @@ operating system. It is to be read as the official clarification of expected ...@@ -181,20 +181,32 @@ operating system. It is to be read as the official clarification of expected
OpenCore behaviour. All deviations, if found in published OpenCore releases, OpenCore behaviour. All deviations, if found in published OpenCore releases,
shall be considered documentation or implementation bugs, and are requested to be shall be considered documentation or implementation bugs, and are requested to be
reported through \href{https://github.com/acidanthera/bugtracker}{Acidanthera Bugtracker}. reported through \href{https://github.com/acidanthera/bugtracker}{Acidanthera Bugtracker}.
All other sources or translations of this document are unofficial and may contain errors. \DIFdelbegin \DIFdel{All other sources or translations of this document are unofficial and may contain errors.
}\DIFdelend
This document is structured as a specification, and is not meant to provide a step by This document is structured as a specification, and is not meant to provide a step by
step algorithm for configuring end-user board support package (BSP). Any third-party step algorithm for configuring end-user board support package (BSP). \DIFdelbegin \DIFdel{Any third-party
articles, tools, books, etc., providing such material are prone to their authors' }\DIFdelend \DIFaddbegin \DIFadd{The intended audience
preferences, tastes, this document misinterpretation, and essential obsolescence. of the document are programmers and engineers with basic understanding of macOS internals
In case you still use these sources, for example, and UEFI functioning. For these reasons this document is available exclusively in English,
\DIFdelbegin %DIFDELCMD < \href{https://dortania.github.io/OpenCore-Desktop-Guide}{Opencore Desktop Guide} and all other sources or translations of this document are unofficial and may
contain errors.
}
\DIFadd{Third-party }\DIFaddend articles, tools, books, \DIFdelbegin \DIFdel{etc. , providing such material }\DIFdelend \DIFaddbegin \DIFadd{and alike may be more useful for a wider audience as
they could provide guide-like material. However, they }\DIFaddend are prone to their authors' preferences,
tastes, this document misinterpretation, and essential obsolescence.
In case you \DIFdelbegin \DIFdel{still }\DIFdelend use these sources, for example, \DIFdelbegin %DIFDELCMD < \href{https://dortania.github.io/OpenCore-Desktop-Guide}{Opencore Desktop Guide}
%DIFDELCMD < %%% %DIFDELCMD < %%%
\DIFdelend \DIFaddbegin \href{https://dortania.github.io/OpenCore-Desktop-Guide}{OpenCore Desktop Guide} \DIFdel{(}%DIFDELCMD < \href{https://dortania.github.io/getting-started}{parent link}%%%
\DIFaddend (\href{https://dortania.github.io/getting-started}{parent link}), \DIFdel{)}\DIFdelend \DIFaddbegin \href{https://dortania.github.io}{Dortania}\DIFadd{'s
please ensure following this document for every made decision and judging its consequences. }\href{https://dortania.github.io/OpenCore-Desktop-Guide}{OpenCore Desktop Guide}
Regardless of the sources used you are required to fully understand every dedicated OpenCore \DIFadd{and }\href{https://dortania.github.io/getting-started}{related material}\DIFaddend ,
configuration option and concept prior to reporting any issues in please ensure \DIFdelbegin \DIFdel{following }\DIFdelend \DIFaddbegin \DIFadd{to follow }\DIFaddend this document for every made decision and \DIFdelbegin \DIFdel{judging }\DIFdelend \DIFaddbegin \DIFadd{judge }\DIFaddend its consequences.
\DIFdelbegin \DIFdel{Regardless }\DIFdelend \DIFaddbegin
\DIFadd{Be warned that regardless }\DIFaddend of the sources used you are required to fully understand every
dedicated OpenCore configuration option and concept prior to reporting any issues in
\href{https://github.com/acidanthera/bugtracker}{Acidanthera Bugtracker}. \href{https://github.com/acidanthera/bugtracker}{Acidanthera Bugtracker}.
\subsection{Generic Terms}\label{generic-terms} \subsection{Generic Terms}\label{generic-terms}
...@@ -586,7 +598,7 @@ be relied upon, and all fields must be properly specified in the configuration. ...@@ -586,7 +598,7 @@ be relied upon, and all fields must be properly specified in the configuration.
child [missing] {} child [missing] {}
child [missing] {} child [missing] {}
child [missing] {} child [missing] {}
child { node [optional] {boot}} child { node [optional] {boot}}
child { node [optional] {nvram.plist}} child { node [optional] {nvram.plist}}
child { node [optional] {opencore-YYYY-MM-DD-HHMMSS.txt}} child { node [optional] {opencore-YYYY-MM-DD-HHMMSS.txt}}
child { node [optional] {panic-YYYY-MM-DD-HHMMSS.txt}} child { node [optional] {panic-YYYY-MM-DD-HHMMSS.txt}}
...@@ -893,7 +905,10 @@ is available, and inline for \texttt{static} variables and functions. ...@@ -893,7 +905,10 @@ is available, and inline for \texttt{static} variables and functions.
\href{https://github.com/acidanthera/bugtracker/issues/483}{acidanthera/bugtracker\#483}. \href{https://github.com/acidanthera/bugtracker/issues/483}{acidanthera/bugtracker\#483}.
\end{itemize} \end{itemize}
\textbf{Debugging}. The codebase incorporates EDK II debugging and few custom features to improve the experience. \DIFdelbegin \textbf{\DIFdel{Debugging}}%DIFAUXCMD
\DIFdel{. }\DIFdelend \DIFaddbegin \subsection{\DIFadd{Debugging}}\label{configuration-debug}
\DIFaddend The codebase incorporates EDK II debugging and few custom features to improve the experience.
\begin{itemize} \begin{itemize}
\tightlist \tightlist
\item Use module prefixes, 2-5 letters followed by a colon (\texttt{:}), for debug messages. For \texttt{OpenCorePkg} \item Use module prefixes, 2-5 letters followed by a colon (\texttt{:}), for debug messages. For \texttt{OpenCorePkg}
...@@ -913,7 +928,11 @@ for extensive messages that should not appear in NVRAM log that is heavily limit ...@@ -913,7 +928,11 @@ for extensive messages that should not appear in NVRAM log that is heavily limit
\texttt{DEBUG\_WARN} for all other human visible errors, \texttt{RELEASE} builds included. \texttt{DEBUG\_WARN} for all other human visible errors, \texttt{RELEASE} builds included.
\end{itemize} \end{itemize}
\section{ACPI}\label{acpi} \DIFaddbegin \DIFadd{When trying to find the problematic change it is useful to rely on
}\href{https://git-scm.com/docs/git-bisect}{\texttt{git-bisect}} \DIFadd{functionality.
}
\DIFaddend \section{ACPI}\label{acpi}
\subsection{Introduction}\label{acpiintro} \subsection{Introduction}\label{acpiintro}
...@@ -929,7 +948,30 @@ To compile and disassemble ACPI tables \href{https://github.com/acpica/acpica}{i ...@@ -929,7 +948,30 @@ To compile and disassemble ACPI tables \href{https://github.com/acpica/acpica}{i
can be used developed by \href{https://www.acpica.org}{ACPICA}. GUI front-end to iASL compiler can be used developed by \href{https://www.acpica.org}{ACPICA}. GUI front-end to iASL compiler
can be downloaded from \href{https://github.com/acidanthera/MaciASL/releases}{Acidanthera/MaciASL}. can be downloaded from \href{https://github.com/acidanthera/MaciASL/releases}{Acidanthera/MaciASL}.
\subsection{Properties}\label{acpiprops} \DIFaddbegin \DIFadd{ACPI changes apply globally (to every operating system) with the following effective order:
}
\begin{itemize}
\tightlist
\item \texttt{\DIFadd{Patch}} \DIFadd{is processed.
}\item \texttt{\DIFadd{Delete}} \DIFadd{is processed.
}\item \texttt{\DIFadd{Add}} \DIFadd{is processed.
}\item \texttt{\DIFadd{Quirks}} \DIFadd{are processed.
}\end{itemize}
\DIFadd{Applying the changes globally resolves the problems of incorrect operating system
detection, which is not possible before the operating system boots according to
the ACPI specification, operating system chainloading, and harder ACPI debugging.
For this reason it may be required to carefully use }\texttt{\DIFadd{\_OSI}} \DIFadd{method when
writing the changes.
}
\DIFadd{Applying the patches early makes it possible to write so called ``proxy'' patches,
where the original method is patched in the original table and is implemented in
the patched table.
}
\DIFaddend \subsection{Properties}\label{acpiprops}
\begin{enumerate} \begin{enumerate}
\item \item
...@@ -1192,7 +1234,13 @@ Several cases, where patching actually does make sense, include: ...@@ -1192,7 +1234,13 @@ Several cases, where patching actually does make sense, include:
Tianocore \href{https://github.com/acidanthera/audk/blob/master/MdePkg/Include/IndustryStandard/AcpiAml.h}{AcpiAml.h} Tianocore \href{https://github.com/acidanthera/audk/blob/master/MdePkg/Include/IndustryStandard/AcpiAml.h}{AcpiAml.h}
source file may help understanding ACPI opcodes. source file may help understanding ACPI opcodes.
\subsection{Quirks Properties}\label{acpipropsquirks} \DIFaddbegin \emph{\DIFadd{Note}}\DIFadd{: Patches of different }\texttt{\DIFadd{Find}} \DIFadd{and }\texttt{\DIFadd{Replace}} \DIFadd{lengths
are unsupported as they may corrupt ACPI tables and make you system unstable
due to area relocation. If you need such changes you may utilities ``proxy''
patching or }\texttt{\DIFadd{NOP}} \DIFadd{the remaining area.
}
\DIFaddend \subsection{Quirks Properties}\label{acpipropsquirks}
\begin{enumerate} \begin{enumerate}
...@@ -2375,8 +2423,8 @@ may contain arguments compromising the operating system, which is undesired once ...@@ -2375,8 +2423,8 @@ may contain arguments compromising the operating system, which is undesired once
is enabled. is enabled.
} }
\emph{\DIFadd{Note 3}}\DIFadd{: Some operating systems, namely Windows, will create their boot option and \emph{\DIFadd{Note 3}}\DIFadd{: Some operating systems, namely Windows, will create their boot option and
mark it as top most upon first boot or after NVRAM Reset. When this happens default boot mark it as top most upon first boot or after NVRAM Reset. When this happens default boot
entry choice will update till next manual reconfiguration. entry choice will update till next manual reconfiguration.
} }
...@@ -3768,7 +3816,9 @@ be used. Version with macOS specific enhancements can be downloaded from ...@@ -3768,7 +3816,9 @@ be used. Version with macOS specific enhancements can be downloaded from
It is dangerous to use Apple in SMBIOS vendor fields for reasons given It is dangerous to use Apple in SMBIOS vendor fields for reasons given
in \texttt{SystemManufacturer} description. However, certain firmwares in \texttt{SystemManufacturer} description. However, certain firmwares
may not provide valid values otherwise, which could break some software. may not provide valid values otherwise, which could break some software.
\item \DIFaddbegin
\DIFaddend \item
\texttt{AdviseWindows}\\ \texttt{AdviseWindows}\\
\textbf{Type}: \texttt{plist\ boolean}\\ \textbf{Type}: \texttt{plist\ boolean}\\
\textbf{Failsafe}: \texttt{false}\\ \textbf{Failsafe}: \texttt{false}\\
...@@ -4790,7 +4840,7 @@ functioning. Feature highlights: ...@@ -4790,7 +4840,7 @@ functioning. Feature highlights:
\texttt{OCAU: 2/3 PciRoot(0x0)/Pci(0x3,0x0)/VenMsg(<redacted>,00000000) (\textbf{1 outputs})}\\ \texttt{OCAU: 2/3 PciRoot(0x0)/Pci(0x3,0x0)/VenMsg(<redacted>,00000000) (\textbf{1 outputs})}\\
\texttt{OCAU: 3/3 PciRoot(0x0)/Pci(0x1B,0x0)/VenMsg(<redacted>,02000000) (\textbf{7 outputs})} \texttt{OCAU: 3/3 PciRoot(0x0)/Pci(0x1B,0x0)/VenMsg(<redacted>,02000000) (\textbf{7 outputs})}
The quickest way to find the right port is to bruteforce the values from \texttt{0} to \texttt{N - 1}. The quickest way to find the right port is to bruteforce the values from \texttt{0} to \texttt{N - 1}.
\item \item
\texttt{AudioSupport}\\ \texttt{AudioSupport}\\
...@@ -5761,7 +5811,22 @@ you will need \texttt{debug=0x8} boot argument. ...@@ -5761,7 +5811,22 @@ you will need \texttt{debug=0x8} boot argument.
early debug messages. early debug messages.
\item \item
\textbf{How to customise boot entries?} \DIFaddbegin \textbf{\DIFadd{How to debug macOS boot failure?}}
\begin{itemize}
\tightlist
\item \DIFadd{Refer to }\texttt{\DIFadd{boot-args}} \DIFadd{values like }\texttt{\DIFadd{debug=0x100}}\DIFadd{, }\texttt{\DIFadd{keepsyms=1}}\DIFadd{,
}\texttt{\DIFadd{-v}}\DIFadd{, and similar.
}\item \DIFadd{Do not forget about }\texttt{\DIFadd{AppleDebug}} \DIFadd{and }\texttt{\DIFadd{ApplePanic}} \DIFadd{properties.
}\item \DIFadd{Take care of }\texttt{\DIFadd{Booter}}\DIFadd{, }\texttt{\DIFadd{Kernel}}\DIFadd{, and }\texttt{\DIFadd{UEFI}} \DIFadd{quirks.
}\item \DIFadd{Consider using serial port to inspect early kernel boot failures. For this you may
need }\texttt{\DIFadd{debug=0x108}}\DIFadd{, }\texttt{\DIFadd{serial=5}}\DIFadd{, and }\texttt{\DIFadd{msgbuf=1048576}} \DIFadd{arguments.
Refer to the patches in Sample.plist when dying before serial init.
}\item \DIFadd{Always read the logs carefully.
}\end{itemize}
\item
\DIFaddend \textbf{How to customise boot entries?}
OpenCore follows standard Apple Bless model and extracts the entry name OpenCore follows standard Apple Bless model and extracts the entry name
from \texttt{.contentDetails} and \texttt{.disk\_label.contentDetails} files in the from \texttt{.contentDetails} and \texttt{.disk\_label.contentDetails} files in the
...@@ -5810,8 +5875,10 @@ you will need \texttt{debug=0x8} boot argument. ...@@ -5810,8 +5875,10 @@ you will need \texttt{debug=0x8} boot argument.
Sure, most relatively modern Mac models including \texttt{MacPro5,1} and virtual machines Sure, most relatively modern Mac models including \texttt{MacPro5,1} and virtual machines
are fully supported. Even though there are little to none specific details relevant to are fully supported. Even though there are little to none specific details relevant to
Mac hardware, some ongoing instructions can be found in Mac hardware, some ongoing instructions can be found \DIFdelbegin \DIFdel{in
\href{https://github.com/acidanthera/bugtracker/issues/377}{acidanthera/bugtracker\#377}. }%DIFDELCMD < \href{https://github.com/acidanthera/bugtracker/issues/377}{acidanthera/bugtracker\#377}%%%
\DIFdelend \DIFaddbegin \DIFadd{on
}\href{https://forums.macrumors.com/threads/opencore-on-the-mac-pro.2207814}{MacRumors.com}\DIFaddend .
\item \item
\textbf{Why do Find\&Replace patches must equal in length?} \textbf{Why do Find\&Replace patches must equal in length?}
...@@ -5820,72 +5887,49 @@ you will need \texttt{debug=0x8} boot argument. ...@@ -5820,72 +5887,49 @@ you will need \texttt{debug=0x8} boot argument.
\href{https://en.wikipedia.org/w/index.php?title=Relative_addressing}{relative addressing}. \href{https://en.wikipedia.org/w/index.php?title=Relative_addressing}{relative addressing}.
For ACPI code this is risky, and is technically equivalent to ACPI table replacement, For ACPI code this is risky, and is technically equivalent to ACPI table replacement,
thus not implemented. More detailed explanation can be found on thus not implemented. More detailed explanation can be found on
\href{https://applelife.ru/posts/819790}{AppleLife.ru}. \href{https://applelife.ru/posts/819790}{AppleLife.ru} \DIFaddbegin \DIFadd{or in the ACPI section of this document}\DIFaddend .
\DIFdelbegin %DIFDELCMD <
%DIFDELCMD < \item \item
\item%DIFAUXCMD \textbf{How can I \DIFdelbegin \DIFdel{migrate from }\texttt{\DIFdel{AptioMemoryFix}}%DIFAUXCMD
%DIFDELCMD < %%% \DIFdelend \DIFaddbegin \DIFadd{decide which }\texttt{\DIFadd{Booter}} \DIFadd{quirks to use}\DIFaddend ?}
\textbf{\DIFdel{How can I migrate from }\texttt{\DIFdel{AptioMemoryFix}}%DIFAUXCMD
\DIFdel{?}}
%DIFAUXCMD
%DIFDELCMD <
%DIFDELCMD < %%% \DIFdelbegin \DIFdel{Behaviour similar to that of }\DIFdelend \DIFaddbegin \DIFadd{These quirks originate from }\DIFaddend \texttt{AptioMemoryFix} \DIFdelbegin \DIFdel{can be obtained by
\DIFdel{Behaviour similar to that of }\texttt{\DIFdel{AptioMemoryFix}} %DIFAUXCMD
\DIFdel{can be obtained by
installing }\texttt{\DIFdel{OpenRuntime}} %DIFAUXCMD installing }\texttt{\DIFdel{OpenRuntime}} %DIFAUXCMD
\DIFdel{driver and enabling the quirks listed below. \DIFdel{driver and enabling the quirks listed below. Please note, that most of these are not necessary to be enabled. Refer to their
Please note, that most of these are not necessary to be enabled. Refer to their
individual descriptions in this document for more details. individual descriptions in this document for more details.
}%DIFDELCMD < \begin{itemize} }\DIFdelend \DIFaddbegin \DIFadd{driver but provide a wider
\begin{itemize}%DIFAUXCMD set of changes specific to modern systems. Note, that }\texttt{\DIFadd{OpenRuntime}}
%DIFDELCMD < \tightlist \DIFadd{driver is required for most configurations. To get a configuration similar
%DIFDELCMD < \item %%% to }\texttt{\DIFadd{AptioMemoryFix}} \DIFadd{you may try enabling the following set of quirks:
\item%DIFAUXCMD }\DIFaddend \begin{itemize}
\texttt{\DIFdel{ProvideConsoleGop}} %DIFAUXCMD \tightlist
\DIFdel{(UEFI quirk) \item \texttt{ProvideConsoleGop} (UEFI quirk)
}%DIFDELCMD < \item %%% \item \texttt{AvoidRuntimeDefrag}
\item%DIFAUXCMD \item \texttt{DiscardHibernateMap}
\texttt{\DIFdel{AvoidRuntimeDefrag}} \item \texttt{EnableSafeModeSlide}
%DIFAUXCMD \item \texttt{EnableWriteUnprotector}
%DIFDELCMD < \item %%% \item \texttt{ForceExitBootServices}
\item%DIFAUXCMD \item \texttt{ProtectMemoryRegions}
\texttt{\DIFdel{DiscardHibernateMap}} \item \texttt{ProvideCustomSlide}
%DIFAUXCMD \item \texttt{\DIFdelbegin \DIFdel{SetupVirtualMap}\DIFdelend \DIFaddbegin \DIFadd{RebuildAppleMemoryMap}\DIFaddend }
%DIFDELCMD < \item %%% \item \texttt{\DIFdelbegin \DIFdel{ShrinkMemoryMap}\DIFdelend \DIFaddbegin \DIFadd{SetupVirtualMap}\DIFaddend }
\item%DIFAUXCMD \end{itemize}
\texttt{\DIFdel{EnableSafeModeSlide}} \DIFaddbegin
%DIFAUXCMD
%DIFDELCMD < \item %%%
\item%DIFAUXCMD
\texttt{\DIFdel{EnableWriteUnprotector}}
%DIFAUXCMD
%DIFDELCMD < \item %%%
\item%DIFAUXCMD
\texttt{\DIFdel{ForceExitBootServices}}
%DIFAUXCMD
%DIFDELCMD < \item %%%
\item%DIFAUXCMD
\texttt{\DIFdel{ProtectMemoryRegions}}
%DIFAUXCMD
%DIFDELCMD < \item %%%
\item%DIFAUXCMD
\texttt{\DIFdel{ProvideCustomSlide}}
%DIFAUXCMD
%DIFDELCMD < \item %%%
\item%DIFAUXCMD
\texttt{\DIFdel{SetupVirtualMap}}
%DIFAUXCMD
%DIFDELCMD < \item %%%
\item%DIFAUXCMD
\texttt{\DIFdel{ShrinkMemoryMap}}
%DIFAUXCMD
\end{itemize}%DIFAUXCMD \DIFadd{However, as of today such set is strongly discouraged as some of these quirks
%DIFDELCMD < \end{itemize} are not necessary to be enabled or need additional quirks. For example,
%DIFDELCMD < %%% }\texttt{\DIFadd{DevirtualiseMmio}} \DIFadd{and }\texttt{\DIFadd{ProtectUefiServices}} \DIFadd{are often required,
\DIFdelend while }\texttt{\DIFadd{DiscardHibernateMap}} \DIFadd{and }\texttt{\DIFadd{ForceExitBootServices}} \DIFadd{are rarely
necessary.
}
\DIFadd{Unfortunately for some quirks like }\texttt{\DIFadd{RebuildAppleMemoryMap}}\DIFadd{,
}\texttt{\DIFadd{EnableWriteUnprotector}}\DIFadd{, }\texttt{\DIFadd{ProtectMemoryRegions}}\DIFadd{,
}\texttt{\DIFadd{RebuildAppleMemoryMap}}\DIFadd{, }\texttt{\DIFadd{SetupVirtualMap}}\DIFadd{,
and }\texttt{\DIFadd{SyncRuntimePermissions}} \DIFadd{there is no definite approach even on similar
systems, so trying all their combinations may be required for optimal setup.
Refer to individual quirk descriptions in this document for more details.
}\DIFaddend
\end{enumerate} \end{enumerate}
......
...@@ -516,6 +516,62 @@ ...@@ -516,6 +516,62 @@
<key>Skip</key> <key>Skip</key>
<integer>0</integer> <integer>0</integer>
</dict> </dict>
<dict>
<key>Base</key>
<string>_panic</string>
<key>Comment</key>
<string>Send panic string to serial port</string>
<key>Count</key>
<integer>1</integer>
<key>Enabled</key>
<false/>
<key>Find</key>
<data></data>
<key>Identifier</key>
<string>kernel</string>
<key>Limit</key>
<integer>0</integer>
<key>Mask</key>
<data></data>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>Replace</key>
<data>MduKD4TJdQT/w7EKZrr9A+yoIHT7Zrr4A4jI7kj/x4XbdN/D</data>
<key>ReplaceMask</key>
<data></data>
<key>Skip</key>
<integer>0</integer>
</dict>
<dict>
<key>Base</key>
<string>_kernel_debug_string_early</string>
<key>Comment</key>
<string>Send early prints to serial port</string>
<key>Count</key>
<integer>1</integer>
<key>Enabled</key>
<false/>
<key>Find</key>
<data></data>
<key>Identifier</key>
<string>kernel</string>
<key>Limit</key>
<integer>0</integer>
<key>Mask</key>
<data></data>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>Replace</key>
<data>MduKD4TJdQT/w7EKZrr9A+yoIHT7Zrr4A4jI7kj/x4XbdN/D</data>
<key>ReplaceMask</key>
<data></data>
<key>Skip</key>
<integer>0</integer>
</dict>
</array> </array>
<key>Quirks</key> <key>Quirks</key>
<dict> <dict>
......
...@@ -516,6 +516,62 @@ ...@@ -516,6 +516,62 @@
<key>Skip</key> <key>Skip</key>
<integer>0</integer> <integer>0</integer>
</dict> </dict>
<dict>
<key>Base</key>
<string>_panic</string>
<key>Comment</key>
<string>Send panic string to serial port</string>
<key>Count</key>
<integer>1</integer>
<key>Enabled</key>
<false/>
<key>Find</key>
<data></data>
<key>Identifier</key>
<string>kernel</string>
<key>Limit</key>
<integer>0</integer>
<key>Mask</key>
<data></data>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>Replace</key>
<data>MduKD4TJdQT/w7EKZrr9A+yoIHT7Zrr4A4jI7kj/x4XbdN/D</data>
<key>ReplaceMask</key>
<data></data>
<key>Skip</key>
<integer>0</integer>
</dict>
<dict>
<key>Base</key>
<string>_kernel_debug_string_early</string>
<key>Comment</key>
<string>Send early prints to serial port</string>
<key>Count</key>
<integer>1</integer>
<key>Enabled</key>
<false/>
<key>Find</key>
<data></data>
<key>Identifier</key>
<string>kernel</string>
<key>Limit</key>
<integer>0</integer>
<key>Mask</key>
<data></data>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>Replace</key>
<data>MduKD4TJdQT/w7EKZrr9A+yoIHT7Zrr4A4jI7kj/x4XbdN/D</data>
<key>ReplaceMask</key>
<data></data>
<key>Skip</key>
<integer>0</integer>
</dict>
</array> </array>
<key>Quirks</key> <key>Quirks</key>
<dict> <dict>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册