summaryrefslogtreecommitdiffstats
path: root/sys/ia64
diff options
context:
space:
mode:
authoravg <avg@FreeBSD.org>2016-12-24 13:28:39 +0000
committeravg <avg@FreeBSD.org>2016-12-24 13:28:39 +0000
commit0c7d987676dd7cc911fab4f0fd4aae76aa3171d2 (patch)
tree9142a3ce8969e8dcc1f37f3eda5942ca8c85ab4d /sys/ia64
parentf2b18f54acdee9eddb6bdd84e2aca25a45b809e4 (diff)
downloadFreeBSD-src-0c7d987676dd7cc911fab4f0fd4aae76aa3171d2.zip
FreeBSD-src-0c7d987676dd7cc911fab4f0fd4aae76aa3171d2.tar.gz
define Maxmem for ia64, the only platform that didn't have it
This is a direct commit to stable/10 as the platform was removed in the newer branches. Maxmem is required for compiling fwohci(4) on ia64 since commit r310081, MFC of r277511. It was easier to add Maxmem than to make a special case for ia64 in fwohci. Reported by: jhb, gjb Discussed with: kib, jhb
Diffstat (limited to 'sys/ia64')
-rw-r--r--sys/ia64/ia64/physmem.c8
-rw-r--r--sys/ia64/include/md_var.h1
2 files changed, 8 insertions, 1 deletions
diff --git a/sys/ia64/ia64/physmem.c b/sys/ia64/ia64/physmem.c
index 11ee840..ea1a8af 100644
--- a/sys/ia64/ia64/physmem.c
+++ b/sys/ia64/ia64/physmem.c
@@ -38,7 +38,7 @@ static u_int phys_avail_segs;
vm_paddr_t phys_avail[2 * VM_PHYSSEG_MAX + 2];
vm_paddr_t paddr_max;
-
+long Maxmem;
long realmem;
static u_int
@@ -168,6 +168,12 @@ ia64_physmem_fini(void)
size = 1U << 27;
realmem = (realmem + size - 1) & ~(size - 1);
realmem = atop(realmem);
+
+ /*
+ * Maxmem isn't the "maximum memory", it's one larger than the
+ * highest page of the physical address space.
+ */
+ Maxmem = atop(paddr_max);
return (0);
}
diff --git a/sys/ia64/include/md_var.h b/sys/ia64/include/md_var.h
index b69b1af..b712d57 100644
--- a/sys/ia64/include/md_var.h
+++ b/sys/ia64/include/md_var.h
@@ -75,6 +75,7 @@ struct ia64_init_return {
extern uint64_t ia64_lapic_addr;
extern vm_paddr_t paddr_max;
+extern long Maxmem;
extern u_int busdma_swi_pending;
void *acpi_find_table(const char *sig);
OpenPOWER on IntegriCloud