mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
DynamicTablesPkg/Smbios: Use EFIAPI for extended callbacks
The SMBIOS_TABLE_GENERATOR_BUILD_TABLEEX and SMBIOS_TABLE_GENERATOR_FREE_TABLEEX callback types do not specify EFIAPI. The Type 37 implementations specify it, while the other extended callback implementations follow the omission in the shared types. For X64 GCC builds, BaseTools/Conf/tools_def.template adds -DEFIAPI=__attribute__((ms_abi)). Therefore, callbacks marked with EFIAPI use the Microsoft x64 ABI, while unannotated callback types use the compiler default ABI. If the two sides differ, the caller and callee use different argument registers, and GCC rejects the function pointer assignment. This mismatch remained hidden while the standalone Type 37 generator was built only for AARCH64. Moving the SMBIOS generators to the common component section adds X64 build coverage and exposes it. Add EFIAPI to the extended callback types and all matching implementations. This follows the ACPI generator callback convention and provides the ABI prerequisite for expanding the SMBIOS standalone build coverage. Signed-off-by: Dongyan Qian <qiandongyan@loongson.cn>
This commit is contained in:
parent
1dc6b5e3dd
commit
9e83101fdf
12 changed files with 24 additions and 2 deletions
|
|
@ -211,7 +211,7 @@ typedef EFI_STATUS (*SMBIOS_TABLE_GENERATOR_FREE_TABLE) (
|
|||
@return EFI_SUCCESS If the table is generated successfully or other
|
||||
failure codes as returned by the generator.
|
||||
**/
|
||||
typedef EFI_STATUS (*SMBIOS_TABLE_GENERATOR_BUILD_TABLEEX) (
|
||||
typedef EFI_STATUS (EFIAPI *SMBIOS_TABLE_GENERATOR_BUILD_TABLEEX)(
|
||||
IN CONST SMBIOS_TABLE_GENERATOR *Generator,
|
||||
IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL *CONST TableFactoryProtocol,
|
||||
IN CM_STD_OBJ_SMBIOS_TABLE_INFO *CONST SmbiosTableInfo,
|
||||
|
|
@ -239,7 +239,7 @@ typedef EFI_STATUS (*SMBIOS_TABLE_GENERATOR_BUILD_TABLEEX) (
|
|||
@return EFI_SUCCESS If freed successfully or other failure codes
|
||||
as returned by the generator.
|
||||
**/
|
||||
typedef EFI_STATUS (*SMBIOS_TABLE_GENERATOR_FREE_TABLEEX) (
|
||||
typedef EFI_STATUS (EFIAPI *SMBIOS_TABLE_GENERATOR_FREE_TABLEEX)(
|
||||
IN CONST SMBIOS_TABLE_GENERATOR *Generator,
|
||||
IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL *CONST TableFactoryProtocol,
|
||||
IN CONST CM_STD_OBJ_SMBIOS_TABLE_INFO *CONST SmbiosTableInfo,
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ GET_OBJECT_LIST (
|
|||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
FreeSmbiosType16TableEx (
|
||||
IN CONST SMBIOS_TABLE_GENERATOR *CONST This,
|
||||
IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL *CONST TableFactoryProtocol,
|
||||
|
|
@ -161,6 +162,7 @@ AddMemErrDeviceHandle (
|
|||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
BuildSmbiosType16TableEx (
|
||||
IN CONST SMBIOS_TABLE_GENERATOR *This,
|
||||
IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL *CONST TableFactoryProtocol,
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ GET_OBJECT_LIST (
|
|||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
FreeSmbiosType17TableEx (
|
||||
IN CONST SMBIOS_TABLE_GENERATOR *CONST This,
|
||||
IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL *CONST TableFactoryProtocol,
|
||||
|
|
@ -250,6 +251,7 @@ UpdateSmbiosType17Rank (
|
|||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
BuildSmbiosType17TableEx (
|
||||
IN CONST SMBIOS_TABLE_GENERATOR *This,
|
||||
IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL *CONST TableFactoryProtocol,
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ GET_OBJECT_LIST (
|
|||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
FreeSmbiosType19TableEx (
|
||||
IN CONST SMBIOS_TABLE_GENERATOR *CONST This,
|
||||
IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL *CONST TableFactoryProtocol,
|
||||
|
|
@ -177,6 +178,7 @@ UpdateSmbiosType19Address (
|
|||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
BuildSmbiosType19TableEx (
|
||||
IN CONST SMBIOS_TABLE_GENERATOR *This,
|
||||
IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL *CONST TableFactoryProtocol,
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ GET_OBJECT_LIST (
|
|||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
FreeSmbiosType20TableEx (
|
||||
IN CONST SMBIOS_TABLE_GENERATOR *CONST This,
|
||||
IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL *CONST TableFactoryProtocol,
|
||||
|
|
@ -112,6 +113,7 @@ FreeSmbiosType20TableEx (
|
|||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
BuildSmbiosType20TableEx (
|
||||
IN CONST SMBIOS_TABLE_GENERATOR *This,
|
||||
IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL *CONST TableFactoryProtocol,
|
||||
|
|
|
|||
|
|
@ -111,6 +111,7 @@ IsValidVoltageProbeLocation (
|
|||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
FreeSmbiosType26TableEx (
|
||||
IN CONST SMBIOS_TABLE_GENERATOR *CONST This,
|
||||
IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL *CONST TableFactoryProtocol,
|
||||
|
|
@ -168,6 +169,7 @@ FreeSmbiosType26TableEx (
|
|||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
BuildSmbiosType26TableEx (
|
||||
IN CONST SMBIOS_TABLE_GENERATOR *This,
|
||||
IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL *CONST TableFactoryProtocol,
|
||||
|
|
|
|||
|
|
@ -159,6 +159,7 @@ AddTemperatureProbeHandle (
|
|||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
FreeSmbiosType27TableEx (
|
||||
IN CONST SMBIOS_TABLE_GENERATOR *CONST This,
|
||||
IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL *CONST TableFactoryProtocol,
|
||||
|
|
@ -216,6 +217,7 @@ FreeSmbiosType27TableEx (
|
|||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
BuildSmbiosType27TableEx (
|
||||
IN CONST SMBIOS_TABLE_GENERATOR *This,
|
||||
IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL *CONST TableFactoryProtocol,
|
||||
|
|
|
|||
|
|
@ -111,6 +111,7 @@ IsValidTemperatureProbeLocation (
|
|||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
FreeSmbiosType28TableEx (
|
||||
IN CONST SMBIOS_TABLE_GENERATOR *CONST This,
|
||||
IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL *CONST TableFactoryProtocol,
|
||||
|
|
@ -168,6 +169,7 @@ FreeSmbiosType28TableEx (
|
|||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
BuildSmbiosType28TableEx (
|
||||
IN CONST SMBIOS_TABLE_GENERATOR *This,
|
||||
IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL *CONST TableFactoryProtocol,
|
||||
|
|
|
|||
|
|
@ -111,6 +111,7 @@ IsValidElectricalCurrentProbeLocation (
|
|||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
FreeSmbiosType29TableEx (
|
||||
IN CONST SMBIOS_TABLE_GENERATOR *CONST This,
|
||||
IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL *CONST TableFactoryProtocol,
|
||||
|
|
@ -168,6 +169,7 @@ FreeSmbiosType29TableEx (
|
|||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
BuildSmbiosType29TableEx (
|
||||
IN CONST SMBIOS_TABLE_GENERATOR *This,
|
||||
IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL *CONST TableFactoryProtocol,
|
||||
|
|
|
|||
|
|
@ -757,6 +757,7 @@ STATIC PROCESSOR_SPECIFIC_BLOCK_OPS mProcSpecificBlockOps[] = {
|
|||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
FreeSmbiosType44TableEx (
|
||||
IN CONST SMBIOS_TABLE_GENERATOR *CONST This,
|
||||
IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL *CONST TableFactoryProtocol,
|
||||
|
|
@ -810,6 +811,7 @@ FreeSmbiosType44TableEx (
|
|||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
BuildSmbiosType44TableEx (
|
||||
IN CONST SMBIOS_TABLE_GENERATOR *This,
|
||||
IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL *CONST TableFactoryProtocol,
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ GET_OBJECT_LIST (
|
|||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
FreeSmbiosType4TableEx (
|
||||
IN CONST SMBIOS_TABLE_GENERATOR *CONST This,
|
||||
IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL *CONST TableFactoryProtocol,
|
||||
|
|
@ -157,6 +158,7 @@ FindProcHierarchyInfoFromToken (
|
|||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
BuildSmbiosType4TableEx (
|
||||
IN CONST SMBIOS_TABLE_GENERATOR *This,
|
||||
IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL *CONST TableFactoryProtocol,
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ GET_OBJECT_LIST (
|
|||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
FreeSmbiosType7TableEx (
|
||||
IN CONST SMBIOS_TABLE_GENERATOR *CONST This,
|
||||
IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL *CONST TableFactoryProtocol,
|
||||
|
|
@ -411,6 +412,7 @@ FindExistingCacheRecord (
|
|||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
BuildSmbiosType7TableEx (
|
||||
IN CONST SMBIOS_TABLE_GENERATOR *This,
|
||||
IN CONST EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL *CONST TableFactoryProtocol,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue