Attention is currently required from: Jason Glenesk, Jakub Czapiga, Marshall Dawson, Tim Wawrzynczak, Angel Pons, Rob Barnes, Patrick Rudolph, Felix Held. Subrata Banik has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/56628 )
Change subject: arch/x86: Refactor the SMBIOS type 17 write function ......................................................................
Patch Set 17:
(4 comments)
File tests/lib/dimm_info_util-test.c:
https://review.coreboot.org/c/coreboot/+/56628/comment/5117eda6_720ee3c4 PS16, Line 66: undefine
Was it intended to be "undefined"?
renamed to test_smbios_undefine_form_factor_to_spd_mod_ddr as this type conversion is required for DDR memory types (i.e. DDR2/3/4/5)
https://review.coreboot.org/c/coreboot/+/56628/comment/ce863456_077a07b7 PS16, Line 153: const LargestIntegralType udimm_allowed[] = { : DDR5_SPD_UDIMM, DDR5_SPD_MINI_UDIMM, : }; : assert_in_set(smbios_form_factor_to_spd_mod_type(memory_type, : MEMORY_FORMFACTOR_DIMM), udimm_allowed, ARRAY_SIZE(udimm_allowed)); : : const LargestIntegralType rdimm_allowed[] = { DDR5_SPD_RDIMM, DDR5_SPD_MINI_RDIMM }; : assert_in_set(smbios_form_factor_to_spd_mod_type(memory_type, : MEMORY_FORMFACTOR_RIMM), rdimm_allowed, ARRAY_SIZE(rdimm_allowed)); : : assert_int_equal(DDR5_SPD_SODIMM, : smbios_form_factor_to_spd_mod_type(memory_type, : MEMORY_FORMFACTOR_SODIMM));
This repeats many times. You can create one test function, for example: […]
Ack
Thanks for suggestion
https://review.coreboot.org/c/coreboot/+/56628/comment/ad336330_61194347 PS16, Line 167: test_smbios_undefine_form_factor_to_spd_mod_type(memory_type);
I think, it would be better to call this test separately, e.g. […]
I had the same opinion but test_smbios_undefine_form_factor_to_spd_mod_type type conversion supposed to be different between DDR and LPDDR hence unable to move this call to test_smbios_form_factor_to_spd_mod_type and need to repeat inside specific DIMM type call.
https://review.coreboot.org/c/coreboot/+/56628/comment/7e9e871d_cb78fe0c PS16, Line 194: if (info[i].func)
There is no point in having this if-statement here. All entries from info[] should have . […]
Ack