diff options
author | Subrata Banik <subratabanik@google.com> | 2022-12-11 15:01:41 +0530 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-12-19 14:12:59 +0000 |
commit | b9d53a0c8c5a1285285856e61b486f5e8ea7df07 (patch) | |
tree | 437153ad56dfd9aefb114cac728af9c6c3486ca3 /src | |
parent | 836881935fe8c3679f11008553f562b9f620f94e (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/drivers/intel/fsp2_0/ppi/mp_service2_noop.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/drivers/intel/fsp2_0/ppi/mp_service2_noop.c b/src/drivers/intel/fsp2_0/ppi/mp_service2_noop.c index 4570bd917c..8e437a96ca 100644 --- a/src/drivers/intel/fsp2_0/ppi/mp_service2_noop.c +++ b/src/drivers/intel/fsp2_0/ppi/mp_service2_noop.c @@ -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( |