From bee8897b09458d44a68a4735a656cb9b7937a4bd Mon Sep 17 00:00:00 2001 From: Aditya Degwekar <adityad@codeaurora.org> Date: Fri, 23 Jan 2015 12:32:03 -0800 Subject: [PATCH] linux-ramdump-parser-v2: Fix calculation of TTBR0 For calculating the non-LPAE ARMv7 TTBR0 offset, use swapper_pg_dir_addr obtained from an address lookup instead of hardcoded value. Change-Id: I96a82ee62ca5cbe86b696657af8822e513d5393c --- linux-ramdump-parser-v2/mmu.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-ramdump-parser-v2/mmu.py b/linux-ramdump-parser-v2/mmu.py index 0fa1d2b..16bc222 100644 --- a/linux-ramdump-parser-v2/mmu.py +++ b/linux-ramdump-parser-v2/mmu.py @@ -1,4 +1,4 @@ -# Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. +# Copyright (c) 2013-2015, The Linux Foundation. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 and @@ -81,7 +81,7 @@ class Armv7MMU(MMU): self.secondary_page_tables = [ [0 for col in range(256)] for row in range(4096)] - msm_ttbr0 = self.ramdump.phys_offset + 0x4000 + msm_ttbr0 = self.ramdump.phys_offset + self.ramdump.swapper_pg_dir_addr self.ttbr = msm_ttbr0 virt_address = 0x0 gb_i = 0 -- GitLab