Page MenuHomeFreeBSD

ARM minidump - new interface for pmap
ClosedPublic

Authored by skra on Jan 21 2016, 8:30 PM.
Tags
Referenced Files
Unknown Object (File)
Mar 24 2024, 6:11 PM
Unknown Object (File)
Feb 23 2024, 9:12 AM
Unknown Object (File)
Dec 20 2023, 1:49 AM
Unknown Object (File)
Nov 13 2023, 10:15 AM
Unknown Object (File)
Nov 11 2023, 2:12 PM
Unknown Object (File)
Oct 24 2023, 7:04 PM
Unknown Object (File)
Oct 10 2023, 9:57 AM
Unknown Object (File)
Sep 5 2023, 4:03 AM
Subscribers

Details

Summary

ARM minidump was shared by armv4 and armv6 with old pmap. With ARM_NEW_PMAP, the simple sharing was not possible as the new pmap is different. Thus new pmap interface is created which makes things simple again. Even in case that LPAE support will be implemented. Further, there is no need to expose internal pmap stuff with this interface.

Each 4K page has one 4 byte entry for mapping in vmcore. This means that the mapping is only very small part of vmcore and so, the interface was optimized for usage, not for speed.

Test Plan

Tested on armv6 with both old and new pmap.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

skra retitled this revision from to ARM minidump - new interface for pmap.
skra updated this object.
skra edited the test plan for this revision. (Show Details)
skra added reviewers: andrew, ian, kib.
skra set the repository for this revision to rS FreeBSD src repository - subversion.
skra added a project: ARM.
skra added a subscriber: ARM.

I suppose you do not suggest that in case LPAE is implemented, the vmcore format would be kept ? At least, you cannot fit 36bit address into the word-sized pte ?

sys/arm/arm/pmap-v6-new.c
1074 ↗(On Diff #12571)

Style.

sys/arm/arm/pmap-v6.c
3577 ↗(On Diff #12571)

It would be 6 lines shorter to write if ((pte & L2_TYPE_MASK) == L2_TYPE_L) pa = ; else pa = ;

Yes, in case of LPAE, the interface is general and only thing which will be different (but transparent) is pt2_entry_t definition. It's same as in vm_paddr_t case. Then, of course, the mapping size for 4K page won't be 4 bytes.

WRT mapping, simple PA would be enough. I mean that full L2 page table entry is not needed for kvatop translation in libkvm now. Is there a way how to access mapping attributes saved in vmcore in kgdb?

sys/arm/arm/pmap-v6.c
3577 ↗(On Diff #12571)

It's copied & pasted from pmap_extract_locked(). I wanted to keep it same as far as it's possible. But you are right, I will change it according to your suggestion.

In D5023#106777, @skra wrote:

WRT mapping, simple PA would be enough. I mean that full L2 page table entry is not needed for kvatop translation in libkvm now. Is there a way how to access mapping attributes saved in vmcore in kgdb?

I do not think so, for kernel mappings, unless page tables are dumped. For user mappings, much can be understood from the MI VM layer, but not all, without page tables.

sys/arm/arm/pmap-v6.c
3577 ↗(On Diff #12571)

I would say that pmap_extract locked would also benefit from some compaction. Not only there, but eg. l1pte_section() case too. I think that it would be best to commit this patch as is, and then change two places in the follow-up.

sys/arm/arm/pmap-v6.c
3577 ↗(On Diff #12571)

Okay then. I will commit it as is (with the style fix in pmap-v6-new.c), and then I will do the style change in pmap.c and pmap-v6.c. However, I would be quite careful to change such style in files which are not copyrighted by me. But maybe, there is a good reason to do that there to make the functions readable better.

This revision was automatically updated to reflect the committed changes.