Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bit-flips on SPI-NAND flash connected via SNFI result in abort and fatal error #10

Open
dangowrt opened this issue Aug 8, 2024 · 1 comment · May be fixed by #11
Open

bit-flips on SPI-NAND flash connected via SNFI result in abort and fatal error #10

dangowrt opened this issue Aug 8, 2024 · 1 comment · May be fixed by #11

Comments

@dangowrt
Copy link

dangowrt commented Aug 8, 2024

Tests of users suggest that correctable bit-flips in SPI-NAND connected via SNFI on MT7622 do not get corrected when reading FIP in BL2. This hints that the BCH/ECC engine is not setup correctly by the driver in ARM TrustedFirmware-A while the exact same drivers works fine in U-Boot.

Maybe mtk_ecc_setup() is broken or not acting correctly, also because
https://github.com/mtk-openwrt/arm-trusted-firmware/blob/mtksoc/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-ecc.c#L166
is dead code (i is unsigned and hence can never be < 0).

@dangowrt
Copy link
Author

dangowrt commented Aug 8, 2024

@hackpascal @onlyfly34 It has been confirmed that this is a regression introduced somewhere between TF-A v2.4 and v2.9. The dirver in TF-A v2.4 does correct all bitflips, while in TF-A v2.9 is doesn't.

dangowrt added a commit to dangowrt/arm-trusted-firmware that referenced this issue Aug 11, 2024
Return 0 on succesful read, which may contain correctable bitflips.

Fixes: mtk-openwrt#10
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
@dangowrt dangowrt linked a pull request Aug 11, 2024 that will close this issue
@dangowrt dangowrt changed the title BCH not correcting bit-flips on SPI-NAND flash connected via SNFI bit-flips on SPI-NAND flash connected via SNFI result in abort and fatal error Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant