436 Commits

Author SHA1 Message Date
hg13
a5715fcedc
OcAppleKernelLib: Add fallback CPUFrequency in ProvideCpuInfo (#578) 2025-08-02 13:30:25 +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
7044d6b845 OcAppleKernelLib: Fix ProvideCurrentCpuInfo and CPUID patching on older 10.4 versions 2025-02-23 12:57:12 -06: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
Shaneee
5c42665070
OcCpuLib: Add support for AMD_CPU_EXT_FAMILY_1AH (#557) 2024-09-11 17:12:18 +03: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
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
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
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
PMheart
e68e3dfbad OcAppleKernelLib: Do not report AICPUPM patch error on macOS 13+ 2023-07-07 02:00:22 +02:00
PMheart
5b7d4d0f2c
OcAppleKernelLib: Lapic patch cleanup (#477) 2023-07-02 01:38:18 +02:00
PMheart
d4bd64ccd7 OcAppleKernelLib: FixForceAquantiaEthernet patch by @Mieze
`__ZN30AppleEthernetAquantiaAqtion10718checkConfigSupportERiS0_` does not exist on macOS 10.15.4; dropping it makes the patch unique.
2023-06-22 18:22:54 +02:00
PMheart
b249bc702a OcAppleKernelLib: Fix codestyle 2023-06-22 17:43:52 +02:00
PMheart
e937869110 OcAppleKernelLib: FixForceAquantiaEthernet quirk on macOS 14 beta 2, thx @Shikumo
Ref: https://www.insanelymac.com/forum/topic/330614-marvell-aquantia-10-gb-ethernet-support-thread/?do=findComment&comment=2807006
2023-06-22 17:40:58 +02:00
John Davis
6d6948bc7b Fix codestyle 2023-06-17 12:06:29 -05:00
John Davis
e8367610c2 Fix codestyle 2023-06-17 12:04:00 -05:00
John Davis
c173a26843 OcAppleKernelLib: Fix kext blocker exclude under 32-bit 2023-06-17 11:57:38 -05:00
PMheart
b3d7e9f7ca Revert "OcAppleKernelLib: Minor typo"
This reverts commit 8955d758a5715bcaaffbaf23f39fe587ee73e790.

Uncrustify is mad at this. :-)
2023-06-14 16:53:14 +02:00
PMheart
8955d758a5 OcAppleKernelLib: Minor typo 2023-06-14 16:50:23 +02:00
PMheart
fb43d90309 OcAppleKernelLib: Better XhciPortLimit patch on macOS 11+ 2023-06-13 10:47:31 +02:00
PMheart
d52fc46ba6
OcAppleKernelLib: Integrate USB restriction patches (#471) 2023-06-12 16:19:53 +02:00
PMheart
4cc7ac246d OcAppleKernelLib: Fixed AppleXcpmForceBoost on macOS 14 2023-06-05 22:32:13 +02:00
PMheart
2e3510913a
OcAppleKernelLib: Fix ExternalDiskIcons quirk on macOS 13.3+, thanks fusion71au (#452) 2023-04-29 23:30:25 +02:00
jozews321
77d02b36fa
OcAppleKernelLib: Remove Ventura check for AppleCpuPmCfgLock (#448) 2023-04-21 11:01:16 +02:00
Savva Mitrofanov
b2d438d6f3 Switch OcGuardLib to BaseOverflowLib 2023-04-13 13:16:14 +06:00
CaseySJ
4bd9343ded
OcAppleKernelLib: Add DisableIoMapperMapping quirk (#440) 2023-04-06 01:55:53 +03:00
PMheart
edb04199d9
OcAppleKernelLib: Add new patch for macOS 13.3+ IOAHCIBlockStorage patch, by @vit9696 (#438) 2023-03-30 01:04:26 +02:00
vit9696
05d2b00c7d OcAppleKernelLib: Fix ProvideCpuInfo on 13.3 2023-02-23 15:26:01 +03:00
John Davis
6e3d292a21 OcAppleKernelLib: Remove extra slash in cacheless binary path creation 2023-02-04 16:33:07 -06:00
Mike Beaton
01b457fe81 Docs/Comments: Consistent use of Note: instead of NB 2023-01-07 09:46:19 +00:00
Shaneee
8cdab5b4ff
OcAppleKernelLib: Fix TSC/FSB for AMD CPUs in ProvideCurrentCpuInfo (#396) 2022-11-20 12:45:26 +03:00
PMheart
baff5ff5db
OcAppleKernelLib: Add patching status indicator (#386) 2022-09-29 12:45:31 +03:00
PMheart
c3a6f1208a OcAppleKernelLib: ix OPTIONAL prototype misuse 2022-09-08 16:36:52 +02:00
PMheart
27905dd7d7
Utilities: Introduce TestProcessKernel tool for testing kext injection/patching from config, by @mhaeuser (#369) 2022-08-24 11:26:35 +03:00
John Davis
6099ed0d24 OcAppleKernelLib: Fix Windows builds 2022-07-24 22:11:50 -05:00
John Davis
ce4a8edfc3 OcAppleKernelLib: Fix Windows builds 2022-07-24 21:16:09 -05:00
John Davis
e2739bfbaa OcAppleKernelLib: Fix uncrustify styling 2022-07-24 09:25:43 -05:00
John Davis
68de283159 OcAppleKernelLib: Provide cache info to 10.4 when using ProvideCurrentCpuInfo 2022-07-24 09:23:33 -05:00
John Davis
18a231eeb2 OcAppleKernelLib: Inject only current arch during cacheless boot 2022-07-22 19:40:01 -05:00
John Davis
9dd5ad1af4 OCAK: Fixed debug printing when performing cacheless kext blocking 2022-07-20 05:16:04 -05:00
PMheart
9a255a9796 Uncrustify: Apply codestyle patch 2022-07-15 10:16:45 +02:00
John Davis
e41d88f50f OcAppleKernelLib: Implement support for macOS 10.4 for ProvideCurrentCpuInfo quirk 2022-07-14 22:41:16 -05:00
John Davis
6c188569e6 OcAppleKernelLib: Fix potential null reference and account for kxld symbols 2022-07-14 06:59:28 -05:00
John Davis
4c45308b3a OcAppleKernelLib: Fix codestyle 2022-07-13 20:50:35 -05:00
John Davis
9872eef1d1 OCAK: Fix ProvideCurrentCpuInfo
Changed function to use original symbol values instead of recalculating them, as segment information is not available on macOS 11 and newer. Implemented full 32-bit support for TSC value calculations.
2022-07-13 20:34:51 -05:00