TianoCore EDK2 master
CpuDxe.h
Go to the documentation of this file.
1
9#ifndef _CPU_DXE_H_
10#define _CPU_DXE_H_
11
12#include <PiDxe.h>
13
14#include <Protocol/Cpu.h>
15#include <Protocol/MpService.h>
16#include <Register/Intel/Msr.h>
17
20
24#include <Library/BaseLib.h>
25#include <Library/CpuLib.h>
28#include <Library/DebugLib.h>
29#include <Library/MtrrLib.h>
31#include <Library/UefiCpuLib.h>
32#include <Library/UefiLib.h>
34#include <Library/HobLib.h>
36#include <Library/MpInitLib.h>
37#include <Library/TimerLib.h>
38
39#include <Guid/IdleLoopEvent.h>
41
42#define HEAP_GUARD_NONSTOP_MODE \
43 ((PcdGet8 (PcdHeapGuardPropertyMask) & (BIT6|BIT4|BIT1|BIT0)) > BIT6)
44
45#define NULL_DETECTION_NONSTOP_MODE \
46 ((PcdGet8 (PcdNullPointerDetectionPropertyMask) & (BIT6|BIT0)) > BIT6)
47
64EFIAPI
68 IN UINT64 Length,
69 IN EFI_CPU_FLUSH_TYPE FlushType
70 );
71
82EFIAPI
85 );
86
97EFIAPI
100 );
101
113EFIAPI
116 OUT BOOLEAN *State
117 );
118
132EFIAPI
133CpuInit (
135 IN EFI_CPU_INIT_TYPE InitType
136 );
137
159EFIAPI
162 IN EFI_EXCEPTION_TYPE InterruptType,
163 IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler
164 );
165
190EFIAPI
193 IN UINT32 TimerIndex,
194 OUT UINT64 *TimerValue,
195 OUT UINT64 *TimerPeriod OPTIONAL
196 );
197
215EFIAPI
218 IN EFI_PHYSICAL_ADDRESS BaseAddress,
219 IN UINT64 Length,
220 IN UINT64 Attributes
221 );
222
227VOID
229 VOID
230 );
231
238VOID
239EFIAPI
241 UINT16 Selector
242 );
243
250VOID
251EFIAPI
253 UINT16 Selector
254 );
255
259VOID
261 VOID
262 );
263
273VOID
274EFIAPI
276 IN EFI_EXCEPTION_TYPE ExceptionType,
277 IN EFI_SYSTEM_CONTEXT SystemContext
278 );
279
289VOID
290EFIAPI
292 IN EFI_EXCEPTION_TYPE ExceptionType,
293 IN EFI_SYSTEM_CONTEXT SystemContext
294 );
295
296extern BOOLEAN mIsAllocatingPageTable;
297extern UINTN mNumberOfProcessors;
298
299#endif
UINT64 UINTN
EFI_STATUS EFIAPI CpuSetMemoryAttributes(IN EFI_CPU_ARCH_PROTOCOL *This, IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length, IN UINT64 Attributes)
Definition: CpuMmuCommon.c:185
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
EFI_CPU_FLUSH_TYPE
Definition: Cpu.h:24
EFI_CPU_INIT_TYPE
Definition: Cpu.h:34
VOID(EFIAPI * EFI_CPU_INTERRUPT_HANDLER)(IN CONST EFI_EXCEPTION_TYPE InterruptType, IN CONST EFI_SYSTEM_CONTEXT SystemContext)
Definition: Cpu.h:52
INTN EFI_EXCEPTION_TYPE
Definition: DebugSupport.h:35
UINT64 EFI_PHYSICAL_ADDRESS
Definition: UefiBaseType.h:49
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:28
EFI_STATUS EFIAPI CpuGetInterruptState(IN EFI_CPU_ARCH_PROTOCOL *This, OUT BOOLEAN *State)
Definition: CpuDxe.c:124
EFI_STATUS EFIAPI CpuRegisterInterruptHandler(IN EFI_CPU_ARCH_PROTOCOL *This, IN EFI_EXCEPTION_TYPE InterruptType, IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler)
Definition: CpuDxe.c:165
VOID EFIAPI PageFaultExceptionHandler(IN EFI_EXCEPTION_TYPE ExceptionType, IN EFI_SYSTEM_CONTEXT SystemContext)
VOID EFIAPI SetCodeSelector(UINT16 Selector)
EFI_STATUS EFIAPI CpuGetTimerValue(IN EFI_CPU_ARCH_PROTOCOL *This, IN UINT32 TimerIndex, OUT UINT64 *TimerValue, OUT UINT64 *TimerPeriod OPTIONAL)
Definition: CpuDxe.c:176
VOID EFIAPI DebugExceptionHandler(IN EFI_EXCEPTION_TYPE ExceptionType, IN EFI_SYSTEM_CONTEXT SystemContext)
VOID EFIAPI SetDataSelectors(UINT16 Selector)
EFI_STATUS EFIAPI CpuDisableInterrupt(IN EFI_CPU_ARCH_PROTOCOL *This)
Definition: CpuDxe.c:100
EFI_STATUS EFIAPI CpuInit(IN EFI_CPU_ARCH_PROTOCOL *This, IN EFI_CPU_INIT_TYPE InitType)
Definition: CpuDxe.c:155
VOID RefreshGcdMemoryAttributesFromPaging(VOID)
Definition: CpuPageTable.c:958
EFI_STATUS EFIAPI CpuFlushCpuDataCache(IN EFI_CPU_ARCH_PROTOCOL *This, IN EFI_PHYSICAL_ADDRESS Start, IN UINT64 Length, IN EFI_CPU_FLUSH_TYPE FlushType)
Definition: CpuDxe.c:45
VOID InitGlobalDescriptorTable(VOID)
Definition: CpuGdt.c:123
EFI_STATUS EFIAPI CpuEnableInterrupt(IN EFI_CPU_ARCH_PROTOCOL *This)
Definition: CpuDxe.c:80