Commit 330c4d61a65801b994e7498163cec3ca74c4ece4
1 parent
ae5d8053
Fix XScale MMU's extended small pages.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3093 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
5 additions
and
5 deletions
target-arm/helper.c
... | ... | @@ -516,16 +516,16 @@ static int get_phys_addr(CPUState *env, uint32_t address, int access_type, |
516 | 516 | ap = (desc >> (4 + ((address >> 13) & 6))) & 3; |
517 | 517 | break; |
518 | 518 | case 3: /* 1k page. */ |
519 | - if (arm_feature(env, ARM_FEATURE_XSCALE)) | |
520 | - phys_addr = (desc & 0xfffff000) | (address & 0xfff); | |
521 | - else { | |
522 | - if (type == 1) { | |
519 | + if (type == 1) { | |
520 | + if (arm_feature(env, ARM_FEATURE_XSCALE)) | |
521 | + phys_addr = (desc & 0xfffff000) | (address & 0xfff); | |
522 | + else { | |
523 | 523 | /* Page translation fault. */ |
524 | 524 | code = 7; |
525 | 525 | goto do_fault; |
526 | 526 | } |
527 | + } else | |
527 | 528 | phys_addr = (desc & 0xfffffc00) | (address & 0x3ff); |
528 | - } | |
529 | 529 | ap = (desc >> 4) & 3; |
530 | 530 | break; |
531 | 531 | default: | ... | ... |