Page MenuHomeFreeBSD

Move phys_avail and dump_avail into MI code.
ClosedPublic

Authored by jeff on Tue, Aug 13, 5:31 PM.

Details

Summary

I need to move phys_avail and dump_avail into MI code so that I can write boot time allocators. This also eliminates a lot of confusing redundant code and definitions. Since MI is manipulating these arrays it makes sense to define them MI.

The following two revisions depend on this refactoring:

https://reviews.freebsd.org/D21251
https://reviews.freebsd.org/D21252

Test Plan

I have built universe and tested on amd64.

Diff Detail

Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 25846
Build 24417: arc lint + arc unit

Event Timeline

jeff created this revision.Tue, Aug 13, 5:31 PM
jeff edited the summary of this revision. (Show Details)Tue, Aug 13, 5:36 PM
jeff added reviewers: kib, jhb, jhibbits.
jhb added inline comments.Tue, Aug 13, 5:49 PM
sys/vm/vm_param.h
132

Maybe (PHYS_AVAIL_ENTRIES + 2) (similar to how the default for PHYS_AVAIL_ENTRIES is defined above)

sys/vm/vm_phys.c
122

Do you want to add a note here to say something like: "Initially dump_avail matches phys_avail, but phys_avail is modified during boot to provide early memory allocations before the VM system is able to allocate memory."?

jeff edited the summary of this revision. (Show Details)Tue, Aug 13, 5:53 PM
jeff edited the test plan for this revision. (Show Details)
jeff added reviewers: br, mhorne, marius, markj.
jeff added inline comments.Tue, Aug 13, 5:56 PM
sys/amd64/include/pmap.h
229

This crept in from a different commit. I will fix before I merge.

markj accepted this revision.Tue, Aug 13, 7:32 PM
markj added inline comments.
sys/mips/mips/machdep.c
144

I think this can actually be PHYS_AVAIL_ENTRIES, but it doesn't really matter.

sys/vm/vm_phys.h
52

Extra newline.

This revision is now accepted and ready to land.Tue, Aug 13, 7:32 PM
kib accepted this revision.Thu, Aug 15, 4:37 PM

(assuming Mark and John notes are handled)

jeff closed this revision.Fri, Aug 16, 4:56 PM