Page MenuHomeFreeBSD

Mark relocated memory region as valid

Authored by luporl on May 7 2018, 4:05 PM.



Programs using kmem to read kernel memory (ex: ktrdump) are
getting invalid address errors.
This happens because mem_valid() don't find direct mapped memory
range 0xc000...0000 in pranges.

As in pseries the kernel gets relocated to 0xc000...0000 early in
the boot phase, I thought that it would be reasonable to add
another memory region starting at the new address, with the same
However, I really don't know if this is the correct way to fix
the issue.

This change is being done after MMU initialization, because
otherwise the system will panic saying 0xc000...0000 is already
being used.

Diff Detail

Lint OK
No Unit Test Coverage
Build Status
Buildable 16464
Build 16383: arc lint + arc unit

Event Timeline

This is an interesting problem that I need to think about -- thanks for identifying it! I think this particular patch is not the right one, so let's put a pin in this for a couple days.

This is pretty old and it seems the issue that this change was supposed to fix was already fixed in a proper way quite some time ago.