2 PCH Smm Library Services that implements both S/W SMI generation and detection.
4 Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
13 #include "CommonHeader.h"
17 Triggers a run time or boot time SMI.
19 This function triggers a software SMM interrupt and set the APMC status with an 8-bit Data.
21 @param Data The value to set the APMC status.
34 Triggers an SMI at boot time.
36 This function triggers a software SMM interrupt at boot time.
41 TriggerBootServiceSoftwareSmi (
50 Triggers an SMI at run time.
52 This function triggers a software SMM interrupt at run time.
57 TriggerRuntimeSoftwareSmi (
66 Gets the software SMI data.
68 This function tests if a software SMM interrupt happens. If a software SMI happens,
69 it retrieves the SMM data and returns it as a non-negative value; otherwise a negative
72 @return Data The data retrieved from SMM data port in case of a software SMI;
73 otherwise a negative value.
77 InternalGetSwSmiData (
87 Test if a boot time software SMI happened.
89 This function tests if a software SMM interrupt happened. If a software SMM interrupt happened and
90 it was triggered at boot time, it returns TRUE. Otherwise, it returns FALSE.
92 @retval TRUE A software SMI triggered at boot time happened.
93 @retval FLASE No software SMI happened or the software SMI was triggered at run time.
98 IsBootServiceSoftwareSmi (
108 Test if a run time software SMI happened.
110 This function tests if a software SMM interrupt happened. If a software SMM interrupt happened and
111 it was triggered at run time, it returns TRUE. Otherwise, it returns FALSE.
113 @retval TRUE A software SMI triggered at run time happened.
114 @retval FLASE No software SMI happened or the software SMI was triggered at boot time.
119 IsRuntimeSoftwareSmi (
130 Clear APM SMI Status Bit; Set the EOS bit.
145 PmBase
= PcdGet16 (PcdPchAcpiIoPortBaseAddress
);
148 // Clear the APM SMI Status Bit
150 IoWrite16 (PmBase
+ R_PCH_ACPI_SMI_STS
, B_PCH_ACPI_APM_STS
);
155 IoOr32 (PmBase
+ R_PCH_ACPI_SMI_EN
, B_PCH_ACPI_EOS
);