mirror of
https://github.com/acidanthera/OpenCorePkg.git
synced 2025-12-08 19:25:01 +00:00
Previously, OcCpuLib assumed all CPUs had the same core crystal clock frequency for their ART (24 Mhz). Xeon Scalable and Intel Atoms with Goldmont architecture have different frequencies (25 Mhz and 19.2 Mhz respectively). If the CPU supports reporting its frequency, use that. Otherwise, fallback to a value based on its model and family. Cleaned up the logic for how we compute our CPU and FSB frequencies. For CPUs that support ART, use that instead of the TSC frequency. Added documentation and renamed `OC_CPU_INFO::TSCFrequency` to `CPUFrequencyFromTSC` and added `CPUFrequencyFromART` for clarity. These are intermediate values used to compute `CPUFrequency`. `ARTFrequency` is now correctly set to the core crystal clock frequency rather than `CPUFrequencyFromART`, which it was previously. Lastly, adjusted the `CPUFrequencyFromART` calculation to include the TSC offset in `MSR_IA32_TSC_ADJUST` if present. I'm not aware of which CPUs have a non-zero offset but it's part of Intel's calculation for computing the CPU frequency based on the ART.
OcSupportPkg
Additional UEFI support common libraries shared by other projects in Acidanthera. The primary purpose of the library set is to provide supplemental functionality for Apple-specific UEFI drivers.
Early history of the codebase could be found in AppleSupportPkg and PicoLib library set by The HermitCrabs Lab.
Features
- Apple PE image signature verification
- CPU information gathering
- Cryptographic primitives (SHA-256, RSA, etc.)
- Helper code for ACPI reads and modifications
- Higher level abstractions for files, strings, timers, variables
- Overflow checking arithmetics
- PE image loading with no UEFI Secure Boot conflict
- Plist configuration format parsing
- PNG image loading
OcGuardLib
This library implements basic safety features recommended for the use within the project. It implements fast safe integral arithmetics mapping on compiler builtins, type alignment checking, and UBSan runtime, based on NetBSD implementation.
The use of UBSan runtime requires the use of Clang compiler and -fsanitize=undefined argument. Refer to
Clang documentation for more
details.
Credits
- The HermitCrabs Lab
- All projects providing third-party code (refer to file headers)
- Download-Fritz
- Goldfish64
- savvamitrofanov
- vit9696
Description
Languages
C
95.2%
Assembly
1.9%
Shell
0.9%
Python
0.9%
C++
0.8%
Other
0.3%