2 X64 processor specific header file to enable SMM profile.
4 Copyright (c) 2012 - 2015, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
9 #ifndef _SMM_PROFILE_ARCH_H_
10 #define _SMM_PROFILE_ARCH_H_
14 typedef struct _MSR_DS_AREA_STRUCT
{
17 UINT64 BTSAbsoluteMaximum
;
18 UINT64 BTSInterruptThreshold
;
19 UINT64 PEBSBufferBase
;
21 UINT64 PEBSAbsoluteMaximum
;
22 UINT64 PEBSInterruptThreshold
;
23 UINT64 PEBSCounterReset
[2];
27 typedef struct _BRANCH_TRACE_RECORD
{
28 UINT64 LastBranchFrom
;
31 UINT64 BranchPredicted
: 1;
33 } BRANCH_TRACE_RECORD
;
35 typedef struct _PEBS_RECORD
{
58 #define PHYSICAL_ADDRESS_MASK ((1ull << 52) - SIZE_4KB)
61 Update page table to map the memory correctly in order to make the instruction
62 which caused page fault execute successfully. And it also save the original page
63 table to be restored in single-step exception.
65 @param PageTable PageTable Address.
66 @param PFAddress The memory address which caused page fault exception.
67 @param CpuIndex The index of the processor.
68 @param ErrorCode The Error code of exception.
69 @param IsValidPFAddress The flag indicates if SMM profile data need be added.
73 RestorePageTableAbove4G (
78 BOOLEAN
*IsValidPFAddress
82 Create SMM page table for S3 path.
91 Allocate pages for creating 4KB-page based on 2MB-page when page fault happens.
95 InitPagesForPFHandler (
99 #endif // _SMM_PROFILE_ARCH_H_