Commit d07edbfa0022c86567f3460378008a654e532820

Authored by pbrook
1 parent 059809e4

Fix Arm cp15 c13 (Process ID) register writes.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2067 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 10 additions and 2 deletions
target-arm/helper.c
... ... @@ -494,10 +494,18 @@ void helper_set_cp15(CPUState *env, uint32_t insn, uint32_t val)
494 494 case 13: /* Process ID. */
495 495 switch (op2) {
496 496 case 0:
497   - env->cp15.c9_data = val;
  497 + /* Unlike real hardware the qemu TLB uses virtual addresses,
  498 + not modified virtual addresses, so this causes a TLB flush.
  499 + */
  500 + if (env->cp15.c13_fcse != val)
  501 + tlb_flush(env, 1);
  502 + env->cp15.c13_fcse = val;
498 503 break;
499 504 case 1:
500   - env->cp15.c9_insn = val;
  505 + /* This changes the ASID, so do a TLB flush. */
  506 + if (env->cp15.c13_context != val)
  507 + tlb_flush(env, 0);
  508 + env->cp15.c13_context = val;
501 509 break;
502 510 default:
503 511 goto bad_reg;
... ...