VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmProfileArch.c@ 108793

Last change on this file since 108793 was 101291, checked in by vboxsync, 19 months ago

EFI/FirmwareNew: Make edk2-stable202308 build on all supported platforms (using gcc at least, msvc not tested yet), bugref:4643

  • Property svn:eol-style set to native
File size: 1.6 KB
Line 
1/** @file
2IA-32 processor specific functions to enable SMM profile.
3
4Copyright (c) 2012 - 2016, Intel Corporation. All rights reserved.<BR>
5SPDX-License-Identifier: BSD-2-Clause-Patent
6
7**/
8
9#include "PiSmmCpuDxeSmm.h"
10#include "SmmProfileInternal.h"
11
12/**
13 Create SMM page table for S3 path.
14
15**/
16VOID
17InitSmmS3Cr3 (
18 VOID
19 )
20{
21 mSmmS3ResumeState->SmmS3Cr3 = GenSmmPageTable (PagingPae, mPhysicalAddressBits);
22
23 return;
24}
25
26/**
27 Allocate pages for creating 4KB-page based on 2MB-page when page fault happens.
28 32-bit firmware does not need it.
29
30**/
31VOID
32InitPagesForPFHandler (
33 VOID
34 )
35{
36}
37
38/**
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.
42
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.
48
49**/
50VOID
51RestorePageTableAbove4G (
52 UINT64 *PageTable,
53 UINT64 PFAddress,
54 UINTN CpuIndex,
55 UINTN ErrorCode,
56 BOOLEAN *IsValidPFAddress
57 )
58{
59}
60
61/**
62 Clear TF in FLAGS.
63
64 @param SystemContext A pointer to the processor context when
65 the interrupt occurred on the processor.
66
67**/
68VOID
69ClearTrapFlag (
70 IN OUT EFI_SYSTEM_CONTEXT SystemContext
71 )
72{
73 SystemContext.SystemContextIa32->Eflags &= (UINTN) ~BIT8;
74}
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette