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: define marchid using CSR macros #232

Merged
merged 2 commits into from
Oct 23, 2024

Conversation

rmsyn
Copy link
Contributor

@rmsyn rmsyn commented Oct 20, 2024

Adds a helper macro to test if a CSR is implemented on the platform.

Uses CSR helper macros to define the marchid register.

Related: #229

@rmsyn rmsyn added this to the riscv 0.13.0 milestone Oct 20, 2024
@rmsyn rmsyn requested a review from a team as a code owner October 20, 2024 23:36
@rmsyn rmsyn force-pushed the riscv/marchid-csr-macro branch 2 times, most recently from 2eb3de7 to a8e8a73 Compare October 21, 2024 23:43
Copy link
Contributor

@romancardenas romancardenas left a comment

Choose a reason for hiding this comment

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

Minor change. It looks to me!

riscv/src/register/macros.rs Outdated Show resolved Hide resolved
rmsyn added 2 commits October 22, 2024 23:37
Adds a variant arm to the read-only CSR helper macro to create a CSR
register type which may not be implemented on the platform.

Takes a sentinel value to test whether the CSR is implemented.
Uses CSR helper macros to define the `marchid` register.
@rmsyn rmsyn force-pushed the riscv/marchid-csr-macro branch from a8e8a73 to c473fdb Compare October 22, 2024 23:38
Copy link
Member

@jessebraham jessebraham left a comment

Choose a reason for hiding this comment

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

LGTM!

@jessebraham jessebraham added this pull request to the merge queue Oct 23, 2024
Merged via the queue into rust-embedded:master with commit 63b748a Oct 23, 2024
101 checks passed
@rmsyn rmsyn deleted the riscv/marchid-csr-macro branch October 24, 2024 02:27
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.

3 participants