Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35164 )
Change subject: mediatek/mt8183: Use calibration result do fast calibration ......................................................................
Patch Set 12:
(1 comment)
https://review.coreboot.org/c/coreboot/+/35164/12/src/soc/mediatek/mt8183/in... File src/soc/mediatek/mt8183/include/soc/emi.h:
https://review.coreboot.org/c/coreboot/+/35164/12/src/soc/mediatek/mt8183/in... PS12, Line 26: sdram_params I think a better style is to isolate the part of serialization, for example
struct sdram_params_header { u32 magic; u16 version; u16 size; /* assume the params won't exceed 64k */ u32 checksum; /* checksum of the param parts, can be optional if we don't really care */ }
struct sdram_param { u16 frequency; /* in fact I'm not sure if this should better be in header of param itself */ u8 wr_level... }
When reading from signed CBFS, there's no need to have the header, just read and use.
When reading from cache, we should read header first, make sure the magic, version and size looks good, and read bytes specified by size, and then verify it (checksum).
In this way we can enforce a re-training when we have to update the DRAM calibration cached values.