TianoCore EDK2 master
Loading...
Searching...
No Matches
Cpu.h
Go to the documentation of this file.
1
11#ifndef __ARCH_PROTOCOL_CPU_H__
12#define __ARCH_PROTOCOL_CPU_H__
13
15
16#define EFI_CPU_ARCH_PROTOCOL_GUID \
17 { 0x26baccb1, 0x6f42, 0x11d4, {0xbc, 0xe7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } }
18
20
24typedef enum {
25 EfiCpuFlushTypeWriteBackInvalidate,
26 EfiCpuFlushTypeWriteBack,
27 EfiCpuFlushTypeInvalidate,
28 EfiCpuMaxFlushType
30
34typedef enum {
35 EfiCpuInit,
36 EfiCpuMaxInitType
38
50typedef
51VOID
53 IN CONST EFI_EXCEPTION_TYPE InterruptType,
54 IN CONST EFI_SYSTEM_CONTEXT SystemContext
55 );
56
84typedef
89 IN UINT64 Length,
90 IN EFI_CPU_FLUSH_TYPE FlushType
91 );
92
102typedef
106 );
107
117typedef
121 );
122
136typedef
140 OUT BOOLEAN *State
141 );
142
159typedef
161(EFIAPI *EFI_CPU_INIT)(
163 IN EFI_CPU_INIT_TYPE InitType
164 );
165
187typedef
191 IN EFI_EXCEPTION_TYPE InterruptType,
192 IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler
193 );
194
212typedef
216 IN UINT32 TimerIndex,
217 OUT UINT64 *TimerValue,
218 OUT UINT64 *TimerPeriod OPTIONAL
219 );
220
244typedef
248 IN EFI_PHYSICAL_ADDRESS BaseAddress,
249 IN UINT64 Length,
250 IN UINT64 Attributes
251 );
252
260 EFI_CPU_FLUSH_DATA_CACHE FlushDataCache;
261 EFI_CPU_ENABLE_INTERRUPT EnableInterrupt;
262 EFI_CPU_DISABLE_INTERRUPT DisableInterrupt;
263 EFI_CPU_GET_INTERRUPT_STATE GetInterruptState;
264 EFI_CPU_INIT Init;
265 EFI_CPU_REGISTER_INTERRUPT_HANDLER RegisterInterruptHandler;
266 EFI_CPU_GET_TIMER_VALUE GetTimerValue;
267 EFI_CPU_SET_MEMORY_ATTRIBUTES SetMemoryAttributes;
282};
283
284extern EFI_GUID gEfiCpuArchProtocolGuid;
285
286#endif
EFI_STATUS(EFIAPI * EFI_CPU_SET_MEMORY_ATTRIBUTES)(IN EFI_CPU_ARCH_PROTOCOL *This, IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length, IN UINT64 Attributes)
Definition: Cpu.h:246
EFI_CPU_FLUSH_TYPE
Definition: Cpu.h:24
EFI_STATUS(EFIAPI * EFI_CPU_FLUSH_DATA_CACHE)(IN EFI_CPU_ARCH_PROTOCOL *This, IN EFI_PHYSICAL_ADDRESS Start, IN UINT64 Length, IN EFI_CPU_FLUSH_TYPE FlushType)
Definition: Cpu.h:86
EFI_CPU_INIT_TYPE
Definition: Cpu.h:34
EFI_STATUS(EFIAPI * EFI_CPU_DISABLE_INTERRUPT)(IN EFI_CPU_ARCH_PROTOCOL *This)
Definition: Cpu.h:119
VOID(EFIAPI * EFI_CPU_INTERRUPT_HANDLER)(IN CONST EFI_EXCEPTION_TYPE InterruptType, IN CONST EFI_SYSTEM_CONTEXT SystemContext)
Definition: Cpu.h:52
EFI_STATUS(EFIAPI * EFI_CPU_INIT)(IN EFI_CPU_ARCH_PROTOCOL *This, IN EFI_CPU_INIT_TYPE InitType)
Definition: Cpu.h:161
EFI_STATUS(EFIAPI * EFI_CPU_ENABLE_INTERRUPT)(IN EFI_CPU_ARCH_PROTOCOL *This)
Definition: Cpu.h:104
EFI_STATUS(EFIAPI * EFI_CPU_REGISTER_INTERRUPT_HANDLER)(IN EFI_CPU_ARCH_PROTOCOL *This, IN EFI_EXCEPTION_TYPE InterruptType, IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler)
Definition: Cpu.h:189
EFI_STATUS(EFIAPI * EFI_CPU_GET_INTERRUPT_STATE)(IN EFI_CPU_ARCH_PROTOCOL *This, OUT BOOLEAN *State)
Definition: Cpu.h:138
EFI_STATUS(EFIAPI * EFI_CPU_GET_TIMER_VALUE)(IN EFI_CPU_ARCH_PROTOCOL *This, IN UINT32 TimerIndex, OUT UINT64 *TimerValue, OUT UINT64 *TimerPeriod OPTIONAL)
Definition: Cpu.h:214
#define CONST
Definition: Base.h:259
#define OPTIONAL
Definition: Base.h:290
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
INTN EFI_EXCEPTION_TYPE
Definition: DebugSupport.h:35
UINT64 EFI_PHYSICAL_ADDRESS
Definition: UefiBaseType.h:50
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
UINT32 DmaBufferAlignment
Definition: Cpu.h:281
UINT32 NumberOfTimers
Definition: Cpu.h:273
Definition: Base.h:213