Skip to content

Commit

Permalink
DynamicTablesPkg: Add EFIAPI to generators hooks
Browse files Browse the repository at this point in the history
For X64 builds, the EFIAPI is replaced by '(__attribute__((ms_abi))'.
This might lead to build error for some ACPI tablte generators
due to function prototype mismatch.

Add the EFIAPI to ACPI table generator hooks:
- ACPI_TABLE_GENERATOR_BUILD_TABLEEX
- ACPI_TABLE_GENERATOR_FREE_TABLEEX

Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
  • Loading branch information
pierregondois committed Jul 28, 2024
1 parent c06279b commit 9f0b7b8
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 4 deletions.
8 changes: 4 additions & 4 deletions DynamicTablesPkg/Include/AcpiTableGenerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ typedef struct AcpiTableGenerator ACPI_TABLE_GENERATOR;
@return EFI_SUCCESS If the table is generated successfully or other
failure codes as returned by the generator.
**/
typedef EFI_STATUS (*ACPI_TABLE_GENERATOR_BUILD_TABLE) (
typedef EFI_STATUS (EFIAPI *ACPI_TABLE_GENERATOR_BUILD_TABLE)(
IN CONST ACPI_TABLE_GENERATOR *This,
IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo,
IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol,
Expand All @@ -234,7 +234,7 @@ typedef EFI_STATUS (*ACPI_TABLE_GENERATOR_BUILD_TABLE) (
@return EFI_SUCCESS If freed successfully or other failure codes
as returned by the generator.
**/
typedef EFI_STATUS (*ACPI_TABLE_GENERATOR_FREE_TABLE) (
typedef EFI_STATUS (EFIAPI *ACPI_TABLE_GENERATOR_FREE_TABLE)(
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,
Expand All @@ -257,7 +257,7 @@ typedef EFI_STATUS (*ACPI_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 (*ACPI_TABLE_GENERATOR_BUILD_TABLEEX) (
typedef EFI_STATUS (EFIAPI *ACPI_TABLE_GENERATOR_BUILD_TABLEEX)(
IN CONST ACPI_TABLE_GENERATOR *This,
IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo,
IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol,
Expand All @@ -280,7 +280,7 @@ typedef EFI_STATUS (*ACPI_TABLE_GENERATOR_BUILD_TABLEEX) (
@return EFI_SUCCESS If freed successfully or other failure codes
as returned by the generator.
**/
typedef EFI_STATUS (*ACPI_TABLE_GENERATOR_FREE_TABLEEX) (
typedef EFI_STATUS (EFIAPI *ACPI_TABLE_GENERATOR_FREE_TABLEEX)(
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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ BuildMcfgTable (
**/
STATIC
EFI_STATUS
EFIAPI
FreeMcfgTableResources (
IN CONST ACPI_TABLE_GENERATOR *CONST This,
IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1075,6 +1075,7 @@ BuildPcctTable (
**/
STATIC
EFI_STATUS
EFIAPI
FreePcctTableResources (
IN CONST ACPI_TABLE_GENERATOR *CONST This,
IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1342,6 +1342,7 @@ BuildPpttTable (
**/
STATIC
EFI_STATUS
EFIAPI
FreePpttTableResources (
IN CONST ACPI_TABLE_GENERATOR *CONST This,
IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,7 @@ BuildSratTable (
**/
STATIC
EFI_STATUS
EFIAPI
FreeSratTableResources (
IN CONST ACPI_TABLE_GENERATOR *CONST This,
IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1313,6 +1313,7 @@ BuildSsdtCpuTopologyTable (
**/
STATIC
EFI_STATUS
EFIAPI
FreeSsdtCpuTopologyTableResources (
IN CONST ACPI_TABLE_GENERATOR *CONST This,
IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo,
Expand Down

0 comments on commit 9f0b7b8

Please sign in to comment.