OpenCoreUefi: Connect Booter configuration and start syncing docs

This commit is contained in:
vit9696 2019-08-06 00:44:25 +03:00
parent db90fd8b11
commit ef4276997c
7 changed files with 112 additions and 6 deletions

View File

@ -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+)

View File

@ -183,6 +183,26 @@
<false/>
</dict>
</dict>
<key>Booter</key>
<dict>
<key>Quirks</key>
<dict>
<key>DiscardAppleS4Map</key>
<false/>
<key>EnableAppleSmSlide</key>
<false/>
<key>ForceExitBootServices</key>
<false/>
<key>ProtectCsmRegion</key>
<false/>
<key>SetupAppleMap</key>
<true/>
<key>SetupAppleSlide</key>
<true/>
<key>ShrinkMemoryMap</key>
<false/>
</dict>
</dict>
<key>DeviceProperties</key>
<dict>
<key>Add</key>
@ -448,6 +468,8 @@
</dict>
<key>Misc</key>
<dict>
<key>BlessOverride</key>
<array/>
<key>Boot</key>
<dict>
<key>ConsoleBehaviourOs</key>
@ -516,6 +538,19 @@
<string>memcheck/memcheck.efi</string>
</dict>
</array>
<key>Entries</key>
<array>
<dict>
<key>Name</key>
<string>CustomOS</string>
<key>Comment</key>
<string>Not signed for security reasons</string>
<key>Enabled</key>
<false/>
<key>Path</key>
<string>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</string>
</dict>
</array>
</dict>
<key>NVRAM</key>
<dict>

View File

@ -183,6 +183,26 @@
<false/>
</dict>
</dict>
<key>Booter</key>
<dict>
<key>Quirks</key>
<dict>
<key>DiscardAppleS4Map</key>
<false/>
<key>EnableAppleSmSlide</key>
<false/>
<key>ForceExitBootServices</key>
<false/>
<key>ProtectCsmRegion</key>
<false/>
<key>SetupAppleMap</key>
<true/>
<key>SetupAppleSlide</key>
<true/>
<key>ShrinkMemoryMap</key>
<false/>
</dict>
</dict>
<key>DeviceProperties</key>
<dict>
<key>Add</key>
@ -448,6 +468,8 @@
</dict>
<key>Misc</key>
<dict>
<key>BlessOverride</key>
<array/>
<key>Boot</key>
<dict>
<key>ConsoleBehaviourOs</key>
@ -516,6 +538,19 @@
<string>memcheck/memcheck.efi</string>
</dict>
</array>
<key>Entries</key>
<array>
<dict>
<key>Name</key>
<string>CustomOS</string>
<key>Comment</key>
<string>Not signed for security reasons</string>
<key>Enabled</key>
<false/>
<key>Path</key>
<string>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</string>
</dict>
</array>
</dict>
<key>NVRAM</key>
<dict>

View File

@ -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

View File

@ -69,6 +69,7 @@
DevicePathLib
IoLib
OcAcpiLib
OcAppleBootCompatLib
OcAppleBootPolicyLib
OcAppleKernelLib
OcBootManagementLib

View File

@ -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;
}

View File

@ -18,13 +18,14 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/PrintLib.h>
#include <Library/OcAppleBootCompatLib.h>
#include <Library/OcAppleBootPolicyLib.h>
#include <Library/OcConsoleLib.h>
#include <Library/OcCpuLib.h>
#include <Library/OcDataHubLib.h>
#include <Library/OcDevicePropertyLib.h>
#include <Library/OcMiscLib.h>
#include <Library/PrintLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
@ -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);
}