Page MenuHomeFreeBSD

Mark relocated memory region as valid
AbandonedPublic

Authored by luporl on May 7 2018, 4:05 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 18 2024, 6:16 AM
Unknown Object (File)
Feb 9 2024, 6:45 AM
Unknown Object (File)
Jan 21 2024, 2:42 PM
Unknown Object (File)
Dec 20 2023, 2:56 AM
Unknown Object (File)
Dec 12 2023, 4:43 AM
Unknown Object (File)
Oct 28 2023, 4:38 AM
Unknown Object (File)
Sep 14 2023, 4:45 AM
Unknown Object (File)
Sep 6 2023, 4:56 AM

Details

Summary

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
size.
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
Lint Passed
Unit
No 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.