aboutsummaryrefslogtreecommitdiff
path: root/pk/pk.c
diff options
context:
space:
mode:
authorAndrew Waterman <waterman@s144.Millennium.Berkeley.EDU>2011-04-12 22:32:51 -0700
committerAndrew Waterman <waterman@s144.Millennium.Berkeley.EDU>2011-04-12 22:32:51 -0700
commit69ddca76d2e132762ef529bc86a7d0cb6050dede (patch)
treead6d1ecca5593cb830c72964f14fe31a683ddcdd /pk/pk.c
parent64d0c6765ce07cfe3fd860a4428fa5e2cc89d97a (diff)
downloadriscv-pk-69ddca76d2e132762ef529bc86a7d0cb6050dede.zip
riscv-pk-69ddca76d2e132762ef529bc86a7d0cb6050dede.tar.gz
riscv-pk-69ddca76d2e132762ef529bc86a7d0cb6050dede.tar.bz2
[pk] add cache flush after program load
Diffstat (limited to 'pk/pk.c')
-rw-r--r--pk/pk.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/pk/pk.c b/pk/pk.c
index 9c6653d..a0c4ecb 100644
--- a/pk/pk.c
+++ b/pk/pk.c
@@ -162,6 +162,7 @@ static void jump_usrstart(const char* fn)
int user64;
long start = load_elf(fn, &user64);
+ asm volatile("cflush; fence");
init_tf(&tf, start, USER_MEM_SIZE-USER_MAINVARS_SIZE, user64);
pop_tf(&tf);
}