From 78d49077ae9f5c0cbe339f472682c1bf06c304a7 Mon Sep 17 00:00:00 2001 From: Laura Abbott <lauraa@codeaurora.org> Date: Fri, 24 Jan 2014 17:00:59 -0800 Subject: [PATCH] linux-ramdump-parser-v2: Support older 'map around the hole' Older targets use a slightly different version of map around the hole which has different variable names. Account for this in the code. Change-Id: Ia657b265dc6f34c9fb33f71c1ef62dbf0c0c2114 --- linux-ramdump-parser-v2/mm.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/linux-ramdump-parser-v2/mm.py b/linux-ramdump-parser-v2/mm.py index 3e6f6ff..0cfc86e 100644 --- a/linux-ramdump-parser-v2/mm.py +++ b/linux-ramdump-parser-v2/mm.py @@ -1,4 +1,4 @@ -# Copyright (c) 2013, The Linux Foundation. All rights reserved. +# Copyright (c) 2013-2014, 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 @@ -170,7 +170,11 @@ def sparsemem_lowmem_page_address(ramdump, page): def dont_map_hole_lowmem_page_address(ramdump, page): phys = page_to_pfn(ramdump, page) << 12 hole_end_addr = ramdump.addr_lookup('memory_hole_end') + if hole_end_addr is None: + hole_end_addr = ramdump.addr_lookup('membank1_start') hole_offset_addr = ramdump.addr_lookup('memory_hole_offset') + if hole_offset_addr is None: + hole_offset_addr = ramdump.addr_lookup('membank0_size') hole_end = ramdump.read_word(hole_end_addr) hole_offset = ramdump.read_word(hole_offset_addr) if hole_end != 0 and phys >= hole_end: -- GitLab