Hi Pierre,

RegisterAcpiTableGenerator() never get called in Dbg2GeneratorGoogleTest.cpp

In addition, in order to get the generator by calling RegisterAcpiTableGenerator() -> then call the BuildAcpiTableEx() callback , we need to define Dbg2Generator as non-static, however, in current upstream code, Dbg2Generator is defined as STATIC, please see the code below.

*STATIC*
CONST
ACPI_TABLE_GENERATOR  Dbg2Generator = {
// Generator ID
CREATE_STD_ACPI_TABLE_GEN_ID (EStdAcpiTableIdDbg2),
// Generator Description
L"ACPI.STD.DBG2.GENERATOR",
// ACPI Table Signature
EFI_ACPI_6_3_DEBUG_PORT_2_TABLE_SIGNATURE,
// ACPI Table Revision supported by this Generator
EFI_ACPI_DBG2_DEBUG_DEVICE_INFORMATION_STRUCT_REVISION,
// Minimum supported ACPI Table Revision
EFI_ACPI_DBG2_DEBUG_DEVICE_INFORMATION_STRUCT_REVISION,
// Creator ID
TABLE_GENERATOR_CREATOR_ID,
// Creator Revision
DBG2_GENERATOR_REVISION,
// Build table function. Use the extended version instead.
NULL,
// Free table function. Use the extended version instead.
NULL,
// Extended Build table function.
BuildDbg2TableEx,
// Extended free function.
FreeDbg2TableEx
};

I doubt Dbg2GeneratorGoogleTest.cpp really tests the BuildAcpiTableEx() callback, please correct me if I am wrong.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#121257): https://edk2.groups.io/g/devel/message/121257
Mute This Topic: https://groups.io/mt/111930977/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-