2408 Commits

Author SHA1 Message Date
Mike Beaton
411de51112 OcMainLib: Unload drivers most recent first 2024-12-22 14:21:06 +00:00
Mike Beaton
cde43cd3c1 OpenNetworkBoot: Add PXE and HTTP(S) Boot support 2024-11-30 18:40:21 +00:00
Mike Beaton
72a332ce59 Build: Add /wd4324 to MSFT:*_CC_FLAGS for VS2019 BASE_ALIGNAS
Without this flag MSVC produces spurious warning C4324 when the macro is
working as intended.

Add static assert to OcBlitLib.c which fails without this support.
2024-11-27 12:30:21 +00:00
Mike Beaton
6cb95d50af OcConfigurationLib: Fix config variable naming 2024-11-26 23:14:19 +00:00
Mike Beaton
35bcb134f1 CreateVault: Fix sign.command and update signing docs
Fix operation of `sign.command` when printable characters occur
immediately before `=BEGIN OC VAULT=`. `strings` finds the location of
the first printable character in such a sequence. `hexdump` automatically
works on 16 byte boundaries, so still finds the correct offset.

Use `BASE_ALIGNAS` to enforce the required alignment, which will not be
correct on all builds unless enforced (note alignment is required purely
for locating the structure correctly from external script as above, not
for reading in C).

Remove struct packing, since structs had better be naturally packed anyway
(if not, reading from them without arbitrary-alignment-safe code, as we
do, would be undefined behaviour). Add static asserts to confirm expected
size as required by `sign.command`.

Update the docs to refer to `sign.command` rather than to include the
signing commands explicitly - otherwise we have two places that need to
be kept in sync for signing commands, and note that the commands in the
two places were already out of sync.

Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
2024-11-26 22:22:28 +00:00
Mike Beaton
6bb481ed62 OpenLinuxBoot: Fix booting with TuneD in Fedora 41
In GRUB2+blscfg mode:
 - Allow grub vars in 'initrd' as well as in 'options'
 - Allow multiple initrd files on one 'initrd' line
 - Initialise empty $tuned_params and $tuned_initrd grub vars if no
   values present, on an optional flag enabled by default (since
   we want to make booting major distros easy)

In GRUB2+blscfg mode (seem to be allowed now, not required for fix):
 - Allow multiple 'initrd' lines
 - Allow multiple 'options' lines

Add variant of OcParseVars which can parse as value-only tokens.

Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
2024-11-18 23:28:33 +00:00
vit9696
1493b56c3a OcCpuLib: Improved new CPU detection 2024-11-09 16:01:01 +03:00
vit9696
8eb097584c Library/OcPngLib: Update lodepng to 20230410
fixes some minor crashes discovered by upstream
2024-10-14 16:33:20 +03:00
Vitaly Cheptsov
4b3b0cb1d7
OcBootManagementLib: Add Apple DP expansion for VirtIO BLK (#561)
Apparently macOS strips down HD nodes from VirtIO BLK devices
leaving them "infix" shortened, i.e. PCI/APFS instead of
PCI/HD/APFS.
2024-10-07 17:44:08 +03:00
Mike Beaton
184f3e0b54
OcBootManagementLib: Convert naming from External System Boot to Unmanaged Boot (#552) 2024-10-06 10:30:31 +03:00
Mike Beaton
3830364e88
OcMainLib: Add UEFI/Unload config option to unload existing firmware drivers (#553) 2024-10-06 10:22:16 +03:00
PMheart
94ec1dc375
OcAppleKernelLib: Fix XcpmExtraMsrs on macOS 15 (#558) 2024-09-24 16:19:34 +02:00
PMheart
5afe3a6186 OcAppleKernelLib: Enable MSR_MISC_PWR_MGMT patch back on macOS 12+
This partially reverts https://github.com/acidanthera/OpenCorePkg/pull/545.
2024-09-24 12:11:55 +02:00
Andrey1970
f4f4e88806 Updated builtin firmware versions 2024-09-18 15:58:24 +03:00
Shaneee
5c42665070
OcCpuLib: Add support for AMD_CPU_EXT_FAMILY_1AH (#557) 2024-09-11 17:12:18 +03:00
Mike Beaton
fa4112e6bb OcConsoleLib: Change comment link from master to specified commit 2024-09-02 22:10:33 +01:00
Mike Beaton
7e39fedf18 OcBootManagementLib: Revert changes to fat slice secure boot logic from 125d8e8df36bd7ca12085d9670dca9060cf49c76
Note: EFI_SUCCESS does not always mean a signature was found and
verified (which never existed and therefore is not expected to
happen, for a fat slice), but simply that no further verification
of SB status is required and OC image loader should be used.

Resolves: https://github.com/acidanthera/bugtracker/issues/2414
2024-07-08 17:20:34 +01:00
PMheart
485db4c4c2
OcAppleKernelLib: Disabled XcpmExtraMsrs MSR_MISC_PWR_MGMT patch on macOS 12+; fix IOAHCIBlockStorage patch on macOS 14.4+ thanks @vit9696 (#545) 2024-06-15 17:35:33 +02:00
Mike Beaton
8dae8cf417 DuetBdsLib: Pin links in comment to fixed commit 2024-04-21 21:06:42 +01:00
Mike Beaton
8385180f8f OpenDuet: Minor improvement to replacement HII services lib debug o/p 2024-04-21 05:42:55 +01:00
Mike Beaton
13a1c62446 OpenDuet: Prevent debug assert when optional Hii protocols are not present 2024-04-20 22:05:17 +01:00
Mike Beaton
79dfd36be5 OpenDuet: Prevent DEBUG ASSERT in normal situation when updating GCD memory map 2024-04-20 18:40:52 +01:00
vit9696
9ede6067c8 OcAfterBootCompatLib: Add AllowRelocationBlock support for 32-bit OC
This quirk is needed to boot macOS 10.6 (and probably older) with 32-bit
kernel in 32-bit OVMF. Similar to 64-bit mode, hibernation wake is not
compatible with this quirk.

This change also partially fixes compatibility with a few other quirks
(e.g. AvoidRuntimeDefrag), but they are not really tested.
2024-04-08 20:24:56 +03:00
Andrey1970
58f57a32d5 DataBase: Updated builtin firmware versions 2024-03-13 20:25:06 +03:00
netanelc305
cdaf9a2302
OcCpuLib: Add TSC frequency calculation for xen hypervisor (#521) 2024-01-21 16:46:31 +03:00
Mike Beaton
b25928342c OcApfsLib: Always load JumpStart APFS directly
apfs.efi has W^X errors which require fixup for strict loaders, however
we were only passing the post-sanitised image to OC-wrapped
platform loader, therefore the wrapper in ImageLoader.c cannot
detect that it is an Apple signed binary which should be fixed up.
2024-01-21 13:31:42 +00:00
Mike Beaton
e1b2cb49b5 BuiltinPicker: Avoid responding to possibly multiple keys pressed before menu is read out, if using audio assist 2024-01-17 10:01:35 +00:00
Mike Beaton
d748c4a76e Platform: Add Firmware Settings entry driver 2024-01-17 09:52:29 +00:00
John Davis
b227a85420 OcAppleKernelLib: Fix previous commit 2024-01-09 21:51:25 -06:00
John Davis
22b851e589 OcAppleKernelLib: Add Exclude strategy for mkext 2024-01-09 20:52:12 -06:00
Alex James
fe5fc3320b
OcCpuLib: Fix cpu-type detection on Raptor Lake (#518) 2024-01-06 14:56:52 +03:00
John Davis
5ce824b291 OcCpuLib: Fix CPU frequency calculation on AMD 0Fh family 2024-01-04 22:52:32 -06:00
Mike Beaton
2b66a703a0 BootPickers: Swap positions of Shutdown and Restart buttons
to better match newer macOS.
Add OC_ATTR_USE_REVERSED_UI bit to use old layout.
2024-01-01 16:00:30 +00:00
John Davis
b585ba824b OcCpuLib: Fix CPU frequency calculation on AMD 10h family 2023-12-30 22:37:48 -06:00
Mike Beaton
fc9a5ece42 OcSerializeLib: Remove non-needed MDEPKG_NDEBUG conditional code
Which was designed to avoid warnings caused by apparently unused
variables when DEBUG statements are compiled with MDEPKG_NDEBUG
defined, but which is actually causing compilation errors with
improved DEBUG macro.
2023-12-13 07:57:12 +00:00
MikhailKrichanov
0a62573bea
Library: Fixed UEFI_IMAGE_SOURCE semantics. (#508) 2023-12-04 07:49:48 +03:00
Mikhail Krichanov
c65fb5bbfd Library: Fixed ImageOrigin types. 2023-11-24 09:42:11 +03:00
Mikhail Krichanov
43c4931957 User: Defined PcdImageProtectionPolicy for ImageTool in audk, adopted new API. 2023-11-23 14:04:16 +03:00
Mike Beaton
b5984a3d30 OcPeCoffExtLib: Add code path to OcPeCoffFixupInitializeContext which generates fixed image context without fixing image in memory
- Required to allow AppleEfiSignTool to verify rare (but actually existing) Apple signed binaries with overlapping section errors
2023-11-20 11:52:03 +00:00
John Davis
be646fa83c OcAppleKernelLib: Fix codestyle 2023-11-19 17:48:45 -06:00
John Davis
1a26c99b76 OcAppleKernelLib: Fix 10.6 cache size patch getting applied on 10.5 2023-11-19 17:44:20 -06:00
Mike Beaton
11c45d89d9 OcBootManagementLib: In order to detect files such as signed apfs.efi,
test for sutiability for fixup for all loaded images, not just boot image
2023-11-19 14:43:56 +00:00
John Davis
dc7927d981 OcAppleKernelLib: Fix coverity 2023-11-18 22:27:42 -06:00
John Davis
c899f746b3 OcAppleKernelLib: Fix Windows builds 2023-11-18 22:24:27 -06:00
John Davis
30d6d89692 OcAppleKernelLib: Add leaf 0x2 cache sizes to ProvideCurrentCpuInfo 2023-11-18 19:24:24 -06:00
Mike Beaton
d1e1fe7cd2 OcBootManagementLib: Trigger FixupAppleEfiImages quirk on default Apple boot path as well
- Allows for very early Mac OS X 32-bit images which are neither signed nor in a fat binary
2023-11-18 19:46:14 +00:00
Mike Beaton
125d8e8df3
OcBootManagementLib: Store ImageLoaderCaps in protocol (#504) 2023-11-18 19:42:20 +00:00
Mike Beaton
87da1b1329
Utilities/OcPeCoffExtLib: Update AppleEfiSignTool to work with new PE COFF loader (#502) 2023-11-15 11:30:05 +00:00
Andrey1970
9215e5c28a DataBase: Updated builtin firmware versions 2023-11-12 01:43:11 +03:00
Mike Beaton
9d05c7f5ae OpenDuet/OcBootManagementLib: Disable W^X auto-fix in Duet, and move fix for all Apple images to FixupAppleEfiImages quirk
Duet then matches behaviour of OVMF, and quirk can be used in both Duet and OVMF to load legacy Apple images.
2023-11-08 07:21:40 +00:00