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

Legalize xenvcfg.CBIE #1416

Merged
merged 3 commits into from
Jul 25, 2023
Merged

Conversation

YenHaoChen
Copy link
Collaborator

@YenHaoChen YenHaoChen commented Jul 17, 2023

The value 2 of xenvcfg.CBIE is reserved. This PR legalizes it to 0.

The values 2 and 0 of xenvcfg.CBIE do not have corresponding macros. Thus, this PR hard-codes those values.

Reference: riscv/riscv-CMOs#65

Copy link
Collaborator

@aswaterman aswaterman left a comment

Choose a reason for hiding this comment

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

Rather than repeating the constant 2 in multiple places, could we at least #define CBIE_RESERVED 2 in csrs.cc?

@YenHaoChen
Copy link
Collaborator Author

Add #define CBIE_RESERVED 2 in csrs.cc as suggested by @aswaterman .

riscv/csrs.cc Outdated Show resolved Hide resolved
@YenHaoChen YenHaoChen force-pushed the pr-xenvcfg-cbie branch 4 times, most recently from 6045a88 to e64109c Compare July 20, 2023 02:26
@YenHaoChen
Copy link
Collaborator Author

YenHaoChen commented Jul 20, 2023

Replace the global macro CBIE_RESERVED with a local constant cbie_reserved.

2023.07.21 update: use the global macro instead of the local constant.

@YenHaoChen YenHaoChen requested a review from scottj97 July 20, 2023 02:29
riscv/csrs.cc Outdated Show resolved Hide resolved
riscv/csrs.cc Show resolved Hide resolved
riscv/csrs.cc Show resolved Hide resolved
Copy link
Contributor

@scottj97 scottj97 left a comment

Choose a reason for hiding this comment

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

Looks like this needs a rebase.

riscv/csrs.cc Outdated Show resolved Hide resolved
The value 2 of menvcfg.CBIE is reserved. This commit legalizes it to 0
by adding a specialized class envcfg_csr_t.

Reference: riscv/riscv-CMOs#65
The value 2 of senvcfg.CBIE is reserved. This commit legalizes it to 0.

Reference: riscv/riscv-CMOs#65
The value 2 of henvcfg.CBIE is reserved. This commit legalizes it to 0.

Reference: riscv/riscv-CMOs#65
Copy link
Contributor

@scottj97 scottj97 left a comment

Choose a reason for hiding this comment

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

Thanks for your patience.

@scottj97 scottj97 merged commit 4d01719 into riscv-software-src:master Jul 25, 2023
3 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.

3 participants