diff --git a/Changelog.md b/Changelog.md index 91ee9e10..d2108e73 100644 --- a/Changelog.md +++ b/Changelog.md @@ -10,6 +10,12 @@ OpenCore Changelog - Fixed multiple operating system support in APFS containers - Added `AvoidHighAlloc` UEFI quirk to avoid high memory allocs - Updated builtin firmware versions for 10.15 beta support +- Added `Booter` section for Apple bootloader preferences +- Dropped `AptioMemoryFix.efi` support for `Booter` and `FwRuntimeServices.efi` +- Fixed hibernation issues in Windows with `RequestBootVarRouting` +- Significantly improved boot stability on APTIO +- Added support for Windows & OpenCore on the same drive through `BlessOverride` +- Added advanced user-specified boot entries through `Misc` -> `Entries` #### v0.0.3 - Added complete modern platform database (2012+) diff --git a/Docs/Sample.plist b/Docs/Sample.plist index 2e6ca74a..575c483f 100644 --- a/Docs/Sample.plist +++ b/Docs/Sample.plist @@ -183,6 +183,26 @@ + Booter + + Quirks + + DiscardAppleS4Map + + EnableAppleSmSlide + + ForceExitBootServices + + ProtectCsmRegion + + SetupAppleMap + + SetupAppleSlide + + ShrinkMemoryMap + + + DeviceProperties Add @@ -448,6 +468,8 @@ Misc + BlessOverride + Boot ConsoleBehaviourOs @@ -516,6 +538,19 @@ memcheck/memcheck.efi + Entries + + + Name + CustomOS + Comment + Not signed for security reasons + Enabled + + Path + PciRoot(0x0)/Pci(0x1,0x1)/Pci(0x0,0x0)/NVMe(0x1,11-22-33-44-55-66-77-88)/HD(1,GPT,00000000-0000-0000-0000-000000000000,0x800,0x64000)/\EFI\BOOT\BOOTX64.EFI + + NVRAM diff --git a/Docs/SampleFull.plist b/Docs/SampleFull.plist index 683685fd..f4730c1e 100644 --- a/Docs/SampleFull.plist +++ b/Docs/SampleFull.plist @@ -183,6 +183,26 @@ + Booter + + Quirks + + DiscardAppleS4Map + + EnableAppleSmSlide + + ForceExitBootServices + + ProtectCsmRegion + + SetupAppleMap + + SetupAppleSlide + + ShrinkMemoryMap + + + DeviceProperties Add @@ -448,6 +468,8 @@ Misc + BlessOverride + Boot ConsoleBehaviourOs @@ -516,6 +538,19 @@ memcheck/memcheck.efi + Entries + + + Name + CustomOS + Comment + Not signed for security reasons + Enabled + + Path + PciRoot(0x0)/Pci(0x1,0x1)/Pci(0x0,0x0)/NVMe(0x1,11-22-33-44-55-66-77-88)/HD(1,GPT,00000000-0000-0000-0000-000000000000,0x800,0x64000)/\EFI\BOOT\BOOTX64.EFI + + NVRAM diff --git a/OpenCorePkg.dsc b/OpenCorePkg.dsc index 2ad49b13..c744349e 100755 --- a/OpenCorePkg.dsc +++ b/OpenCorePkg.dsc @@ -52,6 +52,7 @@ HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf MacInfoLib|MacInfoPkg/Library/MacInfoLib/MacInfoLib.inf OcAcpiLib|OcSupportPkg/Library/OcAcpiLib/OcAcpiLib.inf + OcAppleBootCompatLib|OcSupportPkg/Library/OcAppleBootCompatLib/OcAppleBootCompatLib.inf OcAppleBootPolicyLib|OcSupportPkg/Library/OcAppleBootPolicyLib/OcAppleBootPolicyLib.inf OcAppleChunklistLib|OcSupportPkg/Library/OcAppleChunklistLib/OcAppleChunklistLib.inf OcAppleDiskImageLib|OcSupportPkg/Library/OcAppleDiskImageLib/OcAppleDiskImageLib.inf @@ -60,6 +61,7 @@ OcAppleKeysLib|OcSupportPkg/Library/OcAppleKeysLib/OcAppleKeysLib.inf OcAppleRamDiskLib|OcSupportPkg/Library/OcAppleRamDiskLib/OcAppleRamDiskLib.inf OcBootManagementLib|OcSupportPkg/Library/OcBootManagementLib/OcBootManagementLib.inf + OcDeviceTreeLib|OcSupportPkg/Library/OcDeviceTreeLib/OcDeviceTreeLib.inf OcConsoleLib|OcSupportPkg/Library/OcConsoleLib/OcConsoleLib.inf OcCpuLib|OcSupportPkg/Library/OcCpuLib/OcCpuLib.inf OcCryptoLib|OcSupportPkg/Library/OcCryptoLib/OcCryptoLib.inf @@ -76,6 +78,7 @@ OcMemoryLib|OcSupportPkg/Library/OcMemoryLib/OcMemoryLib.inf OcMiscLib|OcSupportPkg/Library/OcMiscLib/OcMiscLib.inf OcPngLib|OcSupportPkg/Library/OcPngLib/OcPngLib.inf + OcRngLib|OcSupportPkg/Library/OcRngLib/OcRngLib.inf OcRtcLib|OcSupportPkg/Library/OcRtcLib/OcRtcLib.inf OcSerializeLib|OcSupportPkg/Library/OcSerializeLib/OcSerializeLib.inf OcSmbiosLib|OcSupportPkg/Library/OcSmbiosLib/OcSmbiosLib.inf diff --git a/Platform/OpenCore/OpenCore.inf b/Platform/OpenCore/OpenCore.inf index 6b706575..e1cc251b 100644 --- a/Platform/OpenCore/OpenCore.inf +++ b/Platform/OpenCore/OpenCore.inf @@ -69,6 +69,7 @@ DevicePathLib IoLib OcAcpiLib + OcAppleBootCompatLib OcAppleBootPolicyLib OcAppleKernelLib OcBootManagementLib diff --git a/Platform/OpenCore/OpenCoreMisc.c b/Platform/OpenCore/OpenCoreMisc.c index c249a86f..6cba692f 100644 --- a/Platform/OpenCore/OpenCoreMisc.c +++ b/Platform/OpenCore/OpenCoreMisc.c @@ -401,9 +401,9 @@ OcMiscBoot ( return; } - if (Config->Misc.Boot.BlessOverride.Count > 0) { + if (Config->Misc.BlessOverride.Count > 0) { if (!OcOverflowMulUN ( - Config->Misc.Boot.BlessOverride.Count, + Config->Misc.BlessOverride.Count, sizeof (*BlessOverride), &BlessOverrideSize)) { @@ -418,10 +418,10 @@ OcMiscBoot ( return; } - for (Index = 0; Index < Config->Misc.Boot.BlessOverride.Count; ++Index) { + for (Index = 0; Index < Config->Misc.BlessOverride.Count; ++Index) { BlessOverride[Index] = AsciiStrCopyToUnicode ( OC_BLOB_GET ( - Config->Misc.Boot.BlessOverride.Values[Index] + Config->Misc.BlessOverride.Values[Index] ), 0 ); @@ -436,7 +436,7 @@ OcMiscBoot ( } } - Context->NumCustomBootPaths = Config->Misc.Boot.BlessOverride.Count; + Context->NumCustomBootPaths = Config->Misc.BlessOverride.Count; Context->CustomBootPaths = BlessOverride; } diff --git a/Platform/OpenCore/OpenCoreUefi.c b/Platform/OpenCore/OpenCoreUefi.c index 63eeb851..ca5916a9 100644 --- a/Platform/OpenCore/OpenCoreUefi.c +++ b/Platform/OpenCore/OpenCoreUefi.c @@ -18,13 +18,14 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include -#include +#include #include #include #include #include #include #include +#include #include #include @@ -262,6 +263,26 @@ OcReinstallProtocols ( } } +VOID +OcLoadBooterUefiSupport ( + IN OC_GLOBAL_CONFIG *Config + ) +{ + OC_ABC_SETTINGS AbcSettings; + + ZeroMem (&AbcSettings, sizeof (AbcSettings)); + + AbcSettings.SetupAppleMap = Config->Booter.Quirks.SetupAppleMap; + AbcSettings.SetupAppleSlide = Config->Booter.Quirks.SetupAppleSlide; + AbcSettings.DiscardAppleS4Map = Config->Booter.Quirks.DiscardAppleS4Map; + AbcSettings.EnableAppleSmSlide = Config->Booter.Quirks.EnableAppleSmSlide; + AbcSettings.ProtectCsmRegion = Config->Booter.Quirks.ProtectCsmRegion; + AbcSettings.ShrinkMemoryMap = Config->Booter.Quirks.ShrinkMemoryMap; + AbcSettings.ForceExitBootServices = Config->Booter.Quirks.ForceExitBootServices; + + OcAbcInitialize (&AbcSettings); +} + VOID OcLoadUefiSupport ( IN OC_STORAGE_CONTEXT *Storage, @@ -271,6 +292,11 @@ OcLoadUefiSupport ( { OcReinstallProtocols (Config); + // + // Setup Apple bootloader specific UEFI features. + // + OcLoadBooterUefiSupport (Config); + if (Config->Uefi.Quirks.IgnoreInvalidFlexRatio) { OcCpuCorrectFlexRatio (CpuInfo); }