diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 15dc66459a67..16f23038d8fd 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 7d12c9753b26..8f97e1b53796 100644 --- a/sys/i386/include/vmparam.h +++ b/sys/i386/include/vmparam.h @@ -84,6 +84,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. */