Page MenuHomeFreeBSD

Allow libkvm to get the kernel va to pa delta without the need for physaddr. This should allow for a kernel where PHYSADDR and KERNPHYSADDR are both undefined.
ClosedPublic

Authored by andrew on Oct 13 2014, 3:17 PM.
Tags
None
Referenced Files
F108129849: D939.diff
Tue, Jan 21, 5:12 PM
Unknown Object (File)
Mon, Jan 20, 9:19 AM
Unknown Object (File)
Fri, Jan 17, 12:55 PM
Unknown Object (File)
Dec 9 2024, 2:52 AM
Unknown Object (File)
Nov 13 2024, 1:33 PM
Unknown Object (File)
Nov 8 2024, 7:34 PM
Unknown Object (File)
Nov 5 2024, 9:18 AM
Unknown Object (File)
Oct 28 2024, 12:07 PM
Subscribers

Details

Reviewers
andrew
Group Reviewers
ARM

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

andrew retitled this revision from to Allow libkvm to get the kernel va to pa delta without the need for physaddr. This should allow for a kernel where PHYSADDR and KERNPHYSADDR are both undefined..
andrew updated this object.
andrew edited the test plan for this revision. (Show Details)
andrew added a reviewer: ARM.

PT_LOOS is the generic "first OS-specific" value. What's to prevent other people from overloading this by accident in the future? It'd be nice if there was a header file where we could declare our own set of names starting at PT_LOOS so at least we know what's in use by which arches. Maybe even split the namespace into generic vs arch-specific. I don't know if we have such a thing already. (And I don't really want to turn your relatively simple changes into big complicated project, I'm just sort-of being philosophical here.)

sys/arm/arm/dump_machdep.c
268

It seems strange to add what is effectively a constant zero to fileofs here. Also setting p_offset to fileofs probably doesn't make sense.

Instead I might be inclined to add words to the function comment block that since the header doesn't represent an actual object the offset and sizes are set to zero and the fileofs doesn't change.

We could add a value to sys/sys/elf_common.h. All that should be needed is to select a random value to place in the lower bits. Other architectures may find this useful however I haven't looked into if this is the case.

sys/arm/arm/dump_machdep.c
268

I can remove them, I mostly left them in as I was unsure if we would need any data in this section.

Create a new PT_ value and remove the += 0

Number to make it look FreeBSD specific and change the comment as it's not
ARM specific.

andrew added a reviewer: andrew.
This revision is now accepted and ready to land.Oct 19 2014, 8:23 PM