Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-6]: src/sys/arch/hp300/dev Pullup patch (requested by tsutsui i...
details: https://anonhg.NetBSD.org/src/rev/2716e5ef452b
branches: netbsd-1-6
changeset: 531296:2716e5ef452b
user: jmc <jmc%NetBSD.org@localhost>
date: Mon Apr 12 05:24:33 2004 +0000
description:
Pullup patch (requested by tsutsui in ticket #1666)
Check mapped device VA by badaddr() in cnattach functions for framebuffers.
diffstat:
sys/arch/hp300/dev/grf_dv.c | 7 ++++---
sys/arch/hp300/dev/grf_gb.c | 7 ++++---
sys/arch/hp300/dev/grf_hy.c | 7 ++++---
sys/arch/hp300/dev/grf_rb.c | 7 ++++---
sys/arch/hp300/dev/grf_tc.c | 6 +++---
5 files changed, 19 insertions(+), 15 deletions(-)
diffs (139 lines):
diff -r 470372546630 -r 2716e5ef452b sys/arch/hp300/dev/grf_dv.c
--- a/sys/arch/hp300/dev/grf_dv.c Mon Apr 12 05:22:43 2004 +0000
+++ b/sys/arch/hp300/dev/grf_dv.c Mon Apr 12 05:24:33 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: grf_dv.c,v 1.21 2002/03/17 05:44:49 gmcgarry Exp $ */
+/* $NetBSD: grf_dv.c,v 1.21.6.1 2004/04/12 05:24:39 jmc Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -83,7 +83,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: grf_dv.c,v 1.21 2002/03/17 05:44:49 gmcgarry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: grf_dv.c,v 1.21.6.1 2004/04/12 05:24:39 jmc Exp $");
#include "opt_compat_hpux.h"
@@ -669,7 +669,8 @@
va = bus_space_vaddr(bst, bsh);
grf = (struct grfreg *)va;
- if ((grf->gr_id != GRFHWID) || (grf->gr_id2 != GID_DAVINCI)) {
+ if (badaddr(va) ||
+ (grf->gr_id != GRFHWID) || (grf->gr_id2 != GID_DAVINCI)) {
bus_space_unmap(bst, bsh, NBPG);
return (1);
}
diff -r 470372546630 -r 2716e5ef452b sys/arch/hp300/dev/grf_gb.c
--- a/sys/arch/hp300/dev/grf_gb.c Mon Apr 12 05:22:43 2004 +0000
+++ b/sys/arch/hp300/dev/grf_gb.c Mon Apr 12 05:24:33 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: grf_gb.c,v 1.20 2002/03/17 05:44:49 gmcgarry Exp $ */
+/* $NetBSD: grf_gb.c,v 1.20.6.1 2004/04/12 05:24:33 jmc Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -87,7 +87,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: grf_gb.c,v 1.20 2002/03/17 05:44:49 gmcgarry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: grf_gb.c,v 1.20.6.1 2004/04/12 05:24:33 jmc Exp $");
#include "opt_compat_hpux.h"
@@ -618,7 +618,8 @@
va = bus_space_vaddr(bst, bsh);
grf = (struct grfreg *)va;
- if ((grf->gr_id != GRFHWID) || (grf->gr_id2 != GID_GATORBOX)) {
+ if (badaddr(va) ||
+ (grf->gr_id != GRFHWID) || (grf->gr_id2 != GID_GATORBOX)) {
bus_space_unmap(bst, bsh, NBPG);
return (1);
}
diff -r 470372546630 -r 2716e5ef452b sys/arch/hp300/dev/grf_hy.c
--- a/sys/arch/hp300/dev/grf_hy.c Mon Apr 12 05:22:43 2004 +0000
+++ b/sys/arch/hp300/dev/grf_hy.c Mon Apr 12 05:24:33 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: grf_hy.c,v 1.16 2002/03/15 05:55:35 gmcgarry Exp $ */
+/* $NetBSD: grf_hy.c,v 1.16.6.1 2004/04/12 05:24:44 jmc Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -84,7 +84,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: grf_hy.c,v 1.16 2002/03/15 05:55:35 gmcgarry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: grf_hy.c,v 1.16.6.1 2004/04/12 05:24:44 jmc Exp $");
#include "opt_compat_hpux.h"
@@ -766,7 +766,8 @@
va = bus_space_vaddr(bst, bsh);
grf = (struct grfreg *)va;
- if ((grf->gr_id != GRFHWID) || (grf->gr_id2 != GID_HYPERION)) {
+ if (badaddr(va) ||
+ (grf->gr_id != GRFHWID) || (grf->gr_id2 != GID_HYPERION)) {
bus_space_unmap(bst, bsh, NBPG);
return (1);
}
diff -r 470372546630 -r 2716e5ef452b sys/arch/hp300/dev/grf_rb.c
--- a/sys/arch/hp300/dev/grf_rb.c Mon Apr 12 05:22:43 2004 +0000
+++ b/sys/arch/hp300/dev/grf_rb.c Mon Apr 12 05:24:33 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: grf_rb.c,v 1.21 2002/03/17 05:44:49 gmcgarry Exp $ */
+/* $NetBSD: grf_rb.c,v 1.21.6.1 2004/04/12 05:24:49 jmc Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -83,7 +83,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: grf_rb.c,v 1.21 2002/03/17 05:44:49 gmcgarry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: grf_rb.c,v 1.21.6.1 2004/04/12 05:24:49 jmc Exp $");
#include "opt_compat_hpux.h"
@@ -615,7 +615,8 @@
va = bus_space_vaddr(bst, bsh);
grf = (struct grfreg *)va;
- if ((grf->gr_id != GRFHWID) || (grf->gr_id2 != GID_RENAISSANCE)) {
+ if (badaddr(va) ||
+ (grf->gr_id != GRFHWID) || (grf->gr_id2 != GID_RENAISSANCE)) {
bus_space_unmap(bst, bsh, NBPG);
return (1);
}
diff -r 470372546630 -r 2716e5ef452b sys/arch/hp300/dev/grf_tc.c
--- a/sys/arch/hp300/dev/grf_tc.c Mon Apr 12 05:22:43 2004 +0000
+++ b/sys/arch/hp300/dev/grf_tc.c Mon Apr 12 05:24:33 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: grf_tc.c,v 1.22 2002/03/17 05:44:49 gmcgarry Exp $ */
+/* $NetBSD: grf_tc.c,v 1.22.6.1 2004/04/12 05:24:53 jmc Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -83,7 +83,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: grf_tc.c,v 1.22 2002/03/17 05:44:49 gmcgarry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: grf_tc.c,v 1.22.6.1 2004/04/12 05:24:53 jmc Exp $");
#include "opt_compat_hpux.h"
@@ -721,7 +721,7 @@
va = bus_space_vaddr(bst, bsh);
grf = (struct grfreg *)va;
- if (grf->gr_id != GRFHWID) {
+ if (badaddr(va) || grf->gr_id != GRFHWID) {
bus_space_unmap(bst, bsh, NBPG);
return (1);
}
Home |
Main Index |
Thread Index |
Old Index