-
Notifications
You must be signed in to change notification settings - Fork 673
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
CVM Development #3980
base: master
Are you sure you want to change the base?
CVM Development #3980
Conversation
yxtx1994
commented
Dec 4, 2024
- Add bitmap module in MMU for memory isolation
- Add memory encryption module based on AXI protoco
- We can don't using these modules by setting the option HasCVMExtension&HasMEMencryption to false
…|| ishptw) [fix] the signal “toLLPTW” gen logic(s2xlate === noS2xlate || s2xlate === onlyStage1) [fix] the handle flow of jmp_bitmap_check and s2xlate === onlyStage2 request in PTW
[feat] Add the option to implement the Memenc module in CVMconfig
…ption module [feat] delete unnecessary parameters in Soc
…ryptCSR is default ture.
[feat] Add lock logic for CSR MCVM.BME&BMA when BME is valid.
…x from ParallelMux.
[feat] Add BCLARE bit in CSR MCVM used for clear bitmap cache [fix] bitmap req merge logic of enq entry and after lookup cache entry [feat] remove bitmapReg clear logic in PTWCache for *fence, add clear logic when refill l0&sp [fix] latch and update more state when PTW get jmp_bitmap_check req
[fix] l0BitmapReg wakeup uses pte_index without OHToUInt [fix] bmppn compare and need_addr_check logic in LLPTW
* See the Mulan PSL v2 for more details. | ||
***************************************************************************************/ | ||
|
||
// See LICENSE.SiFive for license details. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this? Is this code derived from rocket-chip?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code dose not derived from rocket-chip, just import some packages of rocket-chip.
I didn't know if I should add a license for this, so I left it for now.
If it is not needed, I will delete it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import package does not need to add a license
* See the Mulan PSL v2 for more details. | ||
***************************************************************************************/ | ||
|
||
// See LICENSE.SiFive for license details. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same response as the last conversation.
val res_pmp = pmp_match_res(leaveHitMux, io.req.valid)(req.addr(PMPAddrBits-PMPKeyIDBits-1, 0), req.size, io.check_env.pmp, io.check_env.mode, lgMaxSize) | ||
val res_pma = pma_match_res(leaveHitMux, io.req.valid)(req.addr(PMPAddrBits-PMPKeyIDBits-1, 0), req.size, io.check_env.pma, io.check_env.mode, lgMaxSize) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this behaviour correct when CVM is disabled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When "HasCVMExtension = Some(true)", the actual physical address bit width change to "PAddrBits-KeyIDBits".
In this config, if CVM is disabled, the KeyID must be "0" and PMP/PMA only need to check actual physical address bit.
When "HasCVMExtension = Some(false)", KeyIDBits should be set to "0"(I will fix it in file SoC.scals).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest adding some comments about what a KeyID
is and what it does under the abovementioned circumstances.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with your suggestion and I will add relevant comments in the next commit.