-
Notifications
You must be signed in to change notification settings - Fork 1.4k
risc-v/litex: Remove CONFIG_BOARDCTL_RESET override for arty_a7:nsh config. #17493
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
risc-v/litex: Remove CONFIG_BOARDCTL_RESET override for arty_a7:nsh config. #17493
Conversation
…onfig. Fixes build failure as up_flush_dcache_all is not defined. Signed-off-by: Justin Erenkrantz <justin@erenkrantz.com>
|
@jerenkrantz I think you found a BUG in boards/boardctl.c since up_flush_dcache_all() is not implemented for all architectures. @XuNeo could you please take a look? Since you added it here: #13908 I don't know what is the proper solution, maybe up_flush_dcache_all() could be defined as weak and only called if it exist. @xiaoxiang781216 @anchao @raiden00pl please take a look |
but it's strange why the linker error happen if the board doesn't enable CONFIG_ARCH_DCACHE since the dummy macro is provided in this case: |
|
Looks like Lines 343 to 369 in d557b87
|
|
so, the best solution is implemented up_flush_dcache_all for riscv arch like others. @jerenkrantz @acassis . |
|
Ack - thanks for the pointer! As I initially thought, this could actually be a code gap rather than a config gap. =) I'll take a peek at trying to figure out a default risc-v implementation for If I get to a point where I have a PR to discuss, I'll update this PR with a pointer to a new PR. Obviously, if anyone else wants to beat me to it, that's great too! Ha! |
jerpelea
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be better implement the feature
|
In digging into this a bit more, it appears that there is already an If I further look upstream at https://github.com/enjoy-digital/litex/blob/master/litex/soc/cores/cpu/vexriscv_smp/system.h, Adding the below diff to Before submitting a separate PR, I'd like to ensure that this is the right track. IOW, I suspect that the invalidating might actually be flushing based upon upstream definitions. I'm not sure whether breaking that assumption for invalidation would have any effects. (I'm not seeing any a declared mechanism for invalidation in litex repos, but perhaps it is there in another location?) |
|
I have opened #17696 with this code diff discussed above. |
Fixes build failure as
up_flush_dcache_allis not defined inarty_a7:nshbuilds.Summary
arty_a7:nshbuilds fail with:It doesn't appear that
CONFIG_BOARDCTL_RESETis required for nsh, so removing the option seems prudent as the default is N. If there is a better fix to bring in theup_flush_dcache_alldefinition, I'm happy to pursue that instead.Impact
The configuration doesn't compile without this change.
Testing
I'm able to successfully build
arty_a7:nshimages with this change.