diff --git a/Changelog.md b/Changelog.md index 5e55d33e4fdf025d6a2ff235b76171b5955b88e4..edde7bfd3ee71a65d74daff65406961e8deb76a3 100644 --- a/Changelog.md +++ b/Changelog.md @@ -12,6 +12,7 @@ OpenCore Changelog - Fixed compatibility with page protection for all binaries - Fixed crashes in OpenUsbKbDxe when handling unsupported devices - Removed `HdaCodecDump` application in favor of `SysReport` +- Added `SetApfsTrimTimeout` to tune APFS trim command #### v0.6.5 - Fixed installing OpenDuet on protected volumes diff --git a/Docs/Configuration.pdf b/Docs/Configuration.pdf index a848bc9bdb9d83239841f79c61972fe13d141e72..36956e7c5c176ea884a5347d0462d1c77ee2a120 100644 Binary files a/Docs/Configuration.pdf and b/Docs/Configuration.pdf differ diff --git a/Docs/Configuration.tex b/Docs/Configuration.tex index 88b3dc15ecae6e54b838871088aaa3f2b8ffcf3b..0e8bc6bf2d4a04061436eaf1458f46e6462c5644 100755 --- a/Docs/Configuration.tex +++ b/Docs/Configuration.tex @@ -756,7 +756,9 @@ and clarifications. is available, and inline for \texttt{static} variables and functions. \item Use line length of 120 characters or less, preferably 100 characters. \item Use spaces after casts, e.g. \texttt{(VOID *)(UINTN) Variable}. -\item Use two spaces as indentations as always. +\item Use two spaces to indent function arguments when splitting lines. +\item Prefix public functions with either \texttt{Oc} or another distinct name. +\item Do not prefix private \texttt{static} functions, but use \texttt{Internal} for \texttt{non-static}. \item Use SPDX license headers as shown in \href{https://github.com/acidanthera/bugtracker/issues/483}{acidanthera/bugtracker\#483}. \end{itemize} @@ -1430,7 +1432,7 @@ To view their current state use \texttt{pmset -g} command in Terminal. \emph{Note}: While this quirk is required to run older macOS versions on platforms with used lower memory it is not compatible with some - hardware and macOS 11. In this case you may try to use + hardware and macOS 11. In this case one may try to use \texttt{EnableSafeModeSlide} instead. \item @@ -2554,6 +2556,26 @@ blocking. to wake up. For debug kernels \texttt{setpowerstate\_panic=0} boot argument should be used, which is otherwise equivalent to this quirk. +\item + \texttt{SetApfsTrimTimeout}\\ + \textbf{Type}: \texttt{plist\ integer}\\ + \textbf{Failsafe}: \texttt{-1}\\ + \textbf{Requirement}: 10.14 (not required for older)\\ + \textbf{Description}: Set trim timeout in microseconds for APFS filesystems on SSDs. + + Depending on the SSD controller trim procedure may take considerable + amount of time, causing noticeable boot slowdown as this is when the + APFS driver executes the trim operation. If the SSD supports + over-provisioning or there exists a dedicated unused partition that + can be used to reserve blocks, trim operation may not be necessary. + On the other side if the SSD is slow, the default timeout (equals to + \texttt{9.999999} seconds) may not be enough. See more details + in this \href{https://interface31.ru/tech_it/2015/04/mozhno-li-effektivno-ispolzovat-ssd-bez-podderzhki-trim.html}{article}. + + Set this value to \texttt{4294967295} for the maximum timeout to + guarantee trim success or to \texttt{999} to essentially disable + trim. + \item \texttt{ThirdPartyDrives}\\ \textbf{Type}: \texttt{plist\ boolean}\\ diff --git a/Docs/Differences/Differences.pdf b/Docs/Differences/Differences.pdf index 63e4bc54c1585ca8ffd1394d1f67a4c25cbf6c5d..07253e13727b763efa7eda453846826fb630aae6 100644 Binary files a/Docs/Differences/Differences.pdf and b/Docs/Differences/Differences.pdf differ diff --git a/Docs/Differences/Differences.tex b/Docs/Differences/Differences.tex index a01cf59be191f388cb5516efdaac56d3e921ef50..3e487f66ef472f5d190adc09d41903dd67766128 100644 --- a/Docs/Differences/Differences.tex +++ b/Docs/Differences/Differences.tex @@ -1,7 +1,7 @@ \documentclass[]{article} %DIF LATEXDIFF DIFFERENCE FILE -%DIF DEL PreviousConfiguration.tex Tue Jan 5 10:48:23 2021 -%DIF ADD ../Configuration.tex Sun Jan 24 10:54:55 2021 +%DIF DEL PreviousConfiguration.tex Fri Jan 22 17:04:29 2021 +%DIF ADD ../Configuration.tex Sun Jan 24 21:10:33 2021 \usepackage{lmodern} \usepackage{amssymb,amsmath} @@ -816,7 +816,9 @@ and clarifications. is available, and inline for \texttt{static} variables and functions. \item Use line length of 120 characters or less, preferably 100 characters. \item Use spaces after casts, e.g. \texttt{(VOID *)(UINTN) Variable}. -\item Use \DIFaddbegin \DIFadd{two spaces as indentations as always. +\item Use \DIFaddbegin \DIFadd{two spaces to indent function arguments when splitting lines. +}\item \DIFadd{Prefix public functions with either }\texttt{\DIFadd{Oc}} \DIFadd{or another distinct name. +}\item \DIFadd{Do not prefix private }\texttt{\DIFadd{static}} \DIFadd{functions, but use }\texttt{\DIFadd{Internal}} \DIFadd{for }\texttt{\DIFadd{non-static}}\DIFadd{. }\item \DIFadd{Use }\DIFaddend SPDX license headers as shown in \href{https://github.com/acidanthera/bugtracker/issues/483}{acidanthera/bugtracker\#483}. \end{itemize} @@ -1490,7 +1492,7 @@ To view their current state use \texttt{pmset -g} command in Terminal. \emph{Note}: While this quirk is required to run older macOS versions on platforms with used lower memory it is not compatible with some - hardware and macOS 11. In this case you may try to use + hardware and macOS 11. In this case \DIFdelbegin \DIFdel{you }\DIFdelend \DIFaddbegin \DIFadd{one }\DIFaddend may try to use \texttt{EnableSafeModeSlide} instead. \item @@ -2615,7 +2617,30 @@ blocking. should be used, which is otherwise equivalent to this quirk. \item - \texttt{ThirdPartyDrives}\\ + \DIFaddbegin \texttt{\DIFadd{SetApfsTrimTimeout}}\\ + \textbf{\DIFadd{Type}}\DIFadd{: }\texttt{\DIFadd{plist\ integer}}\\ + \textbf{\DIFadd{Failsafe}}\DIFadd{: }\texttt{\DIFadd{-1}}\\ + \textbf{\DIFadd{Requirement}}\DIFadd{: 10.14 (not required for older)}\\ + \textbf{\DIFadd{Description}}\DIFadd{: Set trim timeout in microseconds for APFS filesystems on SSDs. +} + + \DIFadd{Depending on the SSD controller trim procedure may take considerable + amount of time, causing noticeable boot slowdown as this is when the + APFS driver executes the trim operation. If the SSD supports + over-provisioning or there exists a dedicated unused partition that + can be used to reserve blocks, trim operation may not be necessary. + On the other side if the SSD is slow, the default timeout (equals to + }\texttt{\DIFadd{9.999999}} \DIFadd{seconds) may not be enough. See more details + in this }\href{https://interface31.ru/tech_it/2015/04/mozhno-li-effektivno-ispolzovat-ssd-bez-podderzhki-trim.html}{\DIFadd{article}}\DIFadd{. +} + + \DIFadd{Set this value to }\texttt{\DIFadd{4294967295}} \DIFadd{for the maximum timeout to + guarantee trim success or to }\texttt{\DIFadd{999}} \DIFadd{to essentially disable + trim. +} + +\item + \DIFaddend \texttt{ThirdPartyDrives}\\ \textbf{Type}: \texttt{plist\ boolean}\\ \textbf{Failsafe}: \texttt{false}\\ \textbf{Requirement}: 10.6 (not required for older)\\ @@ -5538,20 +5563,24 @@ even cause permanent firmware damage. Some of the known drivers are listed below & PS/2 mouse driver from \texttt{MdeModulePkg}. Some very old laptop firmware may not include this driver but it is necessary for the touchpad to work in UEFI graphical interfaces such as \texttt{OpenCanopy}. \\ -\DIFdelbegin %DIFDELCMD < \href{https://github.com/acidanthera/audk}{\texttt{UsbMouseDxe}}%%% -\DIFdelend \DIFaddbegin \href{https://github.com/acidanthera/OpenCorePkg}{\texttt{OpenHfsPlus}}\DIFaddend \textbf{*} +\DIFdelbegin %DIFDELCMD < \href{https://github.com/acidanthera/audk}{%%% +\texttt{\DIFdel{UsbMouseDxe}}%DIFAUXCMD +\DIFdelend \DIFaddbegin \href{https://github.com/acidanthera/OpenCorePkg}{\texttt{\DIFadd{OpenHfsPlus}}\DIFaddend }\textbf{*} & \DIFdelbegin \DIFdel{USB mouse driver from }\texttt{\DIFdel{MdeModulePkg}}%DIFAUXCMD \DIFdel{. Some virtual machine firmware such as OVMF may not include this driver but it is necessary for the mouse to work in UEFI graphical interfaces such as }\texttt{\DIFdel{OpenCanopy}}%DIFAUXCMD \DIFdel{. }%DIFDELCMD < \\ -%DIFDELCMD < \href{https://github.com/acidanthera/OpenCorePkg}{\texttt{VBoxHfs}} +%DIFDELCMD < %%% +\href{https://github.com/acidanthera/OpenCorePkg}{\texttt{\DIFdel{VBoxHfs}}%DIFAUXCMD +} +%DIFAUXCMD %DIFDELCMD < & %%% \DIFdelend HFS file system driver with bless support. This driver is an alternative to a closed source \texttt{HfsPlus} driver commonly found in Apple firmware. While it is feature complete, it is approximately 3~times slower and is yet to undergo a security audit. \\ -\DIFaddbegin \href{https://github.com/acidanthera/audk}{\texttt{UsbMouseDxe}}\textbf{\DIFadd{*}} +\DIFaddbegin \href{https://github.com/acidanthera/audk}{\texttt{\DIFadd{UsbMouseDxe}}}\textbf{\DIFadd{*}} & \DIFadd{USB mouse driver from }\texttt{\DIFadd{MdeModulePkg}}\DIFadd{. Some virtual machine firmware such as OVMF may not include this driver but it is necessary for the mouse to work in UEFI graphical interfaces such as }\texttt{\DIFadd{OpenCanopy}}\DIFadd{. }\\ @@ -5613,7 +5642,8 @@ Some of the known tools are listed below (builtin tools are marked with \textbf{ \href{https://github.com/acidanthera/OpenCorePkg}{\texttt{GopStop}}\textbf{*} & Test GraphicsOutput protocol with a \href{https://github.com/acidanthera/OpenCorePkg/tree/master/Application/GopStop}{simple scenario}. \\ -\DIFdelbegin %DIFDELCMD < \href{https://github.com/acidanthera/OpenCorePkg}{\texttt{HdaCodecDump}}%%% +\DIFdelbegin \href{https://github.com/acidanthera/OpenCorePkg}{\texttt{\DIFdel{HdaCodecDump}}%DIFAUXCMD +}%DIFAUXCMD \textbf{\DIFdel{*}} %DIFAUXCMD %DIFDELCMD < & %%% @@ -6821,9 +6851,9 @@ Since it is not always accurate, the latest versions are listed below. images are limited to their target model identifiers and have no \texttt{-no\_compat\_check} boot argument support. Modified images (with \texttt{ACDT} suffix) without model restrictions can be found - \DIFdelbegin %DIFDELCMD < \href{https://mega.nz/folder/z5YUhYTb#gA\_IRY5KMuYpnNCg7kR3ug}{here}%%% -\DIFdelend \DIFaddbegin \href{https://archive.org/details/10.6.7-10j3250-disk-images}{here} - \DIFadd{(}\href{https://mega.nz/folder/z5YUhYTb#gA\_IRY5KMuYpnNCg7kR3ug}{MEGA Mirror}\DIFadd{)}\DIFaddend , + \DIFdelbegin %DIFDELCMD < \href{https://mega.nz/folder/z5YUhYTb#gA\_IRY5KMuYpnNCg7kR3ug}{%%% +\DIFdelend \DIFaddbegin \href{https://archive.org/details/10.6.7-10j3250-disk-images}{\DIFaddend here} + \DIFaddbegin \DIFadd{(}\href{https://mega.nz/folder/z5YUhYTb#gA\_IRY5KMuYpnNCg7kR3ug}{\DIFadd{MEGA Mirror}}\DIFadd{)}\DIFaddend , assuming macOS~10.6 is legally owned. Read \texttt{DIGEST.txt} for more details. Note that these are the earliest tested versions of macOS~10.6 with OpenCore. @@ -6873,9 +6903,9 @@ hdiutil convert ReadWrite.dmg -format UDZO -o ReadOnly.dmg build \texttt{9J3050} (for \texttt{MacBookPro5,3}). Unlike the others, this image is not limited to the target model identifiers and can be used as is. The original \texttt{9J3050} image can be found - \DIFdelbegin %DIFDELCMD < \href{https://mega.nz/folder/inRBTarD#zanf7fUbviwz3WHBU5xpCg}{here}%%% -\DIFdelend \DIFaddbegin \href{https://archive.org/details/10.5.7-9-j-3050}{here} - \DIFadd{(}\href{https://mega.nz/folder/inRBTarD#zanf7fUbviwz3WHBU5xpCg}{MEGA Mirror}\DIFadd{)}\DIFaddend , + \DIFdelbegin %DIFDELCMD < \href{https://mega.nz/folder/inRBTarD#zanf7fUbviwz3WHBU5xpCg}{%%% +\DIFdelend \DIFaddbegin \href{https://archive.org/details/10.5.7-9-j-3050}{\DIFaddend here} + \DIFaddbegin \DIFadd{(}\href{https://mega.nz/folder/inRBTarD#zanf7fUbviwz3WHBU5xpCg}{\DIFadd{MEGA Mirror}}\DIFadd{)}\DIFaddend , assuming macOS~10.5 is legally owned. Read \texttt{DIGEST.txt} for more details. Note that this is the earliest tested version of macOS~10.5 with OpenCore. @@ -6894,9 +6924,9 @@ hdiutil convert ReadWrite.dmg -format UDZO -o ReadOnly.dmg to their target model identifiers as on newer macOS versions. Modified \texttt{8R4088} images (with \texttt{ACDT} suffix) without model restrictions can be found - \DIFdelbegin %DIFDELCMD < \href{https://mega.nz/folder/D3ASzLzA\#7sjYXE2X09f6aGjol\_C7dg}{here}%%% -\DIFdelend \DIFaddbegin \href{https://archive.org/details/10.4.10-8-r-4088-acdt}{here} - \DIFadd{(}\href{https://mega.nz/folder/D3ASzLzA\#7sjYXE2X09f6aGjol\_C7dg}{MEGA Mirror}\DIFadd{)}\DIFaddend , + \DIFdelbegin %DIFDELCMD < \href{https://mega.nz/folder/D3ASzLzA\#7sjYXE2X09f6aGjol\_C7dg}{%%% +\DIFdelend \DIFaddbegin \href{https://archive.org/details/10.4.10-8-r-4088-acdt}{\DIFaddend here} + \DIFaddbegin \DIFadd{(}\href{https://mega.nz/folder/D3ASzLzA\#7sjYXE2X09f6aGjol\_C7dg}{\DIFadd{MEGA Mirror}}\DIFadd{)}\DIFaddend , assuming macOS~10.4 is legally owned. Read \texttt{DIGEST.txt} for more details. Note that these are the earliest tested versions of macOS~10.4 with OpenCore. diff --git a/Docs/Errata/Errata.pdf b/Docs/Errata/Errata.pdf index 4914dff880a166ede4aed9d61f94b2db096f68e0..9d8875e511619f0ee4bf2a38cccddbc280ff5aa4 100644 Binary files a/Docs/Errata/Errata.pdf and b/Docs/Errata/Errata.pdf differ diff --git a/Docs/Sample.plist b/Docs/Sample.plist index 592382ebe02fe11c0828283687fe6ce6a1ebbd6b..177f4b29ce0b39e679e3b83bdc627c013e79f051 100644 --- a/Docs/Sample.plist +++ b/Docs/Sample.plist @@ -727,6 +727,8 @@ PowerTimeoutKernelPanic + SetApfsTrimTimeout + -1 ThirdPartyDrives XhciPortLimit diff --git a/Docs/SampleCustom.plist b/Docs/SampleCustom.plist index 6713482f68471d433d3f588fbbb73b9dbe2ae917..d13a3fdcb25cd13b8f6b6dc86cb4541b49aedf86 100644 --- a/Docs/SampleCustom.plist +++ b/Docs/SampleCustom.plist @@ -727,6 +727,8 @@ PowerTimeoutKernelPanic + SetApfsTrimTimeout + -1 ThirdPartyDrives XhciPortLimit diff --git a/Include/Acidanthera/Library/OcAppleKernelLib.h b/Include/Acidanthera/Library/OcAppleKernelLib.h index c150acf9317ccea28fedf35ba9153dd9d485776f..127677b1f6c1d00ea339a9304e588cbb03c33667 100644 --- a/Include/Acidanthera/Library/OcAppleKernelLib.h +++ b/Include/Acidanthera/Library/OcAppleKernelLib.h @@ -577,6 +577,10 @@ typedef enum { // Force SecureBoot support for all CPUs. // KernelQuirkForceSecureBootScheme, + // + // Set custom APFS trim timeout. + // + KernelQuirkSetApfsTrimTimeout, KernelQuirkMax } KERNEL_QUIRK_NAME; @@ -1099,6 +1103,16 @@ KextFindKmodAddress ( OUT UINT64 *Kmod ); +/** + Set timeout value in microseconds for KernelQuirkSetApfsTrimTimeout quirk. + + @param[in] Timeout Timeout in microseconds. +**/ +VOID +PatchSetApfsTimeout ( + IN UINT32 Timeout + ); + /** Apply modification to CPUID 1. diff --git a/Include/Acidanthera/Library/OcConfigurationLib.h b/Include/Acidanthera/Library/OcConfigurationLib.h index 66d804c59bafcf64ddfdee26f541c2649a88be56..dfc343e4df161cc21a59cff1b4ac94c553f0f156 100644 --- a/Include/Acidanthera/Library/OcConfigurationLib.h +++ b/Include/Acidanthera/Library/OcConfigurationLib.h @@ -273,6 +273,7 @@ /// KernelSpace quirks. /// #define OC_KERNEL_QUIRKS_FIELDS(_, __) \ + _(INT64 , SetApfsTrimTimeout , , FALSE , ()) \ _(BOOLEAN , AppleCpuPmCfgLock , , FALSE , ()) \ _(BOOLEAN , AppleXcpmCfgLock , , FALSE , ()) \ _(BOOLEAN , AppleXcpmExtraMsrs , , FALSE , ()) \ diff --git a/Library/OcAppleKernelLib/CommonPatches.c b/Library/OcAppleKernelLib/CommonPatches.c index adf3deee064f14f868eac9fff1b1ae7c1e16c5b9..b2a921ab229d57ee0fa05aee42de5b1bdb5bdd80 100644 --- a/Library/OcAppleKernelLib/CommonPatches.c +++ b/Library/OcAppleKernelLib/CommonPatches.c @@ -1890,6 +1890,71 @@ PatchForceSecureBootScheme ( return EFI_SUCCESS; } +STATIC +UINT8 +mApfsTimeoutFind[] = { + 0x48, 0x3D, 0x7F, 0x96, 0x98, 0x00 +}; + +STATIC +UINT8 +mApfsTimeoutReplace[] = { + 0x48, 0x3D, 0x00, 0x00, 0x00, 0x00 +}; + +STATIC +PATCHER_GENERIC_PATCH +mApfsTimeoutPatch = { + .Comment = DEBUG_POINTER ("ApfsTimeout"), + .Base = NULL, + .Find = mApfsTimeoutFind, + .Mask = NULL, + .Replace = mApfsTimeoutReplace, + .ReplaceMask = NULL, + .Size = sizeof (mApfsTimeoutFind), + .Count = 1, + .Skip = 0, + .Limit = 0 +}; + +VOID +PatchSetApfsTimeout ( + IN UINT32 Timeout + ) +{ + // FIXME: This is really ugly, make quirks take a context param. + DEBUG ((DEBUG_INFO, "OCAK: Registering %u APFS timeout\n", Timeout)); + CopyMem (&mApfsTimeoutReplace[2], &Timeout, sizeof (Timeout)); +} + +STATIC +EFI_STATUS +PatchSetApfsTrimTimeout ( + IN OUT PATCHER_CONTEXT *Patcher, + IN UINT32 KernelVersion + ) +{ + EFI_STATUS Status; + + if (!OcMatchDarwinVersion (KernelVersion, KERNEL_VERSION_MOJAVE_MIN, 0)) { + DEBUG ((DEBUG_INFO, "OCAK: Skipping apfs timeout on %u\n", KernelVersion)); + return EFI_SUCCESS; + } + + if (Patcher == NULL) { + return EFI_NOT_FOUND; + } + + Status = PatcherApplyGenericPatch (Patcher, &mApfsTimeoutPatch); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_INFO, "OCAK: Failed to apply patch SetApfsTrimTimeout - %r\n", Status)); + } else { + DEBUG ((DEBUG_INFO, "OCAK: Patch success SetApfsTrimTimeout\n")); + } + + return Status; +} + // // Quirks table. // @@ -1916,6 +1981,7 @@ KERNEL_QUIRK gKernelQuirks[] = { [KernelQuirkExtendBTFeatureFlags] = { "com.apple.iokit.IOBluetoothFamily", PatchBTFeatureFlags }, [KernelQuirkLegacyCommpage] = { NULL, PatchLegacyCommpage }, [KernelQuirkForceSecureBootScheme] = { "com.apple.security.AppleImage4", PatchForceSecureBootScheme }, + [KernelQuirkSetApfsTrimTimeout] = { "com.apple.filesystems.apfs", PatchSetApfsTrimTimeout }, }; EFI_STATUS diff --git a/Library/OcConfigurationLib/OcConfigurationLib.c b/Library/OcConfigurationLib/OcConfigurationLib.c index 3da2be14461349e765a7c55020b223fc9e356bdc..2726b6464b46dd99855f356dea0ac311cee71533 100644 --- a/Library/OcConfigurationLib/OcConfigurationLib.c +++ b/Library/OcConfigurationLib/OcConfigurationLib.c @@ -357,6 +357,7 @@ mKernelQuirksSchema[] = { OC_SCHEMA_BOOLEAN_IN ("LegacyCommpage", OC_GLOBAL_CONFIG, Kernel.Quirks.LegacyCommpage), OC_SCHEMA_BOOLEAN_IN ("PanicNoKextDump", OC_GLOBAL_CONFIG, Kernel.Quirks.PanicNoKextDump), OC_SCHEMA_BOOLEAN_IN ("PowerTimeoutKernelPanic", OC_GLOBAL_CONFIG, Kernel.Quirks.PowerTimeoutKernelPanic), + OC_SCHEMA_INTEGER_IN ("SetApfsTrimTimeout", OC_GLOBAL_CONFIG, Kernel.Quirks.SetApfsTrimTimeout), OC_SCHEMA_BOOLEAN_IN ("ThirdPartyDrives", OC_GLOBAL_CONFIG, Kernel.Quirks.ThirdPartyDrives), OC_SCHEMA_BOOLEAN_IN ("XhciPortLimit", OC_GLOBAL_CONFIG, Kernel.Quirks.XhciPortLimit), }; diff --git a/Platform/OpenCore/OpenCoreKernelPatch.c b/Platform/OpenCore/OpenCoreKernelPatch.c index 097efd00b10dce8442e95cc958fa4dedc0d9c8cc..f808d1f919111042a023205ae89e1bdb6b5199f0 100644 --- a/Platform/OpenCore/OpenCoreKernelPatch.c +++ b/Platform/OpenCore/OpenCoreKernelPatch.c @@ -274,6 +274,11 @@ OcKernelApplyPatches ( )); } } + + if (Config->Kernel.Quirks.SetApfsTrimTimeout >= 0) { + PatchSetApfsTimeout ((UINT32) Config->Kernel.Quirks.SetApfsTrimTimeout); + OcKernelApplyQuirk (KernelQuirkSetApfsTrimTimeout, CacheType, DarwinVersion, NULL, &KernelPatcher); + } } else { if (Config->Kernel.Quirks.AppleXcpmCfgLock) { OcKernelApplyQuirk (KernelQuirkAppleXcpmCfgLock, CacheType, DarwinVersion, NULL, &KernelPatcher);