aboutsummaryrefslogtreecommitdiff
path: root/sys/vm/vm_phys.c
diff options
context:
space:
mode:
authorJeff Roberson <jeff@FreeBSD.org>2019-08-16 00:45:14 +0000
committerJeff Roberson <jeff@FreeBSD.org>2019-08-16 00:45:14 +0000
commit2194393787801f71cea02463d999fbc1071790fc (patch)
treeb7b2c583734007529b2eb3e24f3cf506dd3599e6 /sys/vm/vm_phys.c
parentccfbff6d592ecb89e9d2195a68d66d691e219b9a (diff)
downloadsrc-2194393787801f71cea02463d999fbc1071790fc.tar.gz
src-2194393787801f71cea02463d999fbc1071790fc.zip
Move phys_avail definition into MI code. It is consumed in the MI layer and
doing so adds more flexibility with less redundant code. Reviewed by: jhb, markj, kib Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D21250
Notes
Notes: svn path=/head/; revision=351108
Diffstat (limited to 'sys/vm/vm_phys.c')
-rw-r--r--sys/vm/vm_phys.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/sys/vm/vm_phys.c b/sys/vm/vm_phys.c
index c16282974a40..49cba32ca576 100644
--- a/sys/vm/vm_phys.c
+++ b/sys/vm/vm_phys.c
@@ -111,6 +111,24 @@ static struct vm_freelist __aligned(CACHE_LINE_SIZE)
static int __read_mostly vm_nfreelists;
/*
+ * These "avail lists" are globals used to communicate boot-time physical
+ * memory layout to other parts of the kernel. Each physically contiguous
+ * region of memory is defined by a start address at an even index and an
+ * end address at the following odd index. Each list is terminated by a
+ * pair of zero entries.
+ *
+ * dump_avail tells the dump code what regions to include in a crash dump, and
+ * phys_avail is all of the remaining physical memory that is available for
+ * the vm system.
+ *
+ * Initially dump_avail and phys_avail are identical. Boot time memory
+ * allocations remove extents from phys_avail that may still be included
+ * in dumps.
+ */
+vm_paddr_t phys_avail[PHYS_AVAIL_COUNT];
+vm_paddr_t dump_avail[PHYS_AVAIL_COUNT];
+
+/*
* Provides the mapping from VM_FREELIST_* to free list indices (flind).
*/
static int __read_mostly vm_freelist_to_flind[VM_NFREELIST];