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

Pre-release revision #8

Closed
4 tasks done
Mingkai-Li opened this issue Aug 19, 2023 · 5 comments
Closed
4 tasks done

Pre-release revision #8

Mingkai-Li opened this issue Aug 19, 2023 · 5 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@Mingkai-Li
Copy link
Member

Mingkai-Li commented Aug 19, 2023

  • TransCapstone renamed as Capstone-RISC-V, remove support for Pure Capstone
  • Full revision of implemention to find logic bugs, e.g., RC update missing
  • Add essential documentation
  • Debug instructions
@Mingkai-Li Mingkai-Li self-assigned this Aug 19, 2023
@Mingkai-Li Mingkai-Li added enhancement New feature or request bug Something isn't working labels Aug 19, 2023
Mingkai-Li added a commit that referenced this issue Aug 25, 2023
Mingkai-Li added a commit that referenced this issue Aug 25, 2023
Mingkai-Li added a commit that referenced this issue Aug 25, 2023
Mingkai-Li added a commit that referenced this issue Aug 27, 2023
@Mingkai-Li
Copy link
Member Author

Mingkai-Li commented Aug 27, 2023

  • Fix inappropriate assumption about the content in a sealed capability, see this PR in the spec.

@Mingkai-Li
Copy link
Member Author

Mingkai-Li commented Aug 30, 2023

normal_sp is a special one among all the added registers in Capstone-RISC-V. It's neither a CSR nor a CCSR (hence a shadow register), and it's the only shadow register that can potentially contain a capability. For CCSRs, linearity and reference count update are strict. However, for normal_sp, it's reachable only by CAPENTER in the normal world, or CAPEXIT/exception/ineterrupt in the secure world. In other words, it's write-only in normal world, and read-only in secure world. Therefore, linearity and reference count update is ignored for a capability currently in normal_sp.

@Mingkai-Li
Copy link
Member Author

Mingkai-Li commented Aug 30, 2023

For any store operation, both the memory tag and the reference count (if the memory contains a capability) of the CLEN-bit aligned memory location should be updated accordingly. Also, for existing RISC-V instructions in the normal world, it's worth attention that these updates should be based on the physical address after the MMU translation, instead of the virtual address.

@Mingkai-Li
Copy link
Member Author

Mingkai-Li commented Aug 30, 2023

  • RC update for in a store operation using virtual address

@Mingkai-Li
Copy link
Member Author

Assumptions in the current implementation of Spike:

  • All 128-bit memory access (except for floating point) will access a capability.
  • RISC-V store operations are required to be aligned to the size of the accessed data.
  • Pages are required to be aligned to the size of the page regarding both virtual memory and physical memory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant