TianoCore EDK2 master
Loading...
Searching...
No Matches
SmiFeatures.c File Reference

Go to the source code of this file.

Data Structures

union  SCRATCH_BUFFER
 

Macros

#define ICH9_LPC_SMI_F_BROADCAST   BIT0
 
#define ICH9_LPC_SMI_F_CPU_HOTPLUG   BIT1
 
#define ICH9_LPC_SMI_F_CPU_HOT_UNPLUG   BIT2
 

Functions

BOOLEAN NegotiateSmiFeatures (VOID)
 
STATIC VOID EFIAPI AppendFwCfgBootScript (IN OUT VOID *Context OPTIONAL, IN OUT VOID *ExternalScratchBuffer)
 
VOID SaveSmiFeatures (VOID)
 

Variables

STATIC FIRMWARE_CONFIG_ITEM mRequestedFeaturesItem
 
STATIC FIRMWARE_CONFIG_ITEM mFeaturesOkItem
 
STATIC UINT64 mSmiFeatures
 

Detailed Description

Negotiate SMI features with QEMU, and configure UefiCpuPkg/PiSmmCpuDxeSmm accordingly.

Copyright (C) 2016-2017, Red Hat, Inc. Copyright (c) 2024, Intel Corporation. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file SmiFeatures.c.

Macro Definition Documentation

◆ ICH9_LPC_SMI_F_BROADCAST

#define ICH9_LPC_SMI_F_BROADCAST   BIT0

Definition at line 25 of file SmiFeatures.c.

◆ ICH9_LPC_SMI_F_CPU_HOT_UNPLUG

#define ICH9_LPC_SMI_F_CPU_HOT_UNPLUG   BIT2

Definition at line 37 of file SmiFeatures.c.

◆ ICH9_LPC_SMI_F_CPU_HOTPLUG

#define ICH9_LPC_SMI_F_CPU_HOTPLUG   BIT1

Definition at line 31 of file SmiFeatures.c.

Function Documentation

◆ AppendFwCfgBootScript()

STATIC VOID EFIAPI AppendFwCfgBootScript ( IN OUT VOID *Context  OPTIONAL,
IN OUT VOID *  ExternalScratchBuffer 
)

FW_CFG_BOOT_SCRIPT_CALLBACK_FUNCTION provided to QemuFwCfgS3Lib.

Definition at line 246 of file SmiFeatures.c.

◆ NegotiateSmiFeatures()

BOOLEAN NegotiateSmiFeatures ( VOID  )

Negotiate SMI features with QEMU.

Return values
FALSEIf SMI feature negotiation is not supported by QEMU. This is not an error, it just means that SaveSmiFeatures() should not be called.
TRUESMI feature negotiation is supported, and it has completed successfully as well. (Failure to negotiate is a fatal error and the function never returns in that case.)

Definition at line 76 of file SmiFeatures.c.

◆ SaveSmiFeatures()

VOID SaveSmiFeatures ( VOID  )

Append a boot script fragment that will re-select the previously negotiated SMI features during S3 resume.

Definition at line 311 of file SmiFeatures.c.

Variable Documentation

◆ mFeaturesOkItem

STATIC FIRMWARE_CONFIG_ITEM mFeaturesOkItem

Definition at line 56 of file SmiFeatures.c.

◆ mRequestedFeaturesItem

STATIC FIRMWARE_CONFIG_ITEM mRequestedFeaturesItem

Definition at line 55 of file SmiFeatures.c.

◆ mSmiFeatures

STATIC UINT64 mSmiFeatures

Definition at line 62 of file SmiFeatures.c.