2 IA-32 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 UINT32 BTSAbsoluteMaximum
;
18 UINT32 BTSInterruptThreshold
;
19 UINT32 PEBSBufferBase
;
21 UINT32 PEBSAbsoluteMaximum
;
22 UINT32 PEBSInterruptThreshold
;
23 UINT32 PEBSCounterReset
[4];
27 typedef struct _BRANCH_TRACE_RECORD
{
28 UINT32 LastBranchFrom
;
31 UINT32 BranchPredicted
: 1;
33 } BRANCH_TRACE_RECORD
;
35 typedef struct _PEBS_RECORD
{
50 #define PHYSICAL_ADDRESS_MASK ((1ull << 32) - SIZE_4KB)
53 Update page table to map the memory correctly in order to make the instruction
54 which caused page fault execute successfully. And it also save the original page
55 table to be restored in single-step exception. 32-bit firmware does not need it.
57 @param PageTable PageTable Address.
58 @param PFAddress The memory address which caused page fault exception.
59 @param CpuIndex The index of the processor.
60 @param ErrorCode The Error code of exception.
61 @param IsValidPFAddress The flag indicates if SMM profile data need be added.
65 RestorePageTableAbove4G (
70 BOOLEAN
*IsValidPFAddress
74 Create SMM page table for S3 path.
83 Allocate pages for creating 4KB-page based on 2MB-page when page fault happens.
87 InitPagesForPFHandler (
91 #endif // _SMM_PROFILE_ARCH_H_