summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2007-06-05 05:17:20 +0000
committeralc <alc@FreeBSD.org>2007-06-05 05:17:20 +0000
commit414dfd6eee247a19380c75f94769db87c8b98c9f (patch)
tree6f9af3228b9adab0a131bdbb781f95c4a8914450 /sys
parent1c9a6e53273977a479ca9453b090337ebddadedd (diff)
downloadFreeBSD-src-414dfd6eee247a19380c75f94769db87c8b98c9f.zip
FreeBSD-src-414dfd6eee247a19380c75f94769db87c8b98c9f.tar.gz
Add the machine-specific definitions for configuring the new physical
memory allocator. Set the size of phys_avail[] and dump_avail[] using one of these definitions. Approved by: re
Diffstat (limited to 'sys')
-rw-r--r--sys/i386/i386/machdep.c8
-rw-r--r--sys/i386/include/vmparam.h37
2 files changed, 44 insertions, 1 deletions
diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c
index 15dc664..16f2303 100644
--- a/sys/i386/i386/machdep.c
+++ b/sys/i386/i386/machdep.c
@@ -189,7 +189,13 @@ static void freebsd4_sendsig(sig_t catcher, ksiginfo_t *, sigset_t *mask);
long Maxmem = 0;
long realmem = 0;
-#define PHYSMAP_SIZE (2 * 16)
+/*
+ * The number of PHYSMAP entries must be one less than the number of
+ * PHYSSEG entries because the PHYSMAP entry that spans the largest
+ * physical address that is accessible by ISA DMA is split into two
+ * PHYSSEG entries.
+ */
+#define PHYSMAP_SIZE (2 * (VM_PHYSSEG_MAX - 1))
vm_paddr_t phys_avail[PHYSMAP_SIZE + 2];
vm_paddr_t dump_avail[PHYSMAP_SIZE + 2];
diff --git a/sys/i386/include/vmparam.h b/sys/i386/include/vmparam.h
index 7d12c97..8f97e1b 100644
--- a/sys/i386/include/vmparam.h
+++ b/sys/i386/include/vmparam.h
@@ -85,6 +85,43 @@
#define VM_PHYSSEG_DENSE
/*
+ * The number of PHYSSEG entries must be one greater than the number
+ * of phys_avail entries because the phys_avail entry that spans the
+ * largest physical address that is accessible by ISA DMA is split
+ * into two PHYSSEG entries.
+ */
+#define VM_PHYSSEG_MAX 17
+
+/*
+ * Create one free page pool. Since the i386 kernel virtual address
+ * space does not include a mapping onto the machine's entire physical
+ * memory, VM_FREEPOOL_DIRECT is defined as an alias for the default
+ * pool, VM_FREEPOOL_DEFAULT.
+ */
+#define VM_NFREEPOOL 1
+#define VM_FREEPOOL_DEFAULT 0
+#define VM_FREEPOOL_DIRECT 0
+
+/*
+ * Create two free page lists: VM_FREELIST_DEFAULT is for physical
+ * pages that are above the largest physical address that is
+ * accessible by ISA DMA and VM_FREELIST_ISADMA is for physical pages
+ * that are below that address.
+ */
+#define VM_NFREELIST 2
+#define VM_FREELIST_DEFAULT 0
+#define VM_FREELIST_ISADMA 1
+
+/*
+ * The largest allocation size is 2MB under PAE and 4MB otherwise.
+ */
+#ifdef PAE
+#define VM_NFREEORDER 10
+#else
+#define VM_NFREEORDER 11
+#endif
+
+/*
* Kernel physical load address.
*/
#ifndef KERNLOAD
OpenPOWER on IntegriCloud