forked from CTSRD-CHERI/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
Currently the CHERIoT linkage model has a limitation that it cannot support globals larger than 4kiB. This is because instantiating pointers to globals does a sequence of auicgp, cincoffset, csetboundsimm and the set bounds instruction has a 12-bit immediate.
Some workarounds exist:
- The compiler has a workaround for globals that are used in the same compilation unit (e.g. static) by generating a longer instruction sequence using the register operand version of
csetboundsbut this doesn't work for globals defined in different compilation units because we don't have the correct type of relocation. - In cheriot-rtos you can use a dynamic memory allocation, MMIO_CAPABILITY or SHARED_OBJECT
Although this hasn't been a huge issue so far we do need to fix it, especially as csetboundsimm is unlikely to be part of the riscv-cheri standard in the form we have it.
Metadata
Metadata
Assignees
Labels
No labels