2422 Commits

Author SHA1 Message Date
vit9696
1ecaca3c7c OcCompressionLib/zlib: Fix build issues 2025-09-11 12:13:01 +03:00
vit9696
d76d599773 OcAppleUserInterfaceThemeLib: Added background-color NVRAM variable
This allows to have grey OpenCanopy background colour and grey 10.9
EfiBoot boot screen
2025-09-11 11:56:33 +03:00
vit9696
d762689b98 Docs: Fix some typos 2025-08-21 23:02:45 +03:00
Alex James
1f6d95aedf
OcConsoleLib: Normalize console font path (#579)
OcLoadConsoleFont currently loads the specified console path from
Resources\Font\\, which can cause vault failures if vault.plist doesn't
include the duplicate path separator. Remove it to match other paths.
2025-08-10 11:04:14 +03:00
vit9696
d1ebfea100 OcAfterBootCompatLib: Add some more debugging & info on Booter quirks 2025-08-07 01:38:19 +03:00
vit9696
9b92b5945f Library/OcAcpiLib: Enable RSDT/RSDP/XSDT address printing in INFO
This is useful to debug RSDP lookup failure in operating systems,
especially macOS 10.4, which needs RSDP in low memory.
2025-08-07 01:36:34 +03:00
hg13
a5715fcedc
OcAppleKernelLib: Add fallback CPUFrequency in ProvideCpuInfo (#578) 2025-08-02 13:30:25 +03:00
Andrey1970
e8437f7377 DataBase: Updated builtin firmware versions 2025-06-14 20:06:04 +03:00
Marvin Häuser
164696d1dc OcMachoLib: Resolve indirect symbol ambiguity
Mach-O uses "indirect symbol" ambiguously. The first kind are "indirect
symbols" indicated by their type. They are located in the regular symbol
table, possibly outside the local, external and undefined ranges. Their
value is an index into the string table, which indicates the name of
another symbol they alias. We assume these to only be used by KPIs,
mostly as symbol aliases for deprecated symbol names.

The second kind is the "indirect symbol table", which is merely a flat
list of 32-bit indices into the symbol table.

When the handling code was written, the incorrect assumption was made
that the "indirect symbol table" is a range of "indirect symbols", much
like how local, external and undefined symbols are explicitly indexed.
However, this is not true and causes bugs in handling indirect symbols.

This patch drops this incorrect (and dangerous) assumption and strictly
separates the two concepts. As OpenCore does not inject KPIs, ignore
indirect symbols entirely.
2025-06-12 12:13:55 +02:00
John Davis
0e45c622e2 Fix incorrect print in PCI device info dumping in SysReport
Fixes https://github.com/acidanthera/bugtracker/issues/2486
2025-04-29 20:42:30 -05:00
John Davis
ceb0e8d733 OcDeviceMiscLib: Add PCI class names to PCI info dumping 2025-02-26 21:43:22 -06:00
John Davis
7044d6b845 OcAppleKernelLib: Fix ProvideCurrentCpuInfo and CPUID patching on older 10.4 versions 2025-02-23 12:57:12 -06:00
John Davis
45f8ba2cd2
Add ClearTaskSwitchBit booter quirk (#573)
This quirk is needed to boot macOS 10.7 and older when using a 32-bit kernel on a 64-bit UEFI firmware that makes uses of FPU or SSE instructions in runtime services (such as Hyper-V).
2025-02-23 10:51:40 -06:00
Pedro Tôrres
4920897e06
OcCpuLib: Read MSR_IA32_TSC_ADJUST only if CPU supports it (#571) 2024-12-29 01:31:00 +03:00
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