Hello,
While reading some code on source.codeaurora.org, I stumbled upon a bug in directory plat/imx/imx8m in ARM Trusted Firmware. This looks simple enough to fix and I wanted to open a Pull Request on https://github.com/ARM-software/arm-trusted-firmware but the relevant code is not there. How should I contribute code to this project?
The bug I wanted to fix is the following. In https://source.codeaurora.org/external/imx/imx-atf/tree/plat/imx/imx8m/include/imx8m_csu.h?h=android... several macros are defined to configure the CSU:
#define CSU_HPx(i, val, lk) \
{CSU_HP, .idx = (i), .hp = (val), .lock =(lk), }
#define CSU_SA(i, val, lk) \
{CSU_SA, .idx = (i), .sa = (val), .lock = (lk), }
#define CSU_HPCTRL(i, val, lk) \
{CSU_HPCONTROL, .idx = (i), .hpctrl = (val), .lock = (lk), }
These macros fill bits of structure imx_csu_cfg, which is parsed in function imx_csu_init in https://source.codeaurora.org/external/imx/imx-atf/tree/plat/imx/imx8m/imx8m_csu.c?h=android-10.0.0_... :
switch (csu->type) {
/* ... */
case CSU_SA:
val = mmio_read_32(CSU_SA_REG(csu->idx));
if (val & CSU_SA_LOCK(csu->idx))
break;
mmio_clrsetbits_32(CSU_SA_REG(csu->idx), CSU_SA_CFG(0x1, csu->idx),
CSU_SA_CFG(csu->hp | (csu->lock << 0x1), csu->idx));
// ^^--- HERE
break;
case CSU_HPCONTROL:
val = mmio_read_32(CSU_HPCONTROL_REG(csu->idx));
if (val & CSU_HPCONTROL_LOCK(csu->idx))
break;
mmio_clrsetbits_32(CSU_HPCONTROL_REG(csu->idx), CSU_HPCONTROL_CFG(0x1, csu->idx),
CSU_HPCONTROL_CFG(csu->hp | (csu->lock << 0x1), csu->idx));
// ^^--- HERE
break;
default:
break;
}
Instead of using bits csu->sa for CSU_SA and csu->hpctrl for CSU_HPCONTROL, imx_csu_init re-used bit hp which is not defined in the macro definitions.
It would be very useful if https://source.codeaurora.org/external/imx/imx-atf/?h=android-10.0.0_2.6.0 indicates how to report such issues or send fixes.
Hello,
I reported this bug 3 weeks ago to https://www.codeaurora.org/report-a-bug and I have not received any feedback (neither an acknowledgment nor a "please post your bug there instead" reply). This is very frustrating, and the code is still buggy in android_11.0.0_1.2.0 branch (https://source.codeaurora.org/external/imx/imx-atf/tree/plat/imx/imx8m/imx8m_csu.c?h=android-11.0.0_...)
Could you please advice about a less-frustrating way to report bugs to NXP?
Regards
Hello,
I believe you can report it directly on the CodeAurora webpage, not the source one. There, you will find an option to report a bug. Here is the direct link: https://www.codeaurora.org/report-a-bug
Hope it helps!
BR,
Ivan.