HomeFreeBSD

riscv: eliminate physmap global

Description

riscv: eliminate physmap global

Since physical memory management is now handled by subr_physmem.c, the
need to keep this global array has diminished. It is not referenced
outside of early boot-time, and is populated by physmem_avail() in
pmap_bootstrap(). Just allocate the array on the stack for the duration
of its lifetime.

The check against physmap[0] in initriscv() can be dropped altogether,
as there is no consequence for excluding a memory range twice.

Reviewed by: markj
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34778

Details

Provenance
mhorneAuthored on Apr 7 2022, 3:13 PM
Reviewer
markj
Differential Revision
D34778: riscv: eliminate physmap global
Parents
rG748f7c8db756: Have stpncpy tests ask the kernel for the page size
Branches
Unknown
Tags
Unknown