Skip to content

Conversation

@jsgf
Copy link
Contributor

@jsgf jsgf commented Jul 24, 2025

Set the mcause mask to !0u64 on rv64 targets.

Fixes #333

@jsgf jsgf requested a review from a team as a code owner July 24, 2025 22:05
@jsgf jsgf force-pushed the fix-mcause-interrupt branch 3 times, most recently from 827a55f to eb6df01 Compare July 24, 2025 23:38
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.

Thanks! In newer PRs, we are using usize::MAX instead of !0usize. Can you change this?

/// `mcause` register
Mcause: 0x342,
mask: 0xffff_ffff,
mask: !0usize,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
mask: !0usize,
mask: usize::MAX,

@romancardenas
Copy link
Contributor

Also, please rebase from master to fix conflicts on README file

@jsgf jsgf force-pushed the fix-mcause-interrupt branch from eb6df01 to 90cfc5f Compare July 25, 2025 16:58
@jsgf jsgf force-pushed the fix-mcause-interrupt branch from 90cfc5f to 877a83c Compare July 25, 2025 17:02
@romancardenas romancardenas added this pull request to the merge queue Jul 25, 2025
Merged via the queue into rust-embedded:master with commit ca86c48 Jul 25, 2025
139 checks passed
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.

Mcause::from_bits doesn't allow interrupt to be set.

2 participants