336 Commits

Author SHA1 Message Date
vit9696
be2300f445 OcAppleBootCompatLib: Add support for DisableSingleUser quirk 2019-09-02 11:21:37 +03:00
vit9696
95a0166f58 OcBootManagementLib: Add support for more combinations 2019-09-02 02:57:08 +03:00
vit9696
7e9967181e OcConfigurationLib: Add entries for AllowNvramReset and PollAppleHotKeys 2019-09-02 02:55:21 +03:00
vit9696
96e02f4007 OcDebugLogLib: Update WaitForIndex contract 2019-09-02 02:50:16 +03:00
vit9696
8fe7bef825 OcBootManagement: Support OPT and CMD+R with picker 2019-09-01 22:33:14 +03:00
Download-Fritz
3e2e480cb9 OcAppleKeysLib: Import the Apple X86 Secure Boot Root CA 2019-09-01 15:50:24 +02:00
vit9696
f07f383e4c OcBootManagementLib: Add NTFS and EXT partition types 2019-08-31 23:35:32 +03:00
vit9696
992589931a OcAppleKernelLib: Add patcher comments and enable them for common patches 2019-08-31 22:33:09 +03:00
vit9696
d76463017d OcConfigurationLib: Add protocols for FV2 2019-08-31 12:11:11 +03:00
Download-Fritz
063d984f4b OcAppleKeyMapLib: Split Aggregator and DB functions 2019-08-29 18:45:27 +02:00
Download-Fritz
8299c889e2 OcAppleKeyMapLib and OcAppleEventLib: Initial import 2019-08-29 18:05:46 +02:00
vit9696
ea27502f5b OcAppleBootCompatLib: Implement DevirtualiseMmio 2019-08-29 13:39:25 +03:00
Download-Fritz
4917e8d73e OcGuardLib: Introduce OC_ALIGNOF and deprecate OC_ALIGNED 2019-08-28 15:37:55 +02:00
vit9696
ef39b29bb8 OcTimerLib: Add PMC detection, which is absent on B360 2019-08-22 14:41:50 +03:00
vit9696
1afdc06b5b OcTimerLib: Move OcGetPmTimerAddr to OcCpuLib 2019-08-22 13:21:50 +03:00
Michael Belyaev
958ed863ae Add ClearScreenOnModeSwitch and ReplaceTabWithSpace UEFI quirks 2019-08-21 14:24:54 +03:00
vit9696
2657d54cb9 OcDataHubLib: Specify non 24 MHz ARTFrequency to macOS 2019-08-20 14:48:26 +03:00
M. R. Miller
5ce54f3a0f New procedure for determining the core crystal clock frequency:
1. Try obtaining crystal clock frequency from CPUID_TIME_STAMP_COUNTER (15h) leaf from ECX.
  2. On failure, take predefined values for known processor models.
  3. On failure, check for CPUID_PROCESSOR_FREQUENCY availability and divide by the TSC ratio.
  4. On failure, assume 24 MHz.

Added info about the highest supported leaf (OC_CPU_INFO::MaxId).
Fixed a few places which were incorrectly comparing standard CPUID leaves against the maximum extended function leaf (OC_CPU_INFO::MaxExtId).
Add a warning in case the TSC- and ART-derived frequency calculations are wildly different.
2019-08-20 14:11:48 +03:00
M. R. Miller
c8d396e9f8 Fix some format specifiers.
Correct CPU frequency calculation. TSC Adjust is only for converting timestamps between ART and TSC, not calculating the CPU frequency.
Only apply the 25Mhz ART fallback if the processor is a Xeon Scalable, determined via the brand string until we can find a better method.
2019-08-20 14:11:48 +03:00
M. R. Miller
9d40af5afc Add MultThenDivU64x64x32 (from MdeModulePkg) to OcMiscLib. 2019-08-20 14:11:48 +03:00
M. R. Miller
dd6b0efbcb Fix support for CPUS with Always Running Timers (ART)
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.
2019-08-20 14:11:48 +03:00
Alex James
ef4535e9f2 OcUnicodeCollationEngLib: Initial import 2019-08-19 00:31:22 +03:00
Alex James
13b9932a6e OcHashServicesLib: Initial import 2019-08-19 00:31:22 +03:00
Alex James
cb180c758d OcAppleUserInterfaceThemeLib: Initial import 2019-08-19 00:31:22 +03:00
Alex James
d5a8a8fba0 OcAppleImageConversionLib: Initial import 2019-08-19 00:31:22 +03:00
Alex James
b55cfb3de7 OcFirmwareVolumeLib: Initial import 2019-08-19 00:31:22 +03:00
vit9696
ad640248f6 OcGuardLib: Drop global/inline static assert separation 2019-08-18 19:24:01 +03:00
Download-Fritz
cf35807a8d OcAppleSecureBootLib: Initial import 2019-08-16 15:17:26 +02:00
Download-Fritz
30bfee014d OcDevicePathLib: Fix type mismatches 2019-08-15 21:29:39 +02:00
Download-Fritz
f0bdadabb5 OcDevicePathLib: Import File DP Path retrieval APIs 2019-08-15 17:27:07 +02:00
vit9696
7fe4fbb5d8 OcAppleBootCompatLib: Rework FwRuntime protocol logic and usage 2019-08-07 18:11:05 +03:00
vit9696
2d95955750 OcConfigurationLib: Move BlessOverride back to Misc root 2019-08-06 00:43:40 +03:00
vit9696
e8d75961ca OcConfigurationLib: Add Booter configuration section 2019-08-06 00:26:51 +03:00
vit9696
40b43134e3 OcAppleBootCompatLib: Implement custom slide support 2019-08-05 23:46:28 +03:00
vit9696
8970216148 OcRngLib: Initial version
Closes acidanthera/bugtracker#307
2019-08-05 18:24:30 +03:00
vit9696
2e6030e5a3 OcAppleBootCompatLib: Initial set of fixes 2019-08-05 01:22:56 +03:00
vit9696
7eca596604 OcAppleBootCompatLib: Initial version 2019-08-04 21:27:44 +03:00
Download-Fritz
545df08f40 OcConfigurationLib: Fix BlessOverride and rename BootEntries 2019-08-04 14:59:19 +02:00
Download-Fritz
3a4f4d1eb8 OcConfigurationLib: Support BlessOverride 2019-08-03 19:42:25 +02:00
vit9696
d9912175ba OcBootManagementLib: Add macOS boot argument handling 2019-07-26 23:13:44 +03:00
vit9696
71f5493c41 OcMemoryLib: Import UmmMalloc allocator 2019-07-26 22:24:43 +03:00
vit9696
9c0da8f57f OcMemoryLib: Add virtual memory support 2019-07-26 19:43:35 +03:00
Download-Fritz
977ff2583d [WIP] OcBootManagementLib: Support bless path overrides 2019-07-26 11:06:00 +02:00
Download-Fritz
8fc1eb14f7 OcBootManagementLib: Support absolute custom entries 2019-07-26 11:01:23 +02:00
vit9696
bed4ffe17c OcMemoryLib: Add memory map functions 2019-07-21 23:18:36 +03:00
vit9696
eea0546f63 OcAppleRamDiskLib: Respect AvoidHighAlloc OpenCore policy 2019-07-21 19:05:34 +03:00
vit9696
268283ec75 OcConfigurationLib: Add AvoidHighAlloc UEFI quirk 2019-07-21 18:30:02 +03:00
vit9696
a7fc06ddce OcDebugLogLib: Fix hex logging issues 2019-07-21 13:22:34 +03:00
vit9696
598a106c22 OcDebugLogLib: Add hex dumping 2019-07-21 12:25:51 +03:00
vit9696
3bd6c3680a OcDevicePathLib: Fix memory leak in OcAppendDevicePathInstanceDedupe 2019-07-21 00:36:24 +03:00