drivers/intel/fsp2_0: Implement `mps2_noop_get_number_of_processors()`

This patch implements mps2_noop_get_number_of_processors() API with
minimal information required for Intel MTL FSP to utilise the
`MP_SERVICES_PPI_V2_NOOP` config.

The major difference between Intel ADL and MTL FSP in terms of doing
CPU feature programming aka utilizing MP PPI wrapper code is that,
starting with MTL, FSP has dropped the `SkipMpInit` UPD.

It means now, coreboot doesn't have any way to skip FSP doing MP Init
operation. But during ADL, coreboot had introduced the
MP_SERVICES_PPI_V2_NOOP config that is used to skip FSP about
actually running any CPU feature programming on APs.

The idea is to use the same config even in MTL to provide only the
must have information (to bypass any assert in FSP during debug image)
to FSP.

Passing `FSP_UNSUPPORTED` from mps2_noop_get_number_of_processors()
results in `assert` while compiling FSP in debug mode hence,
implementing the function to pass only the information about BSP being
the active processor along with passing `FSP_SUCCESS` (eventually it
makes FSP happy and doesn't run into any issue in debug and/or release
mode).

TEST=Able to build and boot Google/Rex and Google/Kano while
coreboot skip calling into FSP for doing MP init.

Change-Id: I75d7e151699782210e86be564b0055d572cacc3f
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70555
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
This commit is contained in:
Subrata Banik 2022-12-11 15:01:41 +05:30 committed by Felix Held
parent 836881935f
commit b9d53a0c8c
1 changed files with 6 additions and 3 deletions

View File

@ -8,10 +8,13 @@ typedef EDKII_PEI_MP_SERVICES2_PPI efi_pei_mp_services_ppi;
static efi_return_status_t mps2_noop_get_number_of_processors(
efi_pei_mp_services_ppi *ignored1,
efi_uintn_t *ignored2,
efi_uintn_t *ignored3)
efi_uintn_t *number_of_processors,
efi_uintn_t *number_of_enabled_processors)
{
return mp_api_unsupported();
*number_of_processors = 1; /* BSP alone */
*number_of_enabled_processors = 1; /* BSP alone */
return FSP_SUCCESS;
}
static efi_return_status_t mps2_noop_get_processor_info(