drgn.helpers.linux.mm: start for_each_page() at min_low_pfn

This is always 0 on x86-64, but on AArch64, the start of physical memory
can be at a much higher address.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
This commit is contained in:
Omar Sandoval 2022-07-13 16:48:01 -07:00
parent b28bd9f0a3
commit dd976f1db2

View File

@ -46,7 +46,7 @@ def for_each_page(prog: Program) -> Iterator[Object]:
:return: Iterator of ``struct page *`` objects.
"""
vmemmap = prog["vmemmap"]
for i in range(prog["max_pfn"].value_()):
for i in range(prog["min_low_pfn"], prog["max_pfn"]):
yield vmemmap + i