Skip to content

Add more CSRs #31

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

Merged
merged 9 commits into from
Jul 23, 2019
Merged

Add more CSRs #31

merged 9 commits into from
Jul 23, 2019

Conversation

Disasm
Copy link
Member

@Disasm Disasm commented Jun 25, 2019

No description provided.

@Disasm Disasm marked this pull request as ready for review July 2, 2019 22:30
@Disasm Disasm requested a review from a team as a code owner July 2, 2019 22:30
@Disasm Disasm requested a review from laanwj July 19, 2019 14:48
Copy link
Contributor

@laanwj laanwj left a comment

Choose a reason for hiding this comment

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

Looks good to me, checked the register numbers and permissions against RV Privileged Architecture spec v1.10. I've also tested the build.
This does make riscv.o noticeably larger (the rv64 one goes from 7k to 67k), which might be a problem for small-memory platforms, or does the one-function-per-section cause only the used functions to be linked in in the final binary?

@laanwj
Copy link
Contributor

laanwj commented Jul 23, 2019

or does the one-function-per-section cause only the used functions to be linked in in the final binary?

I've checked and this is indeed the case ! Only what is actually used makes it into the binary.

bors r+

bors bot added a commit that referenced this pull request Jul 23, 2019
31: Add more CSRs r=laanwj a=Disasm



Co-authored-by: Vadim Kaushan <[email protected]>
@bors
Copy link
Contributor

bors bot commented Jul 23, 2019

Build succeeded

@bors bors bot merged commit d3dc245 into master Jul 23, 2019
@bors bors bot deleted the more-csrs branch July 23, 2019 17:46
@Disasm
Copy link
Member Author

Disasm commented Jul 23, 2019

Yep, this is quite common pattern for saving space. In two Rust releases we will have even more beautiful solution with ThinLTO.

romancardenas pushed a commit that referenced this pull request Nov 17, 2023
31: New linker script and multi-core support r=laanwj a=Disasm

* Linker script was reworked. Now it uses region aliases to relocate sections. This approach makes it possible to build firmware for both FLASH+RAM and RAM-only targets. Memory definitions now supposed to be present in their corresponding crates (e.g. RAM definition in PAC crate, FLASH definition in board support crate).
* Multi-core support was introduced. Cores are parked with `_mp_hook` function and then awakened in platform-dependent way.
* Documentation was updated to reflect new features.
* New crate version: 0.6.0

Depends on: #28
Closes: rust-embedded/riscv-rt#26

Co-authored-by: Vadim Kaushan <[email protected]>
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 this pull request may close these issues.

2 participants