OpenCore
1.0.4
OpenCore Bootloader
|
#include <Uefi.h>
#include <Guid/OcVariable.h>
#include <Guid/AppleHob.h>
#include <Guid/ApplePlatformInfo.h>
#include <Guid/AcpiDescription.h>
#include <IndustryStandard/CpuId.h>
#include <IndustryStandard/GenericIch.h>
#include <IndustryStandard/McpMemoryController.h>
#include <Protocol/PciIo.h>
#include <Pi/PiBootMode.h>
#include <Pi/PiHob.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/BaseOverflowLib.h>
#include <Library/DebugLib.h>
#include <Library/HobLib.h>
#include <Library/IoLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/OcCpuLib.h>
#include <Library/PciLib.h>
#include <Library/OcMiscLib.h>
#include <Library/OcVariableLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
#include <IndustryStandard/ProcessorInfo.h>
#include <Register/Msr.h>
#include "OcCpuInternals.h"
Go to the source code of this file.
Functions | |
UINTN | InternalGetPmTimerAddr (OUT CONST CHAR8 **Type OPTIONAL) |
UINT64 | InternalCalculateTSCFromPMTimer (IN BOOLEAN Recalculate) |
STATIC UINT64 | InternalSelectAppleFsbFrequency (IN UINT64 *FsbFrequency, IN UINT32 FsbFrequncyCount) |
UINT64 | InternalCalculateTSCFromApplePlatformInfo (OUT UINT64 *FSBFrequency OPTIONAL, IN BOOLEAN Recalculate) |
UINT64 | InternalCalculateARTFrequencyIntel (OUT UINT64 *CPUFrequency, OUT UINT64 *TscAdjustPtr OPTIONAL, IN BOOLEAN Recalculate) |
UINT64 | InternalCalculateVMTFrequency (OUT UINT64 *FSBFrequency OPTIONAL, OUT BOOLEAN *UnderHypervisor OPTIONAL) |
UINT64 | OcGetTSCFrequency (VOID) |
Copyright (C) 2016 - 2017, The HermitCrabs Lab. All rights reserved.
All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Definition in file FrequencyDetect.c.
UINT64 InternalCalculateARTFrequencyIntel | ( | OUT UINT64 * | CPUFrequency, |
OUT UINT64 *TscAdjustPtr | OPTIONAL, | ||
IN BOOLEAN | Recalculate ) |
Calculate the ART frequency and derieve the CPU frequency for Intel CPUs
[out] | CPUFrequency | The derieved CPU frequency. |
[out] | TscAdjustPtr | Adjustment value for TSC, optional. |
[in] | Recalculate | Do not re-use previously cached information. |
The | calculated ART frequency. |
Definition at line 474 of file FrequencyDetect.c.
UINT64 InternalCalculateTSCFromApplePlatformInfo | ( | OUT UINT64 *FSBFrequency | OPTIONAL, |
IN BOOLEAN | Recalculate ) |
Calculate the TSC frequency via Apple Platform Info
[out] | FSBFrequency | Updated FSB frequency, optional. |
[in] | Recalculate | Do not re-use previously cached information. |
The | calculated TSC frequency. |
Definition at line 345 of file FrequencyDetect.c.
UINT64 InternalCalculateTSCFromPMTimer | ( | IN BOOLEAN | Recalculate | ) |
Calculate the TSC frequency via PM timer
[in] | Recalculate | Do not re-use previously cached information. |
The | calculated TSC frequency. |
Definition at line 173 of file FrequencyDetect.c.
UINT64 InternalCalculateVMTFrequency | ( | OUT UINT64 *FSBFrequency | OPTIONAL, |
OUT BOOLEAN *UnderHypervisor | OPTIONAL ) |
Calculate the CPU frequency via VMT for hypervisors
[out] | FSBFrequency | FSB frequency, optional. |
[out] | UnderHypervisor | Hypervisor status, optional. |
CPU | frequency or 0. |
Definition at line 646 of file FrequencyDetect.c.
UINTN InternalGetPmTimerAddr | ( | OUT CONST CHAR8 **Type | OPTIONAL | ) |
Obtain ACPI PM timer address for this BSP.
[out] | Type | Address source type, optional. |
ACPI | PM timer address or 0. |
Definition at line 46 of file FrequencyDetect.c.
STATIC UINT64 InternalSelectAppleFsbFrequency | ( | IN UINT64 * | FsbFrequency, |
IN UINT32 | FsbFrequncyCount ) |
Definition at line 288 of file FrequencyDetect.c.
UINT64 OcGetTSCFrequency | ( | VOID | ) |
Obtain CPU's invariant TSC frequency.
CPU's | TSC frequency or OC_FALLBACK_CPU_FREQUENCY. |
Definition at line 762 of file FrequencyDetect.c.