VirtualBox

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

Last change on this file since 108794 was 108794, checked in by vboxsync, 2 weeks ago

Devices/EFI/FirmwareNew: Merge edk2-stable202502 from the vendor branch and make it build for the important platforms, bugref:4643

  • Property svn:eol-style set to native
File size: 1.8 KB
Line 
1/** @file
2IA-32 processor specific functions to enable SMM profile.
3
4Copyright (c) 2012 - 2024, Intel Corporation. All rights reserved.<BR>
5SPDX-License-Identifier: BSD-2-Clause-Patent
6
7**/
8
9#include "PiSmmCpuCommon.h"
10#include "SmmProfileInternal.h"
11
12/**
13 Create SMM page table for S3 path.
14
15 @param[out] Cr3 The base address of the page tables.
16
17**/
18VOID
19InitSmmS3Cr3 (
20 OUT UINTN *Cr3
21 )
22{
23 ASSERT (Cr3 != NULL);
24
25 *Cr3 = GenSmmPageTable (PagingPae, mPhysicalAddressBits);
26
27 return;
28}
29
30/**
31 Allocate pages for creating 4KB-page based on 2MB-page when page fault happens.
32 32-bit firmware does not need it.
33
34**/
35VOID
36InitPagesForPFHandler (
37 VOID
38 )
39{
40}
41
42/**
43 Update page table to map the memory correctly in order to make the instruction
44 which caused page fault execute successfully. And it also save the original page
45 table to be restored in single-step exception. 32-bit firmware does not need it.
46
47 @param PageTable PageTable Address.
48 @param PFAddress The memory address which caused page fault exception.
49 @param CpuIndex The index of the processor.
50 @param ErrorCode The Error code of exception.
51 @param IsValidPFAddress The flag indicates if SMM profile data need be added.
52
53**/
54VOID
55RestorePageTableAbove4G (
56 UINT64 *PageTable,
57 UINT64 PFAddress,
58 UINTN CpuIndex,
59 UINTN ErrorCode,
60 BOOLEAN *IsValidPFAddress
61 )
62{
63}
64
65/**
66 Clear TF in FLAGS.
67
68 @param SystemContext A pointer to the processor context when
69 the interrupt occurred on the processor.
70
71**/
72VOID
73ClearTrapFlag (
74 IN OUT EFI_SYSTEM_CONTEXT SystemContext
75 )
76{
77 SystemContext.SystemContextIa32->Eflags &= (UINTN) ~BIT8;
78}
79
80/**
81 Create new entry in page table for page fault address in SmmProfilePFHandler.
82
83**/
84VOID
85SmmProfileMapPFAddress (
86 VOID
87 )
88{
89 CpuDeadLoop ();
90}
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