910 Commits

Author SHA1 Message Date
vit9696
9654b833fd OcTimerLib: Try using STH_ACPIBAR_BASE MSR to get ACPI base
Reference acidanthera/bugtracker#465
2019-08-21 14:41:05 +03:00
Michael Belyaev
958ed863ae Add ClearScreenOnModeSwitch and ReplaceTabWithSpace UEFI quirks 2019-08-21 14:24:54 +03:00
vit9696
98c08d0696 OcDebugLogLib: Increase log size to 256 KB
Reference acidanthera/bugtracker#445
2019-08-21 08:35:42 +03:00
vit9696
38156d60be OcCpuLib: Do not warn about CPU freq diff when TSC based freq is 0 2019-08-21 08:19:49 +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
12a3975d2e More format string fixes. 2019-08-20 14:11:48 +03:00
M. R. Miller
c0af97eb8a Change AppleProcessorMajorXeonScalable back into AppleProcessorMajorXeonW into a flag on DetectAppleMajorType. 2019-08-20 14:11:48 +03:00
M. R. Miller
87ff477f5f Small formatting cleanup and remove an unnecessary space and cast. 2019-08-20 14:11:48 +03:00
M. R. Miller
68171e2e7b Fix some formatting. 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
080f7da280
OcUnicodeCollationEngLib: Fix build 2019-08-18 16:56:55 -05: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
ffb34b664e OcAppleDerLib: CRLF to LF 2019-08-17 10:53:41 +02:00
Download-Fritz
8a56495a88 OcAppleDerLib: Initial import of libDER 2019-08-17 08:53:35 +02:00
Download-Fritz
0410d97604 Protocol libs: Error-exit when reinstalling fails 2019-08-16 21:01:56 +02: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
09f2f4fd15 OcDevicePathLib: Remove redundant check 2019-08-15 17:28:57 +02:00
Download-Fritz
f0bdadabb5 OcDevicePathLib: Import File DP Path retrieval APIs 2019-08-15 17:27:07 +02:00
vit9696
1808014e1d Revert "OcCpuLib: fix location of vendor specific *.h files"
This reverts commit f3c3dc7d5d64e97a6d5d3d766a5c2a009ae0b91d.
2019-08-10 09:56:57 +03:00
Nikolai SAOUKH
f3c3dc7d5d OcCpuLib: fix location of vendor specific *.h files 2019-08-10 09:34:33 +03:00
vit9696
3e98de1f89 OcAppleBootCompatLib: Fix windows build failure regression 2019-08-07 23:23:00 +03:00
vit9696
927bcb3898 OcAppleBootCompatLib: Add friendly reminder to slides and make it debug only 2019-08-07 18:19:52 +03:00
vit9696
7fe4fbb5d8 OcAppleBootCompatLib: Rework FwRuntime protocol logic and usage 2019-08-07 18:11:05 +03:00
mrmiller
5cc416d681 OcCpuLib: Add support for the Xeon Scaleable family
These aren't available in any Macs to date but they are similar to the Xeon Ws used in the iMacPro1,1 and the upcoming MacPro7,1. (#6)
2019-08-06 09:26:04 +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
9027bd6be1 OcAppleBootCompatLib: Initial working prototype 2019-08-05 17:11:35 +03:00
Nikolai SAOUKH
2e496a992d OcAppleBootCompatLib: Module MetaFile [Sources] is missing local header 2019-08-05 09:00:38 +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
20120c7b6e OcTimerLib: Support all modules 2019-08-04 15:21:51 +02:00
Download-Fritz
545df08f40 OcConfigurationLib: Fix BlessOverride and rename BootEntries 2019-08-04 14:59:19 +02:00
Download-Fritz
973882c031 OcAppleBootPolicyLib: Do not ASSERT for missing leading backslash when unneeded 2019-08-04 14:15:10 +02:00
Download-Fritz
3a4f4d1eb8 OcConfigurationLib: Support BlessOverride 2019-08-03 19:42:25 +02:00
Nikolai SAOUKH
c3172ff700 OcTimerLib: revert wrong symbolic name for 0x8086 2019-07-27 07:42:02 +03: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