2 IA-32 processor specific functions to enable SMM profile.
4 Copyright (c) 2012 - 2016, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
9 #include "PiSmmCpuDxeSmm.h"
10 #include "SmmProfileInternal.h"
13 Create SMM page table for S3 path.
21 mSmmS3ResumeState
->SmmS3Cr3
= Gen4GPageTable (TRUE
);
27 Allocate pages for creating 4KB-page based on 2MB-page when page fault happens.
28 32-bit firmware does not need it.
32 InitPagesForPFHandler (
39 Update page table to map the memory correctly in order to make the instruction
40 which caused page fault execute successfully. And it also save the original page
41 table to be restored in single-step exception. 32-bit firmware does not need it.
43 @param PageTable PageTable Address.
44 @param PFAddress The memory address which caused page fault exception.
45 @param CpuIndex The index of the processor.
46 @param ErrorCode The Error code of exception.
47 @param IsValidPFAddress The flag indicates if SMM profile data need be added.
51 RestorePageTableAbove4G (
56 BOOLEAN
*IsValidPFAddress
64 @param SystemContext A pointer to the processor context when
65 the interrupt occurred on the processor.
70 IN OUT EFI_SYSTEM_CONTEXT SystemContext
73 SystemContext
.SystemContextIa32
->Eflags
&= (UINTN
) ~BIT8
;