drivers/intel/fsp2_0/ppi/mp_service_ppi: Support CPU_V2_EXTENDED_TOPOLOGY
Complies with the Multi-Processor (MP) service as defined by the
EFI_MP_SERVICES_PROTOCOL.GetProcessorInfo() in the Platform
Initialization Specification 1.7. If bit 24 (CPU_V2_EXTENDED_TOPOLOGY)
is set in ProcessorId, GetProcessorInfo() must populate the
EFI_CPU_PHYSICAL_LOCATION2 data structure.
TEST=FSP using PI 1.7 GetProcessorInfo() is able to retrieve the
information instead of receiving an EFI_NOT_FOUND error.
Change-Id: If4d473901c8de02b3d6cef44f5481a1864f14d65
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89462
Reviewed-by: Zhixing Ma <zhixing.ma@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Bora Guvendik <bora.guvendik@intel.com>
This commit is contained in:
parent
16feb1bb28
commit
19feafc018
1 changed files with 21 additions and 0 deletions
|
|
@ -40,6 +40,14 @@ efi_return_status_t mp_get_number_of_processors(efi_uintn_t *number_of_processor
|
|||
efi_return_status_t mp_get_processor_info(efi_uintn_t processor_number,
|
||||
efi_processor_information *processor_info_buffer)
|
||||
{
|
||||
#if CONFIG_UDK_VERSION >= CONFIG_UDK_202005_VERSION
|
||||
bool location2_requested = false;
|
||||
if (processor_number & CPU_V2_EXTENDED_TOPOLOGY) {
|
||||
processor_number &= ~CPU_V2_EXTENDED_TOPOLOGY;
|
||||
location2_requested = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (processor_number >= MIN(get_cpu_count(), CONFIG_MAX_CPUS))
|
||||
return FSP_NOT_FOUND;
|
||||
|
||||
|
|
@ -64,6 +72,19 @@ efi_return_status_t mp_get_processor_info(efi_uintn_t processor_number,
|
|||
processor_info_buffer->Location.Core = dev->path.apic.core_id_within_package;
|
||||
processor_info_buffer->Location.Thread = dev->path.apic.thread_id;
|
||||
|
||||
#if CONFIG_UDK_VERSION >= CONFIG_UDK_202005_VERSION
|
||||
if (location2_requested) {
|
||||
EFI_CPU_PHYSICAL_LOCATION2 *location2 =
|
||||
&processor_info_buffer->ExtendedInformation.Location2;
|
||||
location2->Package = dev->path.apic.package_id;
|
||||
location2->Die = dev->path.apic.die_id;
|
||||
location2->Tile = dev->path.apic.tile_id;
|
||||
location2->Module = dev->path.apic.module_id;
|
||||
location2->Core = dev->path.apic.core_id_within_package;
|
||||
location2->Thread = dev->path.apic.thread_id;
|
||||
}
|
||||
#endif
|
||||
|
||||
return FSP_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue