Skip to content

Commit 7999841

Browse files
leosanitt-lowriscmarnovandermaas
authored andcommitted
changes so capability_modification_test_harness runs
1 parent 1bf8e4b commit 7999841

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

sw/cheri/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,4 @@ add_subdirectory(common)
4242
add_subdirectory(checks)
4343
add_subdirectory(tests)
4444
add_subdirectory(error_leds)
45+
add_subdirectory(cap_modification_instructions_testing)

sw/cheri/common/boot.S

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,14 @@ start:
8989
csetaddr cgp, cs0, t0
9090

9191
cmove ca0, cs0
92+
cspecialr cs0, mscratchc
93+
cmove ca1, cs0
94+
95+
auipcc cs1, 0 // Get PCC with offset = 0 (i.e., code root)
96+
li t0, 0
97+
csetaddr cs1, cs1, t0 // Setting the address of the execute root to 0
98+
cmove ca2, cs1 // Pass it in ca2
99+
92100
ccall entry_point
93101

94102
// Infinite loop if the entry point ever returns

0 commit comments

Comments
 (0)