mb/google/fatcat: Allow board-specific FSP-M UPD override

This commit introduces a mechanism to allow mainboards to override
the default FSP-M UPDs for Panther Lake.

- Adds `variant_update_soc_memory_init_params` as a weak function
  in `variants.h` and `romstage.c` for board-specific implementations.
- In `romstage.c`, `mainboard_memory_init_params` now calls
  `variant_update_soc_memory_init_params` to apply board-specific
  overrides to the FSP-M UPDs.

This enables finer-grained control over memory initialization parameters
at the variant level.

BUG=b:328770565
TEST=Able to build and boot google/fatcat.

Change-Id: I403bc4270ef526363defa6cd7d22741ad42a8a76
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87089
Reviewed-by: Sowmya Aralguppe <sowmya.aralguppe@intel.com>
Reviewed-by: Jayvik Desai <jayvik@google.com>
Reviewed-by: Pranava Y N <pranavayn@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Subrata Banik 2025-04-02 10:00:15 +05:30
commit e9b020f02e
2 changed files with 11 additions and 0 deletions

View file

@ -3,6 +3,7 @@
#include <baseboard/variants.h>
#include <fsp/api.h>
#include <soc/romstage.h>
#include <soc/soc_chip.h>
#include <string.h>
/*
@ -16,6 +17,11 @@ __weak void fw_config_configure_pre_mem_gpio(void)
/* Nothing to do */
}
__weak void variant_update_soc_memory_init_params(FSPM_UPD *memupd)
{
/* Nothing to do */
}
void mainboard_memory_init_params(FSPM_UPD *memupd)
{
const struct pad_config *pads;
@ -33,4 +39,7 @@ void mainboard_memory_init_params(FSPM_UPD *memupd)
variant_get_spd_info(&spd_info);
memcfg_init(memupd, mem_config, &spd_info, half_populated);
/* Override FSP-M UPD per board if required. */
variant_update_soc_memory_init_params(memupd);
}

View file

@ -4,6 +4,7 @@
#define __BASEBOARD_VARIANTS_H__
#include <chip.h>
#include <fsp/api.h>
#include <soc/gpio.h>
#include <soc/meminit.h>
#include <stdint.h>
@ -23,6 +24,7 @@ const struct mb_cfg *variant_memory_params(void);
void variant_get_spd_info(struct mem_spd *spd_info);
int variant_memory_sku(void);
bool variant_is_half_populated(void);
void variant_update_soc_memory_init_params(FSPM_UPD *memupd);
void variant_update_soc_chip_config(struct soc_intel_pantherlake_config *config);
enum s0ix_entry {