VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.h@ 77662

Last change on this file since 77662 was 77662, checked in by vboxsync, 6 years ago

EFI: First step in UDK2018 merge. Does not build yet.

  • Property svn:eol-style set to native
File size: 2.1 KB
Line 
1/** @file
2SMM profile header file.
3
4Copyright (c) 2012 - 2016, Intel Corporation. All rights reserved.<BR>
5This program and the accompanying materials
6are licensed and made available under the terms and conditions of the BSD License
7which accompanies this distribution. The full text of the license may be found at
8http://opensource.org/licenses/bsd-license.php
9
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13**/
14
15#ifndef _SMM_PROFILE_H_
16#define _SMM_PROFILE_H_
17
18#include "SmmProfileInternal.h"
19
20//
21// External functions
22//
23
24/**
25 Initialize processor environment for SMM profile.
26
27 @param CpuIndex The index of the processor.
28
29**/
30VOID
31ActivateSmmProfile (
32 IN UINTN CpuIndex
33 );
34
35/**
36 Initialize SMM profile in SMM CPU entry point.
37
38 @param[in] Cr3 The base address of the page tables to use in SMM.
39
40**/
41VOID
42InitSmmProfile (
43 UINT32 Cr3
44 );
45
46/**
47 Increase SMI number in each SMI entry.
48
49**/
50VOID
51SmmProfileRecordSmiNum (
52 VOID
53 );
54
55/**
56 The Page fault handler to save SMM profile data.
57
58 @param Rip The RIP when exception happens.
59 @param ErrorCode The Error code of exception.
60
61**/
62VOID
63SmmProfilePFHandler (
64 UINTN Rip,
65 UINTN ErrorCode
66 );
67
68/**
69 Updates page table to make some memory ranges (like system memory) absent
70 and make some memory ranges (like MMIO) present and execute disable. It also
71 update 2MB-page to 4KB-page for some memory ranges.
72
73**/
74VOID
75SmmProfileStart (
76 VOID
77 );
78
79/**
80 Page fault IDT handler for SMM Profile.
81
82**/
83VOID
84EFIAPI
85PageFaultIdtHandlerSmmProfile (
86 VOID
87 );
88
89
90/**
91 Check if XD feature is supported by a processor.
92
93**/
94VOID
95CheckFeatureSupported (
96 VOID
97 );
98
99/**
100 Update page table according to protected memory ranges and the 4KB-page mapped memory ranges.
101
102**/
103VOID
104InitPaging (
105 VOID
106 );
107
108/**
109 Get CPU Index from APIC ID.
110
111**/
112UINTN
113GetCpuIndex (
114 VOID
115 );
116
117//
118// The flag indicates if execute-disable is supported by processor.
119//
120extern BOOLEAN mXdSupported;
121//
122// The flag indicates if execute-disable is enabled on processor.
123//
124extern BOOLEAN mXdEnabled;
125
126#endif // _SMM_PROFILE_H_
Note: See TracBrowser for help on using the repository browser.

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