diff --git a/Changelog.md b/Changelog.md index f6ff688faa3384687d8b432dc2836d7c143ece78..da3d469501e061d84876d6f3a547c540b686d702 100644 --- a/Changelog.md +++ b/Changelog.md @@ -15,6 +15,7 @@ OpenCore Changelog - Added RtcRw tool to manipulate RTC memory - Added `PatchAppleRtcChecksum` kernel quirk - Added `AppleRtcRam` protocol implementation +- Renamed `Protocols` to `ProtocolOverrides` for clarity #### v0.5.7 - Added TimeMachine detection to picker diff --git a/Docs/Configuration.pdf b/Docs/Configuration.pdf index 99c28debdab854908514db28cee79bed21a59763..80779d99e455d5f7920f394fedbb6d45fdd03675 100644 Binary files a/Docs/Configuration.pdf and b/Docs/Configuration.pdf differ diff --git a/Docs/Configuration.tex b/Docs/Configuration.tex index e441dc08a6ad4cc823d34bea1adf50c6fe88d3dd..ee12a3843bdacb17d710d067202ca848faf227d5 100755 --- a/Docs/Configuration.tex +++ b/Docs/Configuration.tex @@ -4224,11 +4224,11 @@ functioning. Feature highlights: \hyperref[uefioutputprops]{Output Properties} section below. \item - \texttt{Protocols}\\ + \texttt{ProtocolOverrides}\\ \textbf{Type}: \texttt{plist\ dict}\\ \textbf{Failsafe}: None\\ \textbf{Description}: Force builtin versions of select protocols described - in \hyperref[uefiprotoprops]{Protocols Properties} section below. + in \hyperref[uefiprotoprops]{ProtocolOverrides Properties} section below. \emph{Note}: all protocol instances are installed prior to driver loading. @@ -4762,7 +4762,7 @@ functioning. Feature highlights: \end{enumerate} -\subsection{Protocols Properties}\label{uefiprotoprops} +\subsection{ProtocolOverrides Properties}\label{uefiprotoprops} \begin{enumerate} diff --git a/Docs/Differences/Differences.pdf b/Docs/Differences/Differences.pdf index a82d57cfd2170bd4d2151344b96e6b7f1b201455..21a9f163227490258cf5be49bb56295e40d41732 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 e8b32561156126b4286153921b53461cf2a2b1ac..8aef448e13d397b06e449d01eeb696bdc4de032e 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 Sun Apr 19 02:31:22 2020 -%DIF ADD ../Configuration.tex Sun Apr 19 02:31:22 2020 +%DIF DEL PreviousConfiguration.tex Tue Apr 7 19:32:13 2020 +%DIF ADD ../Configuration.tex Mon Apr 20 09:29:28 2020 \usepackage{lmodern} \usepackage{amssymb,amsmath} @@ -4297,11 +4297,12 @@ functioning. Feature highlights: \hyperref[uefioutputprops]{Output Properties} section below. \item - \texttt{Protocols}\\ + \texttt{\DIFdelbegin \DIFdel{Protocols}\DIFdelend \DIFaddbegin \DIFadd{ProtocolOverrides}\DIFaddend }\\ \textbf{Type}: \texttt{plist\ dict}\\ \textbf{Failsafe}: None\\ \textbf{Description}: Force builtin versions of select protocols described - in \hyperref[uefiprotoprops]{Protocols Properties} section below. + in \DIFdelbegin %DIFDELCMD < \hyperref[uefiprotoprops]{Protocols Properties} %%% +\DIFdelend \DIFaddbegin \hyperref[uefiprotoprops]{ProtocolOverrides Properties} \DIFaddend section below. \emph{Note}: all protocol instances are installed prior to driver loading. @@ -4846,7 +4847,7 @@ functioning. Feature highlights: \end{enumerate} -\subsection{Protocols Properties}\label{uefiprotoprops} +\subsection{\DIFdelbegin \DIFdel{Protocols }\DIFdelend \DIFaddbegin \DIFadd{ProtocolOverrides }\DIFaddend Properties}\label{uefiprotoprops} \begin{enumerate} diff --git a/Docs/Sample.plist b/Docs/Sample.plist index fb25169d1f7f5b81b6ffbe1258476248eb6d8c65..e2d8040132095aa0bcb3464dfec629f3698f38d6 100644 --- a/Docs/Sample.plist +++ b/Docs/Sample.plist @@ -849,7 +849,7 @@ TextRenderer BuiltinGraphics - Protocols + ProtocolOverrides AppleAudio diff --git a/Docs/SampleFull.plist b/Docs/SampleFull.plist index b741c1e89a90db1bae1806dd4dcf9342f49f3ce8..104e38e07138a51641135ebd3fe83b8b0f33a1df 100644 --- a/Docs/SampleFull.plist +++ b/Docs/SampleFull.plist @@ -952,7 +952,7 @@ TextRenderer BuiltinGraphics - Protocols + ProtocolOverrides AppleAudio diff --git a/Include/Library/OcConfigurationLib.h b/Include/Library/OcConfigurationLib.h index 9907b98ec9e4dfd2e0890e72f2551fb8f622c4d3..4cfd84acc27f7a62749da866f4a5501f459b0a51 100644 --- a/Include/Library/OcConfigurationLib.h +++ b/Include/Library/OcConfigurationLib.h @@ -528,7 +528,7 @@ typedef enum { /// /// Prefer own protocol implementation for these protocols. /// -#define OC_UEFI_PROTOCOLS_FIELDS(_, __) \ +#define OC_UEFI_PROTOCOL_OVERRIDES_FIELDS(_, __) \ _(BOOLEAN , AppleAudio , , FALSE , ()) \ _(BOOLEAN , AppleBootPolicy , , FALSE , ()) \ _(BOOLEAN , AppleDebugLog , , FALSE , ()) \ @@ -544,7 +544,7 @@ typedef enum { _(BOOLEAN , HashServices , , FALSE , ()) \ _(BOOLEAN , OSInfo , , FALSE , ()) \ _(BOOLEAN , UnicodeCollation , , FALSE , ()) - OC_DECLARE (OC_UEFI_PROTOCOLS) + OC_DECLARE (OC_UEFI_PROTOCOL_OVERRIDES) /// /// Quirks is a set of hacks for different firmwares. @@ -576,15 +576,15 @@ typedef enum { /// Uefi contains firmware tweaks and extra drivers. /// #define OC_UEFI_CONFIG_FIELDS(_, __) \ - _(BOOLEAN , ConnectDrivers , , FALSE , ()) \ - _(OC_UEFI_APFS , Apfs , , OC_CONSTR2 (OC_UEFI_APFS, _, __) , OC_DESTR (OC_UEFI_APFS)) \ - _(OC_UEFI_AUDIO , Audio , , OC_CONSTR2 (OC_UEFI_AUDIO, _, __) , OC_DESTR (OC_UEFI_AUDIO)) \ - _(OC_UEFI_DRIVER_ARRAY , Drivers , , OC_CONSTR2 (OC_UEFI_DRIVER_ARRAY, _, __) , OC_DESTR (OC_UEFI_DRIVER_ARRAY)) \ - _(OC_UEFI_INPUT , Input , , OC_CONSTR2 (OC_UEFI_INPUT, _, __) , OC_DESTR (OC_UEFI_INPUT)) \ - _(OC_UEFI_OUTPUT , Output , , OC_CONSTR2 (OC_UEFI_OUTPUT, _, __) , OC_DESTR (OC_UEFI_OUTPUT)) \ - _(OC_UEFI_PROTOCOLS , Protocols , , OC_CONSTR2 (OC_UEFI_PROTOCOLS, _, __) , OC_DESTR (OC_UEFI_PROTOCOLS)) \ - _(OC_UEFI_QUIRKS , Quirks , , OC_CONSTR2 (OC_UEFI_QUIRKS, _, __) , OC_DESTR (OC_UEFI_QUIRKS)) \ - _(OC_UEFI_RSVD_ARRAY , ReservedMemory , , OC_CONSTR2 (OC_UEFI_RSVD_ARRAY, _, __) , OC_DESTR (OC_UEFI_RSVD_ARRAY)) + _(BOOLEAN , ConnectDrivers , , FALSE , ()) \ + _(OC_UEFI_APFS , Apfs , , OC_CONSTR2 (OC_UEFI_APFS, _, __) , OC_DESTR (OC_UEFI_APFS)) \ + _(OC_UEFI_AUDIO , Audio , , OC_CONSTR2 (OC_UEFI_AUDIO, _, __) , OC_DESTR (OC_UEFI_AUDIO)) \ + _(OC_UEFI_DRIVER_ARRAY , Drivers , , OC_CONSTR2 (OC_UEFI_DRIVER_ARRAY, _, __) , OC_DESTR (OC_UEFI_DRIVER_ARRAY)) \ + _(OC_UEFI_INPUT , Input , , OC_CONSTR2 (OC_UEFI_INPUT, _, __) , OC_DESTR (OC_UEFI_INPUT)) \ + _(OC_UEFI_OUTPUT , Output , , OC_CONSTR2 (OC_UEFI_OUTPUT, _, __) , OC_DESTR (OC_UEFI_OUTPUT)) \ + _(OC_UEFI_PROTOCOL_OVERRIDES , ProtocolOverrides , , OC_CONSTR2 (OC_UEFI_PROTOCOL_OVERRIDES, _, __) , OC_DESTR (OC_UEFI_PROTOCOL_OVERRIDES)) \ + _(OC_UEFI_QUIRKS , Quirks , , OC_CONSTR2 (OC_UEFI_QUIRKS, _, __) , OC_DESTR (OC_UEFI_QUIRKS)) \ + _(OC_UEFI_RSVD_ARRAY , ReservedMemory , , OC_CONSTR2 (OC_UEFI_RSVD_ARRAY, _, __) , OC_DESTR (OC_UEFI_RSVD_ARRAY)) OC_DECLARE (OC_UEFI_CONFIG) /** diff --git a/Library/OcConfigurationLib/OcConfigurationLib.c b/Library/OcConfigurationLib/OcConfigurationLib.c index 9e88b28e9ef87d2ff5cc060a85ba36536272d8ac..d64f04a95652441278d986aa3e0a28c7e5c36fa9 100644 --- a/Library/OcConfigurationLib/OcConfigurationLib.c +++ b/Library/OcConfigurationLib/OcConfigurationLib.c @@ -69,7 +69,7 @@ OC_STRUCTORS (OC_UEFI_APFS, ()) OC_STRUCTORS (OC_UEFI_AUDIO, ()) OC_STRUCTORS (OC_UEFI_INPUT, ()) OC_STRUCTORS (OC_UEFI_OUTPUT, ()) -OC_STRUCTORS (OC_UEFI_PROTOCOLS, ()) +OC_STRUCTORS (OC_UEFI_PROTOCOL_OVERRIDES, ()) OC_STRUCTORS (OC_UEFI_RSVD_ENTRY, ()) OC_ARRAY_STRUCTORS (OC_UEFI_RSVD_ARRAY) OC_STRUCTORS (OC_UEFI_QUIRKS, ()) @@ -540,22 +540,22 @@ mUefiQuirksSchema[] = { STATIC OC_SCHEMA -mUefiProtocolsSchema[] = { - OC_SCHEMA_BOOLEAN_IN ("AppleAudio", OC_GLOBAL_CONFIG, Uefi.Protocols.AppleAudio), - OC_SCHEMA_BOOLEAN_IN ("AppleBootPolicy", OC_GLOBAL_CONFIG, Uefi.Protocols.AppleBootPolicy), - OC_SCHEMA_BOOLEAN_IN ("AppleDebugLog", OC_GLOBAL_CONFIG, Uefi.Protocols.AppleDebugLog), - OC_SCHEMA_BOOLEAN_IN ("AppleEvent", OC_GLOBAL_CONFIG, Uefi.Protocols.AppleEvent), - OC_SCHEMA_BOOLEAN_IN ("AppleImageConversion", OC_GLOBAL_CONFIG, Uefi.Protocols.AppleImageConversion), - OC_SCHEMA_BOOLEAN_IN ("AppleKeyMap", OC_GLOBAL_CONFIG, Uefi.Protocols.AppleKeyMap), - OC_SCHEMA_BOOLEAN_IN ("AppleRtcRam", OC_GLOBAL_CONFIG, Uefi.Protocols.AppleRtcRam), - OC_SCHEMA_BOOLEAN_IN ("AppleSmcIo", OC_GLOBAL_CONFIG, Uefi.Protocols.AppleSmcIo), - OC_SCHEMA_BOOLEAN_IN ("AppleUserInterfaceTheme", OC_GLOBAL_CONFIG, Uefi.Protocols.AppleUserInterfaceTheme), - OC_SCHEMA_BOOLEAN_IN ("DataHub", OC_GLOBAL_CONFIG, Uefi.Protocols.DataHub), - OC_SCHEMA_BOOLEAN_IN ("DeviceProperties", OC_GLOBAL_CONFIG, Uefi.Protocols.DeviceProperties), - OC_SCHEMA_BOOLEAN_IN ("FirmwareVolume", OC_GLOBAL_CONFIG, Uefi.Protocols.FirmwareVolume), - OC_SCHEMA_BOOLEAN_IN ("HashServices", OC_GLOBAL_CONFIG, Uefi.Protocols.HashServices), - OC_SCHEMA_BOOLEAN_IN ("OSInfo", OC_GLOBAL_CONFIG, Uefi.Protocols.OSInfo), - OC_SCHEMA_BOOLEAN_IN ("UnicodeCollation", OC_GLOBAL_CONFIG, Uefi.Protocols.UnicodeCollation) +mUefiProtocolOverridesSchema[] = { + OC_SCHEMA_BOOLEAN_IN ("AppleAudio", OC_GLOBAL_CONFIG, Uefi.ProtocolOverrides.AppleAudio), + OC_SCHEMA_BOOLEAN_IN ("AppleBootPolicy", OC_GLOBAL_CONFIG, Uefi.ProtocolOverrides.AppleBootPolicy), + OC_SCHEMA_BOOLEAN_IN ("AppleDebugLog", OC_GLOBAL_CONFIG, Uefi.ProtocolOverrides.AppleDebugLog), + OC_SCHEMA_BOOLEAN_IN ("AppleEvent", OC_GLOBAL_CONFIG, Uefi.ProtocolOverrides.AppleEvent), + OC_SCHEMA_BOOLEAN_IN ("AppleImageConversion", OC_GLOBAL_CONFIG, Uefi.ProtocolOverrides.AppleImageConversion), + OC_SCHEMA_BOOLEAN_IN ("AppleKeyMap", OC_GLOBAL_CONFIG, Uefi.ProtocolOverrides.AppleKeyMap), + OC_SCHEMA_BOOLEAN_IN ("AppleRtcRam", OC_GLOBAL_CONFIG, Uefi.ProtocolOverrides.AppleRtcRam), + OC_SCHEMA_BOOLEAN_IN ("AppleSmcIo", OC_GLOBAL_CONFIG, Uefi.ProtocolOverrides.AppleSmcIo), + OC_SCHEMA_BOOLEAN_IN ("AppleUserInterfaceTheme", OC_GLOBAL_CONFIG, Uefi.ProtocolOverrides.AppleUserInterfaceTheme), + OC_SCHEMA_BOOLEAN_IN ("DataHub", OC_GLOBAL_CONFIG, Uefi.ProtocolOverrides.DataHub), + OC_SCHEMA_BOOLEAN_IN ("DeviceProperties", OC_GLOBAL_CONFIG, Uefi.ProtocolOverrides.DeviceProperties), + OC_SCHEMA_BOOLEAN_IN ("FirmwareVolume", OC_GLOBAL_CONFIG, Uefi.ProtocolOverrides.FirmwareVolume), + OC_SCHEMA_BOOLEAN_IN ("HashServices", OC_GLOBAL_CONFIG, Uefi.ProtocolOverrides.HashServices), + OC_SCHEMA_BOOLEAN_IN ("OSInfo", OC_GLOBAL_CONFIG, Uefi.ProtocolOverrides.OSInfo), + OC_SCHEMA_BOOLEAN_IN ("UnicodeCollation", OC_GLOBAL_CONFIG, Uefi.ProtocolOverrides.UnicodeCollation) }; STATIC @@ -626,15 +626,15 @@ mUefiReservedMemorySchema = OC_SCHEMA_DICT (NULL, mUefiReservedMemoryEntrySchema STATIC OC_SCHEMA mUefiConfigurationSchema[] = { - OC_SCHEMA_DICT ("APFS", mUefiApfsSchema), - OC_SCHEMA_DICT ("Audio", mUefiAudioSchema), - OC_SCHEMA_BOOLEAN_IN ("ConnectDrivers", OC_GLOBAL_CONFIG, Uefi.ConnectDrivers), - OC_SCHEMA_ARRAY_IN ("Drivers", OC_GLOBAL_CONFIG, Uefi.Drivers, &mUefiDriversSchema), - OC_SCHEMA_DICT ("Input", mUefiInputSchema), - OC_SCHEMA_DICT ("Output", mUefiOutputSchema), - OC_SCHEMA_DICT ("Protocols", mUefiProtocolsSchema), - OC_SCHEMA_DICT ("Quirks", mUefiQuirksSchema), - OC_SCHEMA_ARRAY_IN ("ReservedMemory", OC_GLOBAL_CONFIG, Uefi.ReservedMemory, &mUefiReservedMemorySchema), + OC_SCHEMA_DICT ("APFS", mUefiApfsSchema), + OC_SCHEMA_DICT ("Audio", mUefiAudioSchema), + OC_SCHEMA_BOOLEAN_IN ("ConnectDrivers", OC_GLOBAL_CONFIG, Uefi.ConnectDrivers), + OC_SCHEMA_ARRAY_IN ("Drivers", OC_GLOBAL_CONFIG, Uefi.Drivers, &mUefiDriversSchema), + OC_SCHEMA_DICT ("Input", mUefiInputSchema), + OC_SCHEMA_DICT ("Output", mUefiOutputSchema), + OC_SCHEMA_DICT ("ProtocolOverrides", mUefiProtocolOverridesSchema), + OC_SCHEMA_DICT ("Quirks", mUefiQuirksSchema), + OC_SCHEMA_ARRAY_IN ("ReservedMemory", OC_GLOBAL_CONFIG, Uefi.ReservedMemory, &mUefiReservedMemorySchema), }; // diff --git a/Platform/OpenCore/OpenCoreUefi.c b/Platform/OpenCore/OpenCoreUefi.c index 4dbb6edeb632cd7793ec73f7f8211f7b8d8fc50f..e84ba1b2bc7a887ee6645c46ea9d2ba34438c72f 100644 --- a/Platform/OpenCore/OpenCoreUefi.c +++ b/Platform/OpenCore/OpenCoreUefi.c @@ -285,63 +285,63 @@ OcReinstallProtocols ( IN OC_GLOBAL_CONFIG *Config ) { - if (OcAudioInstallProtocols (Config->Uefi.Protocols.AppleAudio) == NULL) { + if (OcAudioInstallProtocols (Config->Uefi.ProtocolOverrides.AppleAudio) == NULL) { DEBUG ((DEBUG_INFO, "OC: Disabling audio in favour of firmware implementation\n")); } - if (OcAppleBootPolicyInstallProtocol (Config->Uefi.Protocols.AppleBootPolicy) == NULL) { + if (OcAppleBootPolicyInstallProtocol (Config->Uefi.ProtocolOverrides.AppleBootPolicy) == NULL) { DEBUG ((DEBUG_ERROR, "OC: Failed to install boot policy protocol\n")); } - if (OcDataHubInstallProtocol (Config->Uefi.Protocols.DataHub) == NULL) { + if (OcDataHubInstallProtocol (Config->Uefi.ProtocolOverrides.DataHub) == NULL) { DEBUG ((DEBUG_ERROR, "OC: Failed to install data hub protocol\n")); } - if (OcDevicePathPropertyInstallProtocol (Config->Uefi.Protocols.DeviceProperties) == NULL) { + if (OcDevicePathPropertyInstallProtocol (Config->Uefi.ProtocolOverrides.DeviceProperties) == NULL) { DEBUG ((DEBUG_ERROR, "OC: Failed to install device properties protocol\n")); } - if (OcAppleImageConversionInstallProtocol (Config->Uefi.Protocols.AppleImageConversion) == NULL) { + if (OcAppleImageConversionInstallProtocol (Config->Uefi.ProtocolOverrides.AppleImageConversion) == NULL) { DEBUG ((DEBUG_ERROR, "OC: Failed to install image conversion protocol\n")); } - if (OcAppleDebugLogInstallProtocol (Config->Uefi.Protocols.AppleDebugLog) == NULL) { + if (OcAppleDebugLogInstallProtocol (Config->Uefi.ProtocolOverrides.AppleDebugLog) == NULL) { DEBUG ((DEBUG_ERROR, "OC: Failed to install debug log protocol\n")); } - if (OcSmcIoInstallProtocol (Config->Uefi.Protocols.AppleSmcIo, Config->Misc.Security.AuthRestart) == NULL) { + if (OcSmcIoInstallProtocol (Config->Uefi.ProtocolOverrides.AppleSmcIo, Config->Misc.Security.AuthRestart) == NULL) { DEBUG ((DEBUG_ERROR, "OC: Failed to install smc i/o protocol\n")); } - if (OcAppleUserInterfaceThemeInstallProtocol (Config->Uefi.Protocols.AppleUserInterfaceTheme) == NULL) { + if (OcAppleUserInterfaceThemeInstallProtocol (Config->Uefi.ProtocolOverrides.AppleUserInterfaceTheme) == NULL) { DEBUG ((DEBUG_ERROR, "OC: Failed to install user interface theme protocol\n")); } - if (OcUnicodeCollationEngInstallProtocol (Config->Uefi.Protocols.UnicodeCollation) == NULL) { + if (OcUnicodeCollationEngInstallProtocol (Config->Uefi.ProtocolOverrides.UnicodeCollation) == NULL) { DEBUG ((DEBUG_ERROR, "OC: Failed to install unicode collation protocol\n")); } - if (OcHashServicesInstallProtocol (Config->Uefi.Protocols.HashServices) == NULL) { + if (OcHashServicesInstallProtocol (Config->Uefi.ProtocolOverrides.HashServices) == NULL) { DEBUG ((DEBUG_ERROR, "OC: Failed to install hash services protocol\n")); } - if (OcAppleKeyMapInstallProtocols (Config->Uefi.Protocols.AppleKeyMap) == NULL) { + if (OcAppleKeyMapInstallProtocols (Config->Uefi.ProtocolOverrides.AppleKeyMap) == NULL) { DEBUG ((DEBUG_ERROR, "OC: Failed to install key map protocols\n")); } - if (OcAppleEventInstallProtocol (Config->Uefi.Protocols.AppleEvent) == NULL) { + if (OcAppleEventInstallProtocol (Config->Uefi.ProtocolOverrides.AppleEvent) == NULL) { DEBUG ((DEBUG_ERROR, "OC: Failed to install key event protocol\n")); } - if (OcFirmwareVolumeInstallProtocol (Config->Uefi.Protocols.FirmwareVolume) == NULL) { + if (OcFirmwareVolumeInstallProtocol (Config->Uefi.ProtocolOverrides.FirmwareVolume) == NULL) { DEBUG ((DEBUG_ERROR, "OC: Failed to install firmware volume protocol\n")); } - if (OcOSInfoInstallProtocol (Config->Uefi.Protocols.OSInfo) == NULL) { + if (OcOSInfoInstallProtocol (Config->Uefi.ProtocolOverrides.OSInfo) == NULL) { DEBUG ((DEBUG_ERROR, "OC: Failed to install os info protocol\n")); } - if (OcAppleRtcRamInstallProtocol (Config->Uefi.Protocols.AppleRtcRam) == NULL) { + if (OcAppleRtcRamInstallProtocol (Config->Uefi.ProtocolOverrides.AppleRtcRam) == NULL) { DEBUG ((DEBUG_ERROR, "OC: Failed to install rtc ram protocol\n")); } }