Skip to content
Snippets Groups Projects
Commit 9b396979 authored by Laura Abbott's avatar Laura Abbott
Browse files

linux-ramdump-parser-v2: Correct pfn_to_page with a pfn offset

When calculating pfn_to_page, the pfn needs to be offset before
indexing into the array. Account for this.

Change-Id: If207447a91537ab7670058fede65473d3ea93281
parent 94c8b75b
No related branches found
No related tags found
No related merge requests found
......@@ -135,7 +135,7 @@ def pfn_to_page_flat(ramdump, pfn):
page_size = ramdump.sizeof('struct page')
# XXX Needs to change for LPAE
pfn_offset = ramdump.phys_offset >> 12
return mem_map + (pfn * page_size) - pfn_offset
return mem_map + ((pfn - pfn_offset) * page_size)
def page_to_pfn(ramdump, page):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment