summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2020-06-21 16:18:55 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2020-06-21 16:18:55 +0000
commit5d300ca404e688a0b3957b8deaa6245372b6cc3a (patch)
tree66a69d51883f9265648ccfb70999f41069ae8c6e /sys
parentbe93aedbcffae810fed08ad89bc5005773503529 (diff)
Set up exec_map and phys_map.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/powerpc64/include/vmparam.h2
-rw-r--r--sys/arch/powerpc64/powerpc64/machdep.c24
2 files changed, 23 insertions, 3 deletions
diff --git a/sys/arch/powerpc64/include/vmparam.h b/sys/arch/powerpc64/include/vmparam.h
index df745e11338..651fd2c4361 100644
--- a/sys/arch/powerpc64/include/vmparam.h
+++ b/sys/arch/powerpc64/include/vmparam.h
@@ -38,6 +38,8 @@
*/
#define USRIOSIZE 300
+#define VM_PHYS_SIZE (USRIOSIZE * PAGE_SIZE)
+
#define VM_PHYSSEG_MAX 32
#define VM_PHYSSEG_STRAT VM_PSTRAT_BSEARCH
diff --git a/sys/arch/powerpc64/powerpc64/machdep.c b/sys/arch/powerpc64/powerpc64/machdep.c
index b394557be79..a110c97a2da 100644
--- a/sys/arch/powerpc64/powerpc64/machdep.c
+++ b/sys/arch/powerpc64/powerpc64/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.26 2020/06/21 13:23:59 kettenis Exp $ */
+/* $OpenBSD: machdep.c,v 1.27 2020/06/21 16:18:54 kettenis Exp $ */
/*
* Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org>
@@ -508,8 +508,8 @@ need_resched(struct cpu_info *ci)
void
cpu_startup(void)
{
+ vaddr_t minaddr, maxaddr, va;
paddr_t pa, epa;
- vaddr_t va;
void *fdt;
void *node;
char *prop;
@@ -517,6 +517,24 @@ cpu_startup(void)
printf("%s", version);
+ /*
+ * Allocate a submap for exec arguments. This map effectively
+ * limits the number of processes exec'ing at any time.
+ */
+ minaddr = vm_map_min(kernel_map);
+ exec_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
+ 16 * NCARGS, VM_MAP_PAGEABLE, FALSE, NULL);
+
+
+ /*
+ * Allocate a submap for physio.
+ */
+ phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
+ VM_PHYS_SIZE, 0, FALSE, NULL);
+
+ /*
+ * Set up buffers, so they can be used to read disk labels.
+ */
bufinit();
/* Remap the FDT. */
@@ -587,7 +605,7 @@ void
setregs(struct proc *p, struct exec_package *pack, u_long stack,
register_t *retval)
{
- printf("%s\n", __func__);
+ panic("%s", __func__);
}
void