Attention is currently required from: Hung-Te Lin, Yidi Lin, Yu-Ping Wu.
Arthur Heymans has posted comments on this change by Arthur Heymans. ( https://review.coreboot.org/c/coreboot/+/84208?usp=email )
Change subject: FIXME remove asserts for mt8186 code ......................................................................
Patch Set 4:
(1 comment)
File src/soc/mediatek/mt8186/mt6366.c:
https://review.coreboot.org/c/coreboot/+/84208/comment/22de2236_5cfa5e8d?usp... : PS3, Line 594: assert(vddq_uv <= 680000);
Actually, after looking into this, all the callers are passing valid values here. The minimum upper bound to successfully build GOOGLE_STEELIX with LTO is `assert(vddq_uv <= 1031250)`. It seems that the value 1031250 comes from the `mainboard_set_regulator_voltage(MTK_REGULATOR_VPROC12, 1031250)` call. However, that function call isn't related to the code here at all, because the regulator id is different (`VPROC12` vs `VDDQ`). Therefore, I think this is a false positive reported by the linker.
Yes sorry for this. It looks like the compiler is indeed the root cause of this. I vaguely suspect that the implementation of assert does not work well with LTO. Another possibility is that GCC LTO is simply not there yet. It looks like it has other issues as well.