aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/subr_physmem.c
Commit message (Collapse)AuthorAgeFilesLines
* Add support for hw.physmem tunable for ARM/ARM64/RISC-V platformsOleksandr Tymoshenko2020-12-031-5/+32
| | | | | | | | | | | | | | | hw.physmem tunable allows to limit number of physical memory available to the system. It's handled in machdep files for x86 and PowerPC. This patch adds required logic to the consolidated physmem management interface that is used by ARM, ARM64, and RISC-V. Submitted by: Klara, Inc. Reviewed by: mhorne Sponsored by: Ampere Computing Differential Revision: https://reviews.freebsd.org/D27152 Notes: svn path=/head/; revision=368293
* Avoid dump_avail[] redefinition.Konstantin Belousov2020-10-141-0/+1
| | | | | | | | | | | | | Move dump_avail[] extern declaration and inlines into a new header vm/vm_dumpset.h. This fixes default gcc build for mips. Reviewed by: alc, scottph Tested by: kevans (previous version) Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D26741 Notes: svn path=/head/; revision=366711
* Convert arm's physmem interface to MI codeMitchell Horne2020-04-191-0/+399
The arm_physmem interface found in arm's MD code provides a convenient set of routines for adding/excluding physical memory regions and initializing important kernel globals such as Maxmem, realmem, phys_avail[], and dump_avail[]. It is especially convenient for FDT systems, since we can use FDT parsing functions and pass the result directly to one of these physmem routines. This interface is already in use on arm and arm64, and can be used to simplify this early initialization on RISC-V as well. This requires only a couple trivial changes: - Move arm_physmem_kernel_addr to arm/machdep.c. It is unused on arm64, and manipulated entirely in arm MD code. - Convert arm32_btop/arm64_btop to atop. This is equivalently defined on all architectures. - Drop the "arm" prefix. Reviewed by: manu, emaste ("looks reasonable") MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24153 Notes: svn path=/head/; revision=360082