|
EFI_STATUS EFIAPI | CpuFlushCpuDataCache (IN EFI_CPU_ARCH_PROTOCOL *This, IN EFI_PHYSICAL_ADDRESS Start, IN UINT64 Length, IN EFI_CPU_FLUSH_TYPE FlushType) |
|
EFI_STATUS EFIAPI | CpuEnableInterrupt (IN EFI_CPU_ARCH_PROTOCOL *This) |
|
EFI_STATUS EFIAPI | CpuDisableInterrupt (IN EFI_CPU_ARCH_PROTOCOL *This) |
|
EFI_STATUS EFIAPI | CpuGetInterruptState (IN EFI_CPU_ARCH_PROTOCOL *This, OUT BOOLEAN *State) |
|
EFI_STATUS EFIAPI | CpuInit (IN EFI_CPU_ARCH_PROTOCOL *This, IN EFI_CPU_INIT_TYPE InitType) |
|
EFI_STATUS EFIAPI | CpuRegisterInterruptHandler (IN EFI_CPU_ARCH_PROTOCOL *This, IN EFI_EXCEPTION_TYPE InterruptType, IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler) |
|
EFI_STATUS EFIAPI | CpuGetTimerValue (IN EFI_CPU_ARCH_PROTOCOL *This, IN UINT32 TimerIndex, OUT UINT64 *TimerValue, OUT UINT64 *TimerPeriod OPTIONAL) |
|
EFI_STATUS EFIAPI | CpuSetMemoryAttributes (IN EFI_CPU_ARCH_PROTOCOL *This, IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length, IN UINT64 Attributes) |
|
VOID | InitGlobalDescriptorTable (VOID) |
|
VOID EFIAPI | SetCodeSelector (UINT16 Selector) |
|
VOID EFIAPI | SetDataSelectors (UINT16 Selector) |
|
VOID | RefreshGcdMemoryAttributesFromPaging (VOID) |
|
VOID EFIAPI | DebugExceptionHandler (IN EFI_EXCEPTION_TYPE ExceptionType, IN EFI_SYSTEM_CONTEXT SystemContext) |
|
VOID EFIAPI | PageFaultExceptionHandler (IN EFI_EXCEPTION_TYPE ExceptionType, IN EFI_SYSTEM_CONTEXT SystemContext) |
|
CPU DXE Module to produce CPU ARCH Protocol and CPU MP Protocol.
Copyright (c) 2008 - 2023, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file CpuDxe.h.
Flush CPU data cache. If the instruction cache is fully coherent with all DMA operations then function can just return EFI_SUCCESS.
- Parameters
-
This | Protocol instance structure |
Start | Physical address to start flushing from. |
Length | Number of bytes to flush. Round up to chipset granularity. |
FlushType | Specifies the type of flush operation to perform. |
- Return values
-
EFI_SUCCESS | If cache was flushed |
EFI_UNSUPPORTED | If flush type is not supported. |
EFI_DEVICE_ERROR | If requested range could not be flushed. |
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.
- Parameters
-
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. |
- Return values
-
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. |
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.
- Parameters
-
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. |
- Return values
-
EFI_SUCCESS | The address range from Start to Start+Length was flushed from the processor's data cache. |
EFI_INVALID_PARAMETER | The processor does not support the cache flush type specified by FlushType. |
Definition at line 47 of file CpuDxe.c.
Generates an INIT to the CPU.
- Parameters
-
This | Protocol instance structure |
InitType | Type of CPU INIT to perform |
- Return values
-
EFI_SUCCESS | If CPU INIT occurred. This value should never be seen. |
EFI_DEVICE_ERROR | If CPU INIT failed. |
EFI_UNSUPPORTED | Requested type of CPU INIT not supported. |
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.
- Parameters
-
This | The EFI_CPU_ARCH_PROTOCOL instance. |
InitType | The type of processor INIT to perform. |
- Return values
-
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. |
Definition at line 157 of file CpuDxe.c.
Set memory cacheability attributes for given range of memory.
- Parameters
-
This | Protocol instance structure |
BaseAddress | Specifies the start address of the memory range |
Length | Specifies the length of the memory range |
Attributes | The memory cacheability for the memory range |
- Return values
-
EFI_SUCCESS | If the cacheability of that memory range is set successfully |
EFI_UNSUPPORTED | If the desired operation cannot be done |
EFI_INVALID_PARAMETER | The input parameter is not correct, such as Length = 0 |
This function modifies the attributes for the memory region specified by BaseAddress and Length from their current attributes to the attributes specified by Attributes.
- Parameters
-
This | The EFI_CPU_ARCH_PROTOCOL instance. |
BaseAddress | The physical address that is the start address of a memory region. |
Length | The size in bytes of the memory region. |
Attributes | The bit mask of attributes to set for the memory region. |
- Return values
-
EFI_SUCCESS | The attributes were set for the memory region. |
EFI_ACCESS_DENIED | The attributes for the memory resource range specified by BaseAddress and Length cannot be modified. |
EFI_INVALID_PARAMETER | Length is zero. |
EFI_OUT_OF_RESOURCES | There are not enough system resources to modify the attributes of the memory resource range. |
EFI_UNSUPPORTED | The processor does not support one or more bytes of the memory resource range specified by BaseAddress and Length. The bit mask of attributes is not support for the memory resource range specified by BaseAddress and Length. |
Implementation of SetMemoryAttributes() service of CPU Architecture Protocol.
This function modifies the attributes for the memory region specified by BaseAddress and Length from their current attributes to the attributes specified by Attributes.
- Parameters
-
This | The EFI_CPU_ARCH_PROTOCOL instance. |
BaseAddress | The physical address that is the start address of a memory region. |
Length | The size in bytes of the memory region. |
Attributes | The bit mask of attributes to set for the memory region. |
- Return values
-
EFI_SUCCESS | The attributes were set for the memory region. |
EFI_ACCESS_DENIED | The attributes for the memory resource range specified by BaseAddress and Length cannot be modified. |
EFI_INVALID_PARAMETER | Length is zero. Attributes specified an illegal combination of attributes that cannot be set together. |
EFI_OUT_OF_RESOURCES | There are not enough system resources to modify the attributes of the memory resource range. |
EFI_UNSUPPORTED | The processor does not support one or more bytes of the memory resource range specified by BaseAddress and Length. The bit mask of attributes is not support for the memory resource range specified by BaseAddress and Length. |
This function modifies the attributes for the memory region specified by BaseAddress and Length from their current attributes to the attributes specified by Attributes.
- Parameters
-
This | The EFI_CPU_ARCH_PROTOCOL instance. |
BaseAddress | The physical address that is the start address of a memory region. |
Length | The size in bytes of the memory region. |
EfiAttributes | The bit mask of attributes to set for the memory region. |
- Return values
-
EFI_SUCCESS | The attributes were set for the memory region. |
EFI_ACCESS_DENIED | The attributes for the memory resource range specified by BaseAddress and Length cannot be modified. |
EFI_INVALID_PARAMETER | Length is zero. |
EFI_OUT_OF_RESOURCES | There are not enough system resources to modify the attributes of the memory resource range. |
EFI_UNSUPPORTED | The processor does not support one or more bytes of the memory resource range specified by BaseAddress and Length. The bit mask of attributes is not support for the memory resource range specified by BaseAddress and Length. |
Definition at line 228 of file CpuMmuCommon.c.