diff options
author | Angel Pons <th3fanbus@gmail.com> | 2021-06-23 16:14:56 +0200 |
---|---|---|
committer | Angel Pons <th3fanbus@gmail.com> | 2022-08-14 10:53:47 +0000 |
commit | 4a8cb30222a34de760d38c7d13d54e24221d9fec (patch) | |
tree | 66036e3c07862166c9ae78acac453e4242c07d11 /src/soc/intel/broadwell/include | |
parent | ae626d30355b4744762d2c434e159ba9c3998783 (diff) |
soc/intel/broadwell: Consolidate SPD handling
Mainboards do not need to know about `pei_data` to tell northbridge code
where to find the SPD data. As done on Haswell, add the `mb_get_spd_map`
function and the `struct spd_info` type to retrieve SPD information from
mainboard code without having to use `pei_data` in said mainboard code.
Unlike Haswell MRC, Broadwell MRC uses all positions of the `spd_data`
array, not just the first. The placeholder SPD address for memory-down
seems to be different as well. Adapt the existing code to handle these
variations. Once complete, the abstraction layer for both MRC binaries
will have the same API.
Change-Id: I92a05003a319c354675368cae8e34980bd2f9e10
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55811
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Diffstat (limited to 'src/soc/intel/broadwell/include')
-rw-r--r-- | src/soc/intel/broadwell/include/soc/pei_wrapper.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/soc/intel/broadwell/include/soc/pei_wrapper.h b/src/soc/intel/broadwell/include/soc/pei_wrapper.h index bd12a2b08c..80222beccd 100644 --- a/src/soc/intel/broadwell/include/soc/pei_wrapper.h +++ b/src/soc/intel/broadwell/include/soc/pei_wrapper.h @@ -28,12 +28,17 @@ static inline void pei_data_usb3_port(struct pei_data *pei_data, int port, #define SPD_MEMORY_DOWN 0xff -#define SPD_LEN 256 +struct spd_info { + uint8_t addresses[4]; + unsigned int spd_index; +}; + +/* Mainboard callback to fill in the SPD addresses */ +void mb_get_spd_map(struct spd_info *spdi); void broadwell_fill_pei_data(struct pei_data *pei_data); void mainboard_fill_pei_data(struct pei_data *pei_data); -void mainboard_fill_spd_data(struct pei_data *pei_data); -void fill_spd_for_index(uint8_t spd[], unsigned int spd_index); +void copy_spd(struct pei_data *pei_data, struct spd_info *spdi); #endif |