TianoCore EDK2 master
Loading...
Searching...
No Matches
SmmProfileArch.h
Go to the documentation of this file.
1
9#ifndef _SMM_PROFILE_ARCH_H_
10#define _SMM_PROFILE_ARCH_H_
11
12#pragma pack (1)
13
14typedef struct _MSR_DS_AREA_STRUCT {
15 UINT64 BTSBufferBase;
16 UINT64 BTSIndex;
17 UINT64 BTSAbsoluteMaximum;
18 UINT64 BTSInterruptThreshold;
19 UINT64 PEBSBufferBase;
20 UINT64 PEBSIndex;
21 UINT64 PEBSAbsoluteMaximum;
22 UINT64 PEBSInterruptThreshold;
23 UINT64 PEBSCounterReset[2];
24 UINT64 Reserved;
26
27typedef struct _BRANCH_TRACE_RECORD {
28 UINT64 LastBranchFrom;
29 UINT64 LastBranchTo;
30 UINT64 Rsvd0 : 4;
31 UINT64 BranchPredicted : 1;
32 UINT64 Rsvd1 : 59;
34
35typedef struct _PEBS_RECORD {
36 UINT64 Rflags;
37 UINT64 LinearIP;
38 UINT64 Rax;
39 UINT64 Rbx;
40 UINT64 Rcx;
41 UINT64 Rdx;
42 UINT64 Rsi;
43 UINT64 Rdi;
44 UINT64 Rbp;
45 UINT64 Rsp;
46 UINT64 R8;
47 UINT64 R9;
48 UINT64 R10;
49 UINT64 R11;
50 UINT64 R12;
51 UINT64 R13;
52 UINT64 R14;
53 UINT64 R15;
55
56#pragma pack ()
57
58extern BOOLEAN m1GPageTableSupport;
59
60#define PHYSICAL_ADDRESS_MASK ((1ull << 52) - SIZE_4KB)
61
74VOID
76 UINT64 *PageTable,
77 UINT64 PFAddress,
78 UINTN CpuIndex,
79 UINTN ErrorCode,
80 BOOLEAN *IsValidPFAddress
81 );
82
89VOID
91 OUT UINTN *Cr3
92 );
93
98VOID
100 VOID
101 );
102
112VOID
114 IN OUT UINT64 *Entry,
115 IN UINT64 SubEntryNum
116 );
117
127UINT64
129 IN UINT64 *Entry
130 );
131
138UINT64
139AllocPage (
140 VOID
141 );
142
150VOID
151SetAccNum (
152 IN OUT UINT64 *Entry,
153 IN UINT64 Acc
154 );
155
156#endif // _SMM_PROFILE_ARCH_H_
UINT64 UINTN
VOID InitPagesForPFHandler(VOID)
VOID RestorePageTableAbove4G(UINT64 *PageTable, UINT64 PFAddress, UINTN CpuIndex, UINTN ErrorCode, BOOLEAN *IsValidPFAddress)
VOID InitSmmS3Cr3(OUT UINTN *Cr3)
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
UINT64 AllocPage(VOID)
Definition: PageTbl.c:76
UINT64 GetSubEntriesNum(IN UINT64 *Entry)
Definition: PageTbl.c:126
VOID SetAccNum(IN OUT UINT64 *Entry, IN UINT64 Acc)
Definition: PageTbl.c:333
VOID SetSubEntriesNum(IN OUT UINT64 *Entry, IN UINT64 SubEntryNum)
Definition: PageTbl.c:105