summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2005-04-07 13:16:13 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2005-04-07 13:16:13 +0000
commit9a574f358bcffb3fe75a12955edcd37c8ea69ee1 (patch)
tree3a621d98f44d033b282ee36cda55e2b1c276cf7a
parentd5a47478649b5a61c11248fb8a21b655990f328c (diff)
on some machines it's possible to limit the amount of physmem initialised dring post so having msgbuf at the end of memory shall work
-rw-r--r--sys/arch/hppa/hppa/machdep.c10
-rw-r--r--sys/arch/hppa/hppa/pmap.c9
2 files changed, 9 insertions, 10 deletions
diff --git a/sys/arch/hppa/hppa/machdep.c b/sys/arch/hppa/hppa/machdep.c
index 2c4cd72de6e..e00c839d385 100644
--- a/sys/arch/hppa/hppa/machdep.c
+++ b/sys/arch/hppa/hppa/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.143 2005/04/07 00:21:51 mickey Exp $ */
+/* $OpenBSD: machdep.c,v 1.144 2005/04/07 13:16:12 mickey Exp $ */
/*
* Copyright (c) 1999-2003 Michael Shalayeff
@@ -411,15 +411,13 @@ hppa_init(start)
v = hppa_round_page(v);
bzero ((void *)v1, (v - v1));
- msgbufp = (struct msgbuf *)v;
- v += round_page(MSGBUFSIZE);
- bzero(msgbufp, MSGBUFSIZE);
-
/* sets resvphysmem */
pmap_bootstrap(v);
- msgbufmapped = 1;
+ /* space has been reserved in pmap_bootstrap() */
+ msgbufp = (struct msgbuf *)(ptoa(physmem) - round_page(MSGBUFSIZE));
initmsgbuf((caddr_t)msgbufp, round_page(MSGBUFSIZE));
+ msgbufmapped = 1;
/* they say PDC_COPROC might turn fault light on */
pdc_call((iodcio_t)pdc, 0, PDC_CHASSIS, PDC_CHASSIS_DISP,
diff --git a/sys/arch/hppa/hppa/pmap.c b/sys/arch/hppa/hppa/pmap.c
index 759f435e0d5..e3ef8303438 100644
--- a/sys/arch/hppa/hppa/pmap.c
+++ b/sys/arch/hppa/hppa/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.124 2005/04/07 00:21:51 mickey Exp $ */
+/* $OpenBSD: pmap.c,v 1.125 2005/04/07 13:16:12 mickey Exp $ */
/*
* Copyright (c) 1998-2004 Michael Shalayeff
@@ -438,7 +438,7 @@ pmap_bootstrap(vstart)
extern int resvphysmem, etext, __rodata_end, __data_start;
extern u_int *ie_mem;
extern paddr_t hppa_vtop;
- vaddr_t va, addr = hppa_round_page(vstart), t;
+ vaddr_t va, addr = hppa_round_page(vstart), eaddr, t;
vsize_t size;
struct pmap *kpm;
int npdes, nkpdes;
@@ -558,9 +558,10 @@ pmap_bootstrap(vstart)
}
resvphysmem = atop(addr);
- DPRINTF(PDB_INIT, ("physmem: 0x%x - 0x%x\n", resvphysmem, physmem));
+ eaddr = physmem - atop(round_page(MSGBUFSIZE));
+ DPRINTF(PDB_INIT, ("physmem: 0x%x - 0x%x\n", resvphysmem, eaddr));
uvm_page_physload(0, physmem,
- resvphysmem, physmem, VM_FREELIST_DEFAULT);
+ resvphysmem, eaddr, VM_FREELIST_DEFAULT);
/* TODO optimize/inline the kenter */
for (va = 0; va < ptoa(physmem); va += PAGE_SIZE) {