From ad3e67d05a65da2e3696ed45b999e061ccb7a879 Mon Sep 17 00:00:00 2001 From: "Aneesh Kumar K.V" Date: Mon, 26 Jan 2015 19:51:58 +0530 Subject: target-ppc: Use right page size with hash table lookup We look at two sizes specified in ISA (4K, 64K). If not found matching, we consider it 16MB. Without this patch we would fail to lookup address above 16MB range. Below 16MB happened to work before because the kernel have a liner mapping and we always looked up hash for 0xc000000000000000. The actual real address was computed by using the 16MB offset with the real address found with the above hash. Without Fix: (gdb) x/16x 0xc000000001000000 0xc000000001000000 : Cannot access memory at address 0xc000000001000000 (gdb) With Fix: (gdb) x/16x 0xc000000001000000 0xc000000001000000 : 0x00000000 0x00000000 0x00000000 0x00000000 0xc000000001000010 : 0x00000000 0x00000000 0x00000000 0x00000000 0xc000000001000020 : 0x00000000 0x00000000 0x00000000 0x00000000 0xc000000001000030 : 0x00000000 0x00000000 0x00000000 0x00000000 Signed-off-by: Aneesh Kumar K.V Reviewed-by: David Gibson Signed-off-by: Alexander Graf --- target-ppc/cpu.h | 1 + 1 file changed, 1 insertion(+) (limited to 'target-ppc/cpu.h') diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h index aae33a9..b706b9f 100644 --- a/target-ppc/cpu.h +++ b/target-ppc/cpu.h @@ -45,6 +45,7 @@ # define TARGET_VIRT_ADDR_SPACE_BITS 64 #endif +#define TARGET_PAGE_BITS_64K 16 #define TARGET_PAGE_BITS_16M 24 #else /* defined (TARGET_PPC64) */ -- cgit v1.1