summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/include
diff options
context:
space:
mode:
authorjhibbits <jhibbits@FreeBSD.org>2015-12-24 04:30:15 +0000
committerjhibbits <jhibbits@FreeBSD.org>2015-12-24 04:30:15 +0000
commita56b695591d54aeb8a2bfff084697f6e9493855c (patch)
tree4bad651440260b722d33601cfacf24834ea26a65 /sys/powerpc/include
parent760c079f38ca83ef18d4cef550918dc730e818a6 (diff)
downloadFreeBSD-src-a56b695591d54aeb8a2bfff084697f6e9493855c.zip
FreeBSD-src-a56b695591d54aeb8a2bfff084697f6e9493855c.tar.gz
Extend Book-E to support >4GB RAM
Summary: With some additional changes for AIM, that could also support much larger physmem sizes. Given that 32-bit AIM is more or less obsolete, though, it's not worth it at this time. Differential Revision: https://reviews.freebsd.org/D4345
Diffstat (limited to 'sys/powerpc/include')
-rw-r--r--sys/powerpc/include/param.h14
-rw-r--r--sys/powerpc/include/platform.h4
-rw-r--r--sys/powerpc/include/pmap.h2
3 files changed, 11 insertions, 9 deletions
diff --git a/sys/powerpc/include/param.h b/sys/powerpc/include/param.h
index df5a7be..453915c 100644
--- a/sys/powerpc/include/param.h
+++ b/sys/powerpc/include/param.h
@@ -98,7 +98,7 @@
#define PAGE_SHIFT 12
#define PAGE_SIZE (1L << PAGE_SHIFT) /* Page size */
-#define PAGE_MASK (vm_offset_t)(PAGE_SIZE - 1)
+#define PAGE_MASK (PAGE_SIZE - 1)
#define NPTEPG (PAGE_SIZE/(sizeof (pt_entry_t)))
#define MAXPAGESIZES 1 /* maximum number of supported page sizes */
@@ -116,15 +116,17 @@
/*
* Mach derived conversion macros
*/
-#define trunc_page(x) ((unsigned long)(x) & ~(PAGE_MASK))
+#define trunc_page(x) ((x) & ~(PAGE_MASK))
#define round_page(x) (((x) + PAGE_MASK) & ~PAGE_MASK)
-#define atop(x) ((unsigned long)(x) >> PAGE_SHIFT)
-#define ptoa(x) ((unsigned long)(x) << PAGE_SHIFT)
+#define atop(x) ((x) >> PAGE_SHIFT)
+#define ptoa(x) ((x) << PAGE_SHIFT)
-#define powerpc_btop(x) ((unsigned long)(x) >> PAGE_SHIFT)
-#define powerpc_ptob(x) ((unsigned long)(x) << PAGE_SHIFT)
+#define powerpc_btop(x) ((x) >> PAGE_SHIFT)
+#define powerpc_ptob(x) ((x) << PAGE_SHIFT)
#define pgtok(x) ((x) * (PAGE_SIZE / 1024UL))
+#define btoc(x) ((vm_offset_t)(((x)+PAGE_MASK)>>PAGE_SHIFT))
+
#endif /* !_POWERPC_INCLUDE_PARAM_H_ */
diff --git a/sys/powerpc/include/platform.h b/sys/powerpc/include/platform.h
index 854c0be..28f83cc 100644
--- a/sys/powerpc/include/platform.h
+++ b/sys/powerpc/include/platform.h
@@ -39,8 +39,8 @@
#include <machine/pcpu.h>
struct mem_region {
- vm_offset_t mr_start;
- vm_size_t mr_size;
+ uint64_t mr_start;
+ uint64_t mr_size;
};
void mem_regions(struct mem_region **, int *, struct mem_region **, int *);
diff --git a/sys/powerpc/include/pmap.h b/sys/powerpc/include/pmap.h
index dc8649e..97c5c79 100644
--- a/sys/powerpc/include/pmap.h
+++ b/sys/powerpc/include/pmap.h
@@ -250,7 +250,7 @@ boolean_t pmap_mmu_install(char *name, int prio);
* For more Ram increase the lmb or this value.
*/
-extern vm_offset_t phys_avail[PHYS_AVAIL_SZ];
+extern vm_paddr_t phys_avail[PHYS_AVAIL_SZ];
extern vm_offset_t virtual_avail;
extern vm_offset_t virtual_end;
OpenPOWER on IntegriCloud