518 Commits

Author SHA1 Message Date
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
Download-Fritz
ba5dc467c8 OcBootManagementLib: Support multiple boot instances per Preboot 2019-07-20 13:03:46 +02:00
vit9696
f4fceb7a91 OcMemoryLib: Initial version 2019-07-16 20:21:43 +03:00
vit9696
b371f4a110 OcDebugLogLib: Add date and time to log filename 2019-07-16 19:52:05 +03:00
Download-Fritz
8bc96853a0 OcDevicePathLib: Correct CRLF to LF 2019-07-15 12:27:25 +02:00
Download-Fritz
8c7bc280bf OcDevicePathLib: Add deduplicate DP instance append API 2019-07-15 09:19:58 +02:00
vit9696
6cb565cf56 OcBootManagementLib: Add bootloader detection code from AMF 2019-06-26 14:53:52 +03:00
Download-Fritz
dbee02e35f OcFileLib: Return ESP Device Path size 2019-06-18 20:34:58 +02:00
vit9696
d3a626cdc5 OcInterface: Implement initial OcInterface protocol with test sample 2019-06-18 12:49:24 +03:00
vit9696
c8545a2564 OcBootManagementLib: Rework filesystem scan policy 2019-06-18 11:20:27 +03:00
Download-Fritz
4d42d79837 OcFileLiv: Add APIs to locate partition's disk and disk's ESP 2019-06-15 22:01:52 +02:00
Download-Fritz
2f31cfaa27 OcDevicePathLib: Import file Device Path name size/len retrieval APIs 2019-06-14 23:02:19 +02:00
Download-Fritz
63e85a8b13 OcFileLib: Import GetGptPartitionEntry API 2019-06-12 22:14:35 +02:00
Download-Fritz
39f9566070 OcDevicePathLib: Return the number of fixed Apple DP nodes 2019-06-12 15:14:35 +02:00
vit9696
327d4b7de3 OcAcpiLib: Implement ResetHwSig quirk 2019-06-12 02:44:10 +03:00
vit9696
cc2b7e6c2a OcBootManagementLib: Basic hibernate support 2019-06-12 00:37:49 +03:00
vit9696
2825930a0d OcMiscLib: Force our own base64 implementation, edk2 is broken
Revert "Deprecate OcBase64Decode in favor of edk2's Base64Decode"
This reverts commit 2104029260a009b807614b10aaee931685840282.
Reference: https://github.com/acidanthera/bugtracker/issues/372
2019-06-10 19:59:23 +03:00
Download-Fritz
45828187ac Convert edk2 code to LF 2019-06-09 22:26:26 +02:00
Download-Fritz
85a0833e53 OcDevicePathLib: Add support for short-form expansion 2019-06-09 22:04:30 +02:00