summaryrefslogtreecommitdiff
path: root/sys/arch/hppa
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2003-12-10 20:57:33 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2003-12-10 20:57:33 +0000
commitad9b380ae2b167c0ab3be5c34194a4deecd886dd (patch)
tree587d0293492e2f39ce3058eced8359056eca466c /sys/arch/hppa
parente076e54f7fcb414ad64a4b3a0f9316a99c3e2318 (diff)
for unaligned btlb mapping attempts -- just fail
Diffstat (limited to 'sys/arch/hppa')
-rw-r--r--sys/arch/hppa/hppa/machdep.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/arch/hppa/hppa/machdep.c b/sys/arch/hppa/hppa/machdep.c
index 1f97c718a39..6d18c80c2a4 100644
--- a/sys/arch/hppa/hppa/machdep.c
+++ b/sys/arch/hppa/hppa/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.117 2003/11/24 19:27:03 mickey Exp $ */
+/* $OpenBSD: machdep.c,v 1.118 2003/12/10 20:57:32 mickey Exp $ */
/*
* Copyright (c) 1999-2002 Michael Shalayeff
@@ -904,9 +904,13 @@ btlb_insert(space, va, pa, lenp, prot)
pa >>= PGSHIFT;
va >>= PGSHIFT;
/* check address alignment */
- if (pa & (len - 1))
+ if (pa & (len - 1)) {
+#ifdef BTLBDEBUG
printf("WARNING: BTLB address misaligned pa=0x%x, len=0x%x\n",
pa, len);
+#endif
+ return -(ERANGE);
+ }
/* ensure IO space is uncached */
if ((pa & (HPPA_IOBEGIN >> PGSHIFT)) == (HPPA_IOBEGIN >> PGSHIFT))