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

RISCV fpu context save and restore according to the MSTATUS.FS #315

Open
xuzihan351 opened this issue Nov 15, 2023 · 7 comments
Open

RISCV fpu context save and restore according to the MSTATUS.FS #315

xuzihan351 opened this issue Nov 15, 2023 · 7 comments
Labels
feature New feature or enhancement request

Comments

@xuzihan351
Copy link

RISCV has a FS filed in MSTATUS, it indicates the status of the fpu. It can be initial, clean, dirty of off. When dealing with the fpu context save and restore, the FS filed may help to increase the preformence of the context switching. When the MSTATUS.FS is clean or off, the context saving and restoring can be skip.
Is it possible to implement this feature in the future?

@xuzihan351 xuzihan351 added the feature New feature or enhancement request label Nov 15, 2023
@williamelamie
Copy link

This is definitely possible... tx_thread_schedule.s, tx_thread_system_return.s, tx_thread_context_save.s, and tx_thread_context_restore.s are the likely places for the enhanced logic.

@Alexbruliau
Copy link

Did you find out any issues related to FPU when porting to RISC-V ?

@xuzihan351
Copy link
Author

No issues found at the moment

@Alexbruliau
Copy link

Alexbruliau commented May 30, 2024

Not even this kind of #389 ?

@xuzihan351
Copy link
Author

That is a bug, and I had fix it locally.

@Alexbruliau
Copy link

thanks you targeted a mpfs250 board?

@xuzihan351
Copy link
Author

Not that. I am targeting HPMicro series boards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or enhancement request
Projects
None yet
Development

No branches or pull requests

3 participants