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
F103208247: D4011.diff
Fri, Nov 22, 6:23 AM
F103207725: D4011.diff
Fri, Nov 22, 6:16 AM
Unknown Object (File)
Sun, Nov 17, 7:08 PM
Unknown Object (File)
Wed, Oct 30, 1:54 PM
Unknown Object (File)
Oct 5 2024, 6:41 PM
Unknown Object (File)
Oct 4 2024, 12:15 PM
Unknown Object (File)
Oct 2 2024, 11:55 PM
Unknown Object (File)
Oct 2 2024, 2:39 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

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

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
66 ↗(On Diff #9729)

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 ↗(On Diff #9762)

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
62 ↗(On Diff #9881)

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.