TianoCore EDK2 master
|
Go to the source code of this file.
Variables | |
BOOLEAN | mIsFlushingGCD |
EFI_HANDLE | mCpuHandle = NULL |
EFI_CPU_ARCH_PROTOCOL | mCpu |
Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
Copyright (c) 2011, ARM Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file CpuDxe.c.
EFI_STATUS EFIAPI CpuDisableInterrupt | ( | IN EFI_CPU_ARCH_PROTOCOL * | This | ) |
EFI_STATUS CpuDxeInitialize | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
EFI_STATUS EFIAPI CpuEnableInterrupt | ( | IN EFI_CPU_ARCH_PROTOCOL * | This | ) |
EFI_STATUS EFIAPI CpuFlushCpuDataCache | ( | IN EFI_CPU_ARCH_PROTOCOL * | This, |
IN EFI_PHYSICAL_ADDRESS | Start, | ||
IN UINT64 | Length, | ||
IN EFI_CPU_FLUSH_TYPE | FlushType | ||
) |
This function flushes the range of addresses from Start to Start+Length from the processor's data cache. If Start is not aligned to a cache line boundary, then the bytes before Start to the preceding cache line boundary are also flushed. If Start+Length is not aligned to a cache line boundary, then the bytes past Start+Length to the end of the next cache line boundary are also flushed. The FlushType of EfiCpuFlushTypeWriteBackInvalidate must be supported. If the data cache is fully coherent with all DMA operations, then this function can just return EFI_SUCCESS. If the processor does not support flushing a range of the data cache, then the entire data cache can be flushed.
This | The EFI_CPU_ARCH_PROTOCOL instance. |
Start | The beginning physical address to flush from the processor's data cache. |
Length | The number of bytes to flush from the processor's data cache. This function may flush more bytes than Length specifies depending upon the granularity of the flush operation that the processor supports. |
FlushType | Specifies the type of flush operation to perform. |
EFI_SUCCESS | The address range from Start to Start+Length was flushed from the processor's data cache. |
EFI_UNSUPPORTED | The processor does not support the cache flush type specified by FlushType. |
EFI_DEVICE_ERROR | The address range from Start to Start+Length could not be flushed from the processor's data cache. |
EFI_STATUS EFIAPI CpuGetInterruptState | ( | IN EFI_CPU_ARCH_PROTOCOL * | This, |
OUT BOOLEAN * | State | ||
) |
This function retrieves the processor's current interrupt state a returns it in State. If interrupts are currently enabled, then TRUE is returned. If interrupts are currently disabled, then FALSE is returned.
This | The EFI_CPU_ARCH_PROTOCOL instance. |
State | A pointer to the processor's current interrupt state. Set to TRUE if interrupts are enabled and FALSE if interrupts are disabled. |
EFI_SUCCESS | The processor's current interrupt state was returned in State. |
EFI_INVALID_PARAMETER | State is NULL. |
EFI_STATUS EFIAPI CpuGetTimerValue | ( | IN EFI_CPU_ARCH_PROTOCOL * | This, |
IN UINT32 | TimerIndex, | ||
OUT UINT64 * | TimerValue, | ||
OUT UINT64 *TimerPeriod | OPTIONAL | ||
) |
Returns a timer value from one of the CPU's internal timers. There is no inherent time interval between ticks but is a function of the CPU frequency.
This | - Protocol instance structure. |
TimerIndex | - Specifies which CPU timer is requested. |
TimerValue | - Pointer to the returned timer value. |
TimerPeriod | - A pointer to the amount of time that passes in femtoseconds (10-15) for each increment of TimerValue. If TimerValue does not increment at a predictable rate, then 0 is returned. The amount of time that has passed between two calls to GetTimerValue() can be calculated with the formula (TimerValue2 - TimerValue1) * TimerPeriod. This parameter is optional and may be NULL. |
EFI_SUCCESS | - If the CPU timer count was returned. |
EFI_UNSUPPORTED | - If the CPU does not have any readable timers. |
EFI_DEVICE_ERROR | - If an error occurred while reading the timer. |
EFI_INVALID_PARAMETER | - TimerIndex is not valid or TimerValue is NULL. |
EFI_STATUS EFIAPI CpuInit | ( | IN EFI_CPU_ARCH_PROTOCOL * | This, |
IN EFI_CPU_INIT_TYPE | InitType | ||
) |
This function generates an INIT on the processor. If this function succeeds, then the processor will be reset, and control will not be returned to the caller. If InitType is not supported by this processor, or the processor cannot programmatically generate an INIT without help from external hardware, then EFI_UNSUPPORTED is returned. If an error occurs attempting to generate an INIT, then EFI_DEVICE_ERROR is returned.
This | The EFI_CPU_ARCH_PROTOCOL instance. |
InitType | The type of processor INIT to perform. |
EFI_SUCCESS | The processor INIT was performed. This return code should never be seen. |
EFI_UNSUPPORTED | The processor INIT operation specified by InitType is not supported by this processor. |
EFI_DEVICE_ERROR | The processor INIT failed. |
EFI_STATUS EFIAPI CpuRegisterInterruptHandler | ( | IN EFI_CPU_ARCH_PROTOCOL * | This, |
IN EFI_EXCEPTION_TYPE | InterruptType, | ||
IN EFI_CPU_INTERRUPT_HANDLER | InterruptHandler | ||
) |
Registers a function to be called from the CPU interrupt handler.
This | Protocol instance structure |
InterruptType | Defines which interrupt to hook. IA-32 valid range is 0x00 through 0xFF |
InterruptHandler | A pointer to a function of type EFI_CPU_INTERRUPT_HANDLER that is called when a processor interrupt occurs. A null pointer is an error condition. |
EFI_SUCCESS | If handler installed or uninstalled. |
EFI_ALREADY_STARTED | InterruptHandler is not NULL, and a handler for InterruptType was previously installed. |
EFI_INVALID_PARAMETER | InterruptHandler is NULL, and a handler for InterruptType was not previously installed. |
EFI_UNSUPPORTED | The interrupt specified by InterruptType is not supported. |
STATIC VOID InitializeDma | ( | IN OUT EFI_CPU_ARCH_PROTOCOL * | CpuArchProtocol | ) |
STATIC VOID RemapUnusedMemoryNx | ( | VOID | ) |
EFI_HANDLE mCpuHandle = NULL |