Page MenuHomeFreeBSD

amd64: switch to the physmem KPI
Needs ReviewPublic

Authored by kevans on Nov 6 2021, 7:28 PM.

Details

Reviewers
kib
markj
Summary

The physmem KPI is already used on arm, arm64, and riscv64; extend it
towards x86. This reduces some complexity in machdep.c in favor of
using platform-common coalescing logic and being a bit easier to grok
at a glance.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 42741
Build 39629: arc lint + arc unit

Event Timeline

kevans requested review of this revision.Nov 6 2021, 7:28 PM
sys/amd64/amd64/machdep.c
796

Why __diagused?

864

How can EINVAL arise?

Do we really want to stop the test if physmem_exclude_region() fails?

sys/amd64/amd64/machdep.c
796

ah, remnants of a former versiin... this used to just assert on the exclude return rather than bail out. Will remove.

864

This one is a brain-o. We do want to stop, but only if we hit an E2BIG (or whatever the "region full" error ends up being), since there's no point in testing once we can't exclude anything else. I think the previous version emitted a notice along those lines, so I'll restore that and fix this.

Only bail out of memtest on E2BIG (can't add anymore)

Restore message if we fill up hwregions