2 IA-32 processor specific header file to enable SMM profile.
4 Copyright (c) 2012 - 2015, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef _SMM_PROFILE_ARCH_H_
16 #define _SMM_PROFILE_ARCH_H_
20 typedef struct _MSR_DS_AREA_STRUCT
{
23 UINT32 BTSAbsoluteMaximum
;
24 UINT32 BTSInterruptThreshold
;
25 UINT32 PEBSBufferBase
;
27 UINT32 PEBSAbsoluteMaximum
;
28 UINT32 PEBSInterruptThreshold
;
29 UINT32 PEBSCounterReset
[4];
33 typedef struct _BRANCH_TRACE_RECORD
{
34 UINT32 LastBranchFrom
;
37 UINT32 BranchPredicted
: 1;
39 } BRANCH_TRACE_RECORD
;
41 typedef struct _PEBS_RECORD
{
56 #define PHYSICAL_ADDRESS_MASK ((1ull << 32) - SIZE_4KB)
59 Update page table to map the memory correctly in order to make the instruction
60 which caused page fault execute successfully. And it also save the original page
61 table to be restored in single-step exception. 32-bit firmware does not need it.
63 @param PageTable PageTable Address.
64 @param PFAddress The memory address which caused page fault exception.
65 @param CpuIndex The index of the processor.
66 @param ErrorCode The Error code of exception.
67 @param IsValidPFAddress The flag indicates if SMM profile data need be added.
71 RestorePageTableAbove4G (
76 BOOLEAN
*IsValidPFAddress
80 Create SMM page table for S3 path.
89 Allocate pages for creating 4KB-page based on 2MB-page when page fault happens.
93 InitPagesForPFHandler (
97 #endif // _SMM_PROFILE_ARCH_H_