2 IA-32 processor specific functions 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 #include "PiSmmCpuDxeSmm.h"
16 #include "SmmProfileInternal.h"
19 Create SMM page table for S3 path.
27 mSmmS3ResumeState
->SmmS3Cr3
= Gen4GPageTable (0, TRUE
);
33 Allocate pages for creating 4KB-page based on 2MB-page when page fault happens.
34 32-bit firmware does not need it.
38 InitPagesForPFHandler (
45 Update page table to map the memory correctly in order to make the instruction
46 which caused page fault execute successfully. And it also save the original page
47 table to be restored in single-step exception. 32-bit firmware does not need it.
49 @param PageTable PageTable Address.
50 @param PFAddress The memory address which caused page fault exception.
51 @param CpuIndex The index of the processor.
52 @param ErrorCode The Error code of exception.
53 @param IsValidPFAddress The flag indicates if SMM profile data need be added.
57 RestorePageTableAbove4G (
62 BOOLEAN
*IsValidPFAddress
70 @param SystemContext A pointer to the processor context when
71 the interrupt occurred on the processor.
76 IN OUT EFI_SYSTEM_CONTEXT SystemContext
79 SystemContext
.SystemContextIa32
->Eflags
&= (UINTN
) ~BIT8
;