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

Go to the source code of this file.

Macros

#define SPMI_GENERATOR_REVISION   CREATE_REVISION (1, 0)
 

Functions

 GET_OBJECT_LIST (EObjNameSpaceArchCommon, EArchCommonObjSpmiInterfaceInfo, CM_ARCH_COMMON_SPMI_INTERFACE_INFO)
 
 GET_OBJECT_LIST (EObjNameSpaceArchCommon, EArchCommonObjSpmiInterruptDeviceInfo, CM_ARCH_COMMON_SPMI_INTERRUPT_DEVICE_INFO)
 
STATIC EFI_STATUS EFIAPI BuildSpmiTable (IN CONST ACPI_TABLE_GENERATOR *CONST This, IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, OUT EFI_ACPI_DESCRIPTION_HEADER **CONST Table)
 
EFI_STATUS EFIAPI AcpiSpmiLibConstructor (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
EFI_STATUS EFIAPI AcpiSpmiLibDestructor (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 

Variables

STATIC EFI_ACPI_SERVICE_PROCESSOR_MANAGEMENT_INTERFACE_TABLE AcpiSpmi
 
STATIC CONST ACPI_TABLE_GENERATOR SpmiGenerator
 

Detailed Description

SPMI Table Generator

Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent

Reference(s):
  • IPMI - Revision 2.0, April 21, 2015.

Definition in file SpmiGenerator.c.

Macro Definition Documentation

◆ SPMI_GENERATOR_REVISION

#define SPMI_GENERATOR_REVISION   CREATE_REVISION (1, 0)

This macro defines the SPMI Table Generator revision.

Definition at line 311 of file SpmiGenerator.c.

Function Documentation

◆ AcpiSpmiLibConstructor()

EFI_STATUS EFIAPI AcpiSpmiLibConstructor ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Register the Generator with the ACPI Table Factory.

Parameters
[in]ImageHandleThe handle to the image.
[in]SystemTablePointer to the System Table.
Return values
EFI_SUCCESSThe Generator is registered.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_ALREADY_STARTEDThe Generator for the Table ID is already registered.

Definition at line 355 of file SpmiGenerator.c.

◆ AcpiSpmiLibDestructor()

EFI_STATUS EFIAPI AcpiSpmiLibDestructor ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Deregister the Generator from the ACPI Table Factory.

Parameters
[in]ImageHandleThe handle to the image.
[in]SystemTablePointer to the System Table.
Return values
EFI_SUCCESSThe Generator is deregistered.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_NOT_FOUNDThe Generator is not registered.

Definition at line 379 of file SpmiGenerator.c.

◆ BuildSpmiTable()

Construct the SPMI ACPI table.

This function invokes the Configuration Manager protocol interface to get the required hardware information for generating the ACPI table.

If this function allocates any resources then they must be freed in the FreeXXXXTableResources function.

Parameters
[in]ThisPointer to the table generator.
[in]AcpiTableInfoPointer to the ACPI Table Info.
[in]CfgMgrProtocolPointer to the Configuration Manager Protocol Interface.
[out]TablePointer to the constructed ACPI Table.
Return values
EFI_SUCCESSTable generated successfully.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_NOT_FOUNDThe required object was not found.
EFI_BAD_BUFFER_SIZEThe size returned by the Configuration Manager is less than the Object size for the requested object.

Validate interface type.

If the interface type is SSIF, the Address Space ID should be SMBUS.

For non-ssif interface types, the Address Space ID should be System Memory or System I/O.

Validate Interrupt Type, bit[7:2] should be zero.

Interrupt Type bit[0] should be zero for SSIF interface type.

PCI device flag bit0 should be zero for SSIF interface type.

Validate SCI GPE bit if GPE number is provided.

If GlobalSystemInterrupt is provided, the interrupt type should be GSI.

Update IPMI specification version

Definition at line 113 of file SpmiGenerator.c.

◆ GET_OBJECT_LIST() [1/2]

Standard SPMI Generator

Requirements: The following Configuration Manager Object(s) are required by this Generator:

  • EArchCommonObjSpmiInterfaceInfo
  • EArchCommonObjSpmiInterruptDeviceInfo (OPTIONAL) Retrieve the SPMI interface information.

◆ GET_OBJECT_LIST() [2/2]

Retrieve the SPMI interrupt and device information.

Variable Documentation

◆ AcpiSpmi

◆ SpmiGenerator

Initial value:
= {
L"ACPI.STD.SPMI.GENERATOR",
}
#define EFI_ACPI_6_5_SERVER_PLATFORM_MANAGEMENT_INTERFACE_TABLE_SIGNATURE
Definition: Acpi65.h:3292
#define CREATE_STD_ACPI_TABLE_GEN_ID(TableId)
#define TABLE_GENERATOR_CREATOR_ID
@ EStdAcpiTableIdSpmi
SPMI Generator.
#define NULL
Definition: Base.h:319
#define EFI_ACPI_SERVICE_PROCESSOR_MANAGEMENT_INTERFACE_5_TABLE_REVISION
#define SPMI_GENERATOR_REVISION
STATIC EFI_STATUS EFIAPI BuildSpmiTable(IN CONST ACPI_TABLE_GENERATOR *CONST This, IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, OUT EFI_ACPI_DESCRIPTION_HEADER **CONST Table)

The interface for the SPMI Table Generator.

Definition at line 317 of file SpmiGenerator.c.