diff options
author | Andrew Waterman <andrew@sifive.com> | 2024-10-08 09:05:33 -0700 |
---|---|---|
committer | Andrew Waterman <andrew@sifive.com> | 2024-10-08 09:05:33 -0700 |
commit | abadfdc507d5a75b6272dc360e70a80a510c758a (patch) | |
tree | e069378b6c27398c8e61f93dabb72d7289f689cd | |
parent | 7f3bef01193137e3227fcf88bece86f5234b9bc5 (diff) | |
download | pk-master.zip pk-master.tar.gz pk-master.tar.bz2 |
Resolves #336
-rw-r--r-- | pk/pk.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -119,7 +119,7 @@ static void run_loaded_program(size_t argc, char** argv, uintptr_t kstack_top) size_t shadow_stack_top = shadow_stack_bottom + shadow_stack_size; set_csr(senvcfg, SENVCFG_SSE); - write_csr(ssp, shadow_stack_top); + asm volatile ("csrw %0, %1" :: "I" (CSR_SSP), "r" (shadow_stack_top) : "memory"); } set_csr(senvcfg, SENVCFG_CBCFE | INSERT_FIELD(0, SENVCFG_CBIE, 1)); |