10#ifndef _SMM_PROFILE_INTERNAL_H_
11#define _SMM_PROFILE_INTERNAL_H_
17#include "SmmProfileArch.h"
22#define SMM_PROFILE_DTS_SIZE (4 * 1024 * 1024)
24#define MAX_PF_PAGE_COUNT 0x2
26#define PEBS_RECORD_NUMBER 0x2
28#define MAX_PF_ENTRY_COUNT 10
35#define IA32_PF_EC_ID (1u << 4)
37#define SMM_PROFILE_NAME L"SmmProfileData"
42#define MSR_EFER_XD 0x800
44#define CPUID1_EDX_BTS_AVAILABLE 0x200000
46#define DR6_SINGLE_STEP 0x4000
48#define MSR_DS_AREA 0x600
50#define HEAP_GUARD_NONSTOP_MODE \
51 ((PcdGet8 (PcdHeapGuardPropertyMask) & (BIT6|BIT3|BIT2)) > BIT6)
53#define NULL_DETECTION_NONSTOP_MODE \
54 ((PcdGet8 (PcdNullPointerDetectionPropertyMask) & (BIT6|BIT1)) > BIT6)
69 UINT64 MaxDataEntries;
71 UINT64 CurDataEntries;
89extern UINTN gSmiExceptionHandlers[];
90extern BOOLEAN mXdSupported;
91X86_ASSEMBLY_PATCH_LABEL gPatchXdSupported;
92X86_ASSEMBLY_PATCH_LABEL gPatchMsrIa32MiscEnableSupported;
93extern UINTN *mPFEntryCount;
94extern UINT64 (*mLastPFEntryValue)[MAX_PF_ENTRY_COUNT];
95extern UINT64 *(*mLastPFEntryPointer)[MAX_PF_ENTRY_COUNT];
VOID ClearTrapFlag(IN OUT EFI_SYSTEM_CONTEXT SystemContext)
VOID SmmProfileMapPFAddress(VOID)
BOOLEAN IsSmmProfilePFAddressAbove4GValid(IN EFI_PHYSICAL_ADDRESS Address, OUT BOOLEAN *Nx)
BOOLEAN IsAddressSplit(IN EFI_PHYSICAL_ADDRESS Address)
UINT64 EFI_PHYSICAL_ADDRESS