Roger Lu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46389 )
Change subject: mediatek/mt8192: add spmfw loader ......................................................................
Patch Set 16:
(3 comments)
https://review.coreboot.org/c/coreboot/+/46389/15/src/soc/mediatek/mt8192/sp... File src/soc/mediatek/mt8192/spm.c:
https://review.coreboot.org/c/coreboot/+/46389/15/src/soc/mediatek/mt8192/sp... PS15, Line 926: 0x40000000
Where does this offset come from?
It's for SPM DMA's need. SPM DMA will deduct 0x40000000 after it receives spmfw address provided by software.
https://review.coreboot.org/c/coreboot/+/46389/15/src/soc/mediatek/mt8192/sp... PS15, Line 947: write32(&mtk_spm->pcm_con1, read32(&mtk_spm->pcm_con1) | : SPM_REGWR_CFG_KEY | RG_IM_SLAVE_LSB);
2 => So when SPM DMA is used, how is spmfw configured to use spm sram? […]
2=> Oh, it is hardware detail design. Need to consult with SPM designer.
https://review.coreboot.org/c/coreboot/+/46389/15/src/soc/mediatek/mt8192/sp... PS15, Line 1052: /* Kick PCM to run (only toggle PCM_KICK) */
This is the exact same code as what is in `spm_kick_im_to_fetch`, intended?
Yes, intended.