Commit c73c3aa081cae0e565b8669ad7fba192749f8397
1 parent
cf2d385c
Fix ARM fine pagetables.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2742 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
7 additions
and
1 deletions
target-arm/helper.c
... | ... | @@ -372,7 +372,13 @@ static int get_phys_addr(CPUState *env, uint32_t address, int access_type, |
372 | 372 | code = 13; |
373 | 373 | } else { |
374 | 374 | /* Lookup l2 entry. */ |
375 | - table = (desc & 0xfffffc00) | ((address >> 10) & 0x3fc); | |
375 | + if (type == 1) { | |
376 | + /* Coarse pagetable. */ | |
377 | + table = (desc & 0xfffffc00) | ((address >> 10) & 0x3fc); | |
378 | + } else { | |
379 | + /* Fine pagetable. */ | |
380 | + table = (desc & 0xfffff000) | ((address >> 8) & 0xffc); | |
381 | + } | |
376 | 382 | desc = ldl_phys(table); |
377 | 383 | switch (desc & 3) { |
378 | 384 | case 0: /* Page translation fault. */ | ... | ... |