diff options
author | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-04-29 19:06:34 +0000 |
---|---|---|
committer | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-04-29 19:06:34 +0000 |
commit | c73c3aa081cae0e565b8669ad7fba192749f8397 (patch) | |
tree | be441ea3add4f8c2b872b6ebd9cd6cc053346133 /target-arm/helper.c | |
parent | cf2d385c43b4387bec5a546c9b85ac654273cfa3 (diff) |
Fix ARM fine pagetables.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2742 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-arm/helper.c')
-rw-r--r-- | target-arm/helper.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/target-arm/helper.c b/target-arm/helper.c index 111b84652f..bae4c9fdb7 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -372,7 +372,13 @@ static int get_phys_addr(CPUState *env, uint32_t address, int access_type, code = 13; } else { /* Lookup l2 entry. */ - table = (desc & 0xfffffc00) | ((address >> 10) & 0x3fc); + if (type == 1) { + /* Coarse pagetable. */ + table = (desc & 0xfffffc00) | ((address >> 10) & 0x3fc); + } else { + /* Fine pagetable. */ + table = (desc & 0xfffff000) | ((address >> 8) & 0xffc); + } desc = ldl_phys(table); switch (desc & 3) { case 0: /* Page translation fault. */ |