-/* $OpenBSD: vmparam.h,v 1.45 2015/03/30 20:30:22 miod Exp $ */
+/* $OpenBSD: vmparam.h,v 1.46 2015/06/02 04:31:53 miod Exp $ */
/* $NetBSD: vmparam.h,v 1.13 1997/07/12 16:20:03 perry Exp $ */
/*
#define VM_MIN_ADDRESS ((vaddr_t)0x2000)
#define VM_MAX_KERNEL_ADDRESS ((vaddr_t)0xfe000000)
+extern vaddr_t vm_pie_max_addr;
+#define VM_PIE_MAX_ADDR vm_pie_max_addr
+
#define IOSPACE_BASE VM_MAX_KERNEL_ADDRESS
#define IOSPACE_LEN 0x01000000 /* 16 MB of iospace */
-/* $OpenBSD: machdep.c,v 1.171 2015/03/30 20:30:22 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.172 2015/06/02 04:31:53 miod Exp $ */
/* $NetBSD: machdep.c,v 1.85 1997/09/12 08:55:02 pk Exp $ */
/*
#include "led.h"
#endif
+vaddr_t vm_pie_max_addr = 0;
+
struct vm_map *exec_map = NULL;
struct uvm_constraint_range dma_constraint = { 0x0, (paddr_t)-1 };
exec_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
16*NCARGS, VM_MAP_PAGEABLE, FALSE, NULL);
+ /*
+ * Set up userland PIE limits. PIE is disabled on sun4/4c/4e due
+ * to the limited address space.
+ */
+ if (CPU_ISSUN4M) {
+ vm_pie_max_addr = VM_MAXUSER_ADDRESS / 4;
+ }
+
dvma_init();
#ifdef DEBUG