Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36449 )
Change subject: mainboard/google: Allow Hatch variants to read SPD data over SMBus ......................................................................
Patch Set 6:
(1 comment)
https://review.coreboot.org/c/coreboot/+/36449/5/src/mainboard/google/hatch/... File src/mainboard/google/hatch/romstage_spd_smbus.c:
https://review.coreboot.org/c/coreboot/+/36449/5/src/mainboard/google/hatch/... PS5, Line 25: READ_SMBUS
I ended up going with FSP instead of a mix and match as it is a big awkward. […]
Wouldn't it be something like: void mainboard_memory_init_params(FSPM_UPD *memupd) { » struct cnl_mb_cfg memcfg; » struct spd_block blk = { 0x50, 0x52 };
» variant_memory_params(&memcfg);
» get_spd_smbus(&blk); » memcfg.spd[0].read_type = READ_SPD_MEMPTR; » memcfg.spd[0].spd_spec.spd_data_ptr_info.spd_data_len = blk.len; » memcfg.spd[0].spd_spec.spd_data_ptr_info.spd_data_ptr = blk.spd_array[0];
» memcfg.spd[1].read_type = NOT_EXISTING;
» memcfg.spd[2].read_type = READ_SPD_MEMPTR; » memcfg.spd[2].spd_spec.spd_data_ptr_info.spd_data_len = blk.len; » memcfg.spd[2].spd_spec.spd_data_ptr_info.spd_data_ptr = blk.spd_array[1];
» memcfg.spd[3].read_type = NOT_EXISTING; }