Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46389 )
Change subject: soc/mediatek/mt8192: add spmfw loader ......................................................................
Patch Set 36:
(1 comment)
https://review.coreboot.org/c/coreboot/+/46389/35/src/soc/mediatek/mt8192/sp... File src/soc/mediatek/mt8192/spm.c:
https://review.coreboot.org/c/coreboot/+/46389/35/src/soc/mediatek/mt8192/sp... PS35, Line 453: if (read32(&mtk_spm->md32pcm_dma0_src) != ptr || : read32(&mtk_spm->md32pcm_dma0_dst) != pmem_start || : read32(&mtk_spm->md32pcm_dma0_wppt) != pmem_words || : read32(&mtk_spm->md32pcm_dma0_wpto) != dmem_start || : read32(&mtk_spm->md32pcm_dma0_count) != total_words || : read32(&mtk_spm->md32pcm_dma0_con) != MD32PCM_DMA0_CON_VAL) {
- Slave mode won't be used in Chromebook. I save it for completing the mode selection. […]
If compared to "checking consistency", I'd rather always kick IM to refetch our trusted data.
Otherwise, I can imaging an exploit like
-> boot into developer mode -> load a new malicious SPM firmware -> reboot to normal (secure mode) -> firmware sees SPM regs already in good shape and didn't reload -> running malicious SPM in normal mode