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

ecc_correct is slower than it needs to be #1

Open
ohsix opened this issue Dec 2, 2019 · 2 comments
Open

ecc_correct is slower than it needs to be #1

ohsix opened this issue Dec 2, 2019 · 2 comments

Comments

@ohsix
Copy link

ohsix commented Dec 2, 2019

from init_bch:

  • This initialization can take some time, as lookup tables are built for fast
  • encoding/decoding; make sure not to call this function from a time critical
  • path. Usually, init_bch() should be called on module/driver init and
  • free_bch() should be called to release memory on exit.

ecc_correct is calling init_bch for every page

@virtualabs
Copy link
Collaborator

Seems you're right. I fixed the code in the last commit on master branch, could you give it a try ?

@ohsix
Copy link
Author

ohsix commented Dec 7, 2019

it's much faster but i can't actually tell if it is working properly, have a weird image

on the mx53 the fcb kobs generates doesn't have the ecc information in it https://github.com/NXPmicro/imx-kobs/blob/c50b0a001d506a8c39c206b26ec24e71fcf2afb6/src/mtd.c#L3489

it also disables the bbm remapping in the later version https://github.com/NXPmicro/imx-kobs/blob/c50b0a001d506a8c39c206b26ec24e71fcf2afb6/src/plat_boot_config.c#L75

i hacked some stuff together but the verification i'm doing doesn't think the result is usable (extracting the filesystem fails, for example)

could give more specifics via email

thanks!

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

No branches or pull requests

2 participants