riscv-pk contains Berkeley bootloader for several open-source RISC-V processors, and Keystone adds security monitor which isolates physical memory using PMP. riscv-pk/sm contains most of the code for the security monitor:
https://github.com/keystone-enclave/riscv-pk/tree/5f11485b0f...
Keystone is in its early stage, and the first version contains somewhat minimal functioning components.