Add a new library class of SmmLib
[mirror_edk2.git] / IntelFrameworkPkg / Include / Library / SmmLib.h
1 /** @file
2 SMM Library Services that abstracts both S/W SMI generation and detection.
3
4 Copyright (c) 2007, Intel Corporation
5 All rights reserved. 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
9
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.
12
13 **/
14
15 #ifndef __SMM_LIB_H__
16 #define __SMM_LIB_H__
17
18
19 /**
20 Triggers an SMI at boot time.
21
22 This function triggers a software SMM interrupt at boot time.
23
24 **/
25 VOID
26 EFIAPI
27 TriggerBootServiceSoftwareSmi (
28 VOID
29 );
30
31
32 /**
33 Triggers an SMI at run time.
34
35 This function triggers a software SMM interrupt at run time.
36
37 **/
38 VOID
39 EFIAPI
40 TriggerRuntimeSoftwareSmi (
41 VOID
42 );
43
44
45 /**
46 Test if a boot time software SMI happens.
47
48 This function tests if a software SMM interrupt happens. If a software SMM interrupt happens and
49 it is triggered at boot time, it returns TRUE. Otherwise, it returns FALSE.
50
51 @retval TRUE A software SMI triggered at boot time happens.
52 @retval FLASE No software SMI happens or the software SMI is triggered at run time.
53
54 **/
55 BOOLEAN
56 EFIAPI
57 IsBootServiceSoftwareSmi (
58 VOID
59 );
60
61
62 /**
63 Test if a run time software SMI happens.
64
65 This function tests if a software SMM interrupt happens. If a software SMM interrupt happens and
66 it is triggered at run time, it returns TRUE. Otherwise, it returns FALSE.
67
68 @retval TRUE A software SMI triggered at run time happens.
69 @retval FLASE No software SMI happens or the software SMI is triggered at boot time.
70
71 **/
72 BOOLEAN
73 EFIAPI
74 IsRuntimeSoftwareSmi (
75 VOID
76 );
77
78 #endif