Skip to content

Conversation

maass-hamburg
Copy link
Member

@maass-hamburg maass-hamburg commented Oct 20, 2025

add driver for VexRiscv CPU cache controller.

split from #93816

Add SpinalHDL vendor prefix.

Signed-off-by: Fin Maaß <[email protected]>
Copy link
Member

@fkokosinski fkokosinski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments, LGTM otherwise


int arch_dcache_invd_all(void)
{
__asm__ volatile(".insn 0x500F\n");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I'd maybe add a small comment here that this instruction is for invalidating the whole cache, and maybe this link: https://github.com/SpinalHDL/VexRiscv?tab=readme-ov-file#dbuscachedplugin

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

"mv a0, %1\n"
"j 2f\n"
"3:\n"
".insn 0x5500F\n" /* 0x500f | (a0 << 15) */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto: add a comment about the address range we're invalidating here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

add driver for VexRiscv CPU cache controller.

Signed-off-by: Fin Maaß <[email protected]>
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants