Page MenuHomeFreeBSD

Make PCB structure binary compatible for old and new PMAP on ARM
ClosedPublic

Authored by wma_semihalf.com on Oct 27 2015, 10:47 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Mar 24, 6:12 PM
Unknown Object (File)
Feb 26 2024, 9:11 PM
Unknown Object (File)
Feb 13 2024, 7:00 AM
Unknown Object (File)
Jan 23 2024, 9:02 AM
Unknown Object (File)
Dec 20 2023, 12:13 AM
Unknown Object (File)
Nov 13 2023, 1:28 PM
Unknown Object (File)
Oct 25 2023, 9:00 AM
Unknown Object (File)
Sep 28 2023, 10:23 PM
Subscribers

Details

Summary

This structure must be binary compatible regardless of PMAP
version being used. Create reserved section for NEW_PMAP to
make other variables be placed exactly in the same memory
addresses. This fixes kgdb/gdb behavoiur, which uses pcb.h stuctures.
The NEW_PMAP is kernel flag, so it does not propagate to the buildworld,
what makes the tools using pcb.h unable to parse PCB data.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

wma_semihalf.com retitled this revision from to Make PCB structure binary compatible for old and new PMAP on ARM.
wma_semihalf.com updated this object.
wma_semihalf.com edited the test plan for this revision. (Show Details)
wma_semihalf.com added reviewers: zbb, imp, kib, jhb, ian.
sys/arm/include/pcb.h
64

I would rather you just do something more obvious to the reader that doesn't have to worry about padding by having the same exact definitions:

uint32_t *_pcb_rsvd0;
uint32_t  _pcb_rsvd1;
u_int _pcb_rsvd2;
sys/arm/include/pcb.h
62

After the latest revision, you do not need #ifdef ARM_NEW_PMAP. Use ARM_NEW_PMAP definition always. A comment that three fields are only used by new pmap case would be enough.

Is it important that pcb_pagedir is vm_offset_t for v5/old v6 pmaps ?

I removed all ifdefs to avoid obfuscating the code with reserved fields etc.

sys/arm/include/pcb.h
75

I suggest removing the '======' delimiters. Also, please specify in comment what compatibility is wanted there, i.e. that we want binary compatibility between PCB layouts for old and new pmaps.

The code change looks fine.

zbb edited edge metadata.
This revision is now accepted and ready to land.Nov 3 2015, 7:47 AM

I'm ready to remove old pmap_v6 almost immediately, if you find it helpful.

Thanks, eventually that'd be nice. However I'd like to submit this patch and then remove any old-pmap stuff in a separate commit. It's just that we have prepared new-pmap to be MFCed to 10-stable and I'd like to have every necessary change isolated to keep the track of all required commits.
If you have no objections I'd like to ask zbb to commit this change as is.

mmel added a reviewer: mmel.
This revision was automatically updated to reflect the committed changes.