Note: groups.io will be down for maintenance on Wednesday, October 5th, starting at 9AM Pacific Time (4PM Wednesday October 5, 2022 UTC), for approximately one hour.
+ CopyMem (ProcessorInfoBuffer, &gTdxProcessorInformation, sizeof (EFI_PROCESSOR_INFORMATION));
You may not directly copy the whole structure to ProcessorInfoBuffer.
Because per the structure definition(below), ExtendedInformation is only filled when
CPU_V2_EXTENDED_TOPOLOGY is set in ProcessorNumber.
This behavior is to be backward compatible with old caller that passes old structure (without ExtendedInformation)
and support new caller that passes new structure requiring ExtendedInformation.
So, the correct behavior is to only fill ExtendedInformation when CPU_V2_EXTENDED_TOPOLOGY is set in ProcessorNumber.
The CPU_V2_EXTENDED_TOPOLOGY is a flag to tell callee that caller provides a big enough buffer for ExtendedInformation.
/// The physical location of the processor, including the physical package number
/// that identifies the cartridge, the physical core number within package, and
/// logical thread number within core.
/// The extended information of the processor. This field is filled only when
/// CPU_V2_EXTENDED_TOPOLOGY is set in parameter ProcessorNumber.