HomeFreeBSD

Handle non-page aligned/sized memory in physmem

Description

Handle non-page aligned/sized memory in physmem

In some configurations the firmware may pass memory regions that are
not page sized or aligned, e.g. when using 16k pages on arm64. If this
is the case we will calculate many small regions because the alignment
is applied before being inserted. As we round the start up and end down
this will leave a 1 page hole between what should have been a single
region.

Fix by keeping the original alignment until we are just about to insert
the region into the avail array.

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34694

(cherry picked from commit d8bff5b67c9b6a85f409a7408e45e7e87d39c5a2)

Details

Provenance
andrewAuthored on Mar 28 2022, 11:37 AM
Differential Revision
D34694: Handle non-page aligned/sized memory in physmem
Parents
rG0edb26c3bad0: Port subr_physmem to userspace and add tests
Branches
Unknown
Tags
Unknown