diff options
author | Andrew Waterman <waterman@s144.Millennium.Berkeley.EDU> | 2011-04-12 22:32:51 -0700 |
---|---|---|
committer | Andrew Waterman <waterman@s144.Millennium.Berkeley.EDU> | 2011-04-12 22:32:51 -0700 |
commit | 69ddca76d2e132762ef529bc86a7d0cb6050dede (patch) | |
tree | ad6d1ecca5593cb830c72964f14fe31a683ddcdd /pk | |
parent | 64d0c6765ce07cfe3fd860a4428fa5e2cc89d97a (diff) | |
download | pk-69ddca76d2e132762ef529bc86a7d0cb6050dede.zip pk-69ddca76d2e132762ef529bc86a7d0cb6050dede.tar.gz pk-69ddca76d2e132762ef529bc86a7d0cb6050dede.tar.bz2 |
[pk] add cache flush after program load
Diffstat (limited to 'pk')
-rw-r--r-- | pk/frontend.c | 3 | ||||
-rw-r--r-- | pk/pk.c | 1 |
2 files changed, 2 insertions, 2 deletions
diff --git a/pk/frontend.c b/pk/frontend.c index fa5db51..1cb99db 100644 --- a/pk/frontend.c +++ b/pk/frontend.c @@ -17,8 +17,7 @@ sysret_t frontend_syscall(long n, long a0, long a1, long a2, long a3) magic_mem[3] = a2; magic_mem[4] = a3; - asm volatile ("fence"); - asm volatile ("cflush"); + asm volatile ("cflush; fence"); mtpcr(magic_mem,PCR_TOHOST); while(mfpcr(PCR_FROMHOST) == 0); @@ -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); } |