Propagate volatile-ness from g_fbkva or g_regkva etc. as best as possible.

Some uses of __UNVOLATILE(), either in preparation of calls to bcopy()
or in the invocations themselves.
This commit is contained in:
he 2007-03-05 20:29:07 +00:00
parent d152127c07
commit 3ba91b0595
7 changed files with 77 additions and 70 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ite_cl.c,v 1.8 2005/12/11 12:16:28 christos Exp $ */ /* $NetBSD: ite_cl.c,v 1.9 2007/03/05 20:29:07 he Exp $ */
/* /*
* Copyright (c) 1995 Ezra Story * Copyright (c) 1995 Ezra Story
@ -36,7 +36,7 @@
#include "opt_amigacons.h" #include "opt_amigacons.h"
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ite_cl.c,v 1.8 2005/12/11 12:16:28 christos Exp $"); __KERNEL_RCSID(0, "$NetBSD: ite_cl.c,v 1.9 2007/03/05 20:29:07 he Exp $");
#include "grfcl.h" #include "grfcl.h"
#if NGRFCL > 0 #if NGRFCL > 0
@ -150,7 +150,7 @@ void
cl_putc(struct ite_softc *ip, int c, int dy, int dx, int mode) cl_putc(struct ite_softc *ip, int c, int dy, int dx, int mode)
{ {
volatile unsigned char *ba = ip->grf->g_regkva; volatile unsigned char *ba = ip->grf->g_regkva;
unsigned char *fb = ip->grf->g_fbkva; volatile unsigned char *fb = ip->grf->g_fbkva;
unsigned char attr; unsigned char attr;
volatile unsigned char *cp; volatile unsigned char *cp;
@ -183,7 +183,8 @@ cl_clear(struct ite_softc *ip, int sy, int sx, int h, int w)
if (ip->flags & ITE_INGRF) if (ip->flags & ITE_INGRF)
return; return;
dst = ip->grf->g_fbkva + (sy * ip->cols) + sx; dst = (unsigned char*)__UNVOLATILE(ip->grf->g_fbkva) +
(sy * ip->cols) + sx;
src = dst + (ip->rows*ip->cols); src = dst + (ip->rows*ip->cols);
len = w*h; len = w*h;
@ -202,7 +203,7 @@ cl_scroll(struct ite_softc *ip, int sy, int sx, int count, int dir)
if (ip->flags & ITE_INGRF) if (ip->flags & ITE_INGRF)
return; return;
fb = ip->grf->g_fbkva + sy * ip->cols; fb = (unsigned char*)__UNVOLATILE(ip->grf->g_fbkva) + sy * ip->cols;
SetTextPlane(ba, 0x00); SetTextPlane(ba, 0x00);
switch (dir) { switch (dir) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: ite_cv.c,v 1.7 2007/03/04 05:59:22 christos Exp $ */ /* $NetBSD: ite_cv.c,v 1.8 2007/03/05 20:29:07 he Exp $ */
/* /*
* Copyright (c) 1995 Michael Teske * Copyright (c) 1995 Michael Teske
@ -40,7 +40,7 @@
#include "opt_amigacons.h" #include "opt_amigacons.h"
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ite_cv.c,v 1.7 2007/03/04 05:59:22 christos Exp $"); __KERNEL_RCSID(0, "$NetBSD: ite_cv.c,v 1.8 2007/03/05 20:29:07 he Exp $");
#include "grfcv.h" #include "grfcv.h"
#if NGRFCV > 0 #if NGRFCV > 0
@ -205,9 +205,9 @@ cv_cursor(struct ite_softc *ip, int flag)
void void
cv_putc(struct ite_softc *ip, int c, int dy, int dx, int mode) cv_putc(struct ite_softc *ip, int c, int dy, int dx, int mode)
{ {
void *fb = ip->grf->g_fbkva; volatile char *fb = ip->grf->g_fbkva;
unsigned char attr; unsigned char attr;
unsigned char *cp; volatile unsigned char *cp;
attr = (unsigned char) ((mode & ATTR_INV) ? (0x70) : (0x07)); attr = (unsigned char) ((mode & ATTR_INV) ? (0x70) : (0x07));
if (mode & ATTR_UL) attr = 0x01; if (mode & ATTR_UL) attr = 0x01;
@ -231,10 +231,12 @@ cv_clear(struct ite_softc *ip, int sy, int sx, int h, int w)
* which describe continuous regions. For a VT200 terminal, * which describe continuous regions. For a VT200 terminal,
* this is safe behavior. * this is safe behavior.
*/ */
unsigned short *dst; volatile unsigned short *dst;
int len; int len;
dst = (unsigned short *) (ip->grf->g_fbkva + (((sy * ip->cols) + sx) << 2)); dst = (volatile unsigned short *)
((volatile char*)ip->grf->g_fbkva +
(((sy * ip->cols) + sx) << 2));
for (len = w * h; len > 0 ; len--) { for (len = w * h; len > 0 ; len--) {
*dst = 0x2007; *dst = 0x2007;
@ -250,11 +252,12 @@ cv_clear(struct ite_softc *ip, int sy, int sx, int h, int w)
void void
cv_scroll(struct ite_softc *ip, int sy, int sx, int count, int dir) cv_scroll(struct ite_softc *ip, int sy, int sx, int count, int dir)
{ {
unsigned short *src, *dst, *dst2; volatile unsigned short *src, *dst, *dst2;
int i; int i;
int len; int len;
src = (unsigned short *)(ip->grf->g_fbkva + (cv_rowc[sy] << 2)); src = (volatile unsigned short *)
((volatile char*)ip->grf->g_fbkva + (cv_rowc[sy] << 2));
switch (dir) { switch (dir) {
case SCROLL_UP: case SCROLL_UP:
@ -265,13 +268,13 @@ cv_scroll(struct ite_softc *ip, int sy, int sx, int count, int dir)
if (count > sy) { /* boundary checks */ if (count > sy) { /* boundary checks */
dst2 = console_buffer; dst2 = console_buffer;
dst = (unsigned short *)(ip->grf->g_fbkva); dst = (volatile unsigned short *)(ip->grf->g_fbkva);
len -= cv_rowc[(count - sy)]; len -= cv_rowc[(count - sy)];
src += cv_rowc[(count - sy)]; src += cv_rowc[(count - sy)];
} else } else
dst2 = &console_buffer[cv_rowc[(sy-count)]]; dst2 = &console_buffer[cv_rowc[(sy-count)]];
bcopy (src, dst2, len << 1); bcopy (__UNVOLATILE(src), __UNVOLATILE(dst2), len << 1);
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
*dst++ = *dst2++; *dst++ = *dst2++;
@ -288,7 +291,7 @@ cv_scroll(struct ite_softc *ip, int sy, int sx, int count, int dir)
if (len < 0) if (len < 0)
return; /* do some boundary check */ return; /* do some boundary check */
bcopy (src, dst2, len << 1); bcopy (__UNVOLATILE(src), __UNVOLATILE(dst2), len << 1);
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
*dst++ = *dst2++; *dst++ = *dst2++;
@ -300,7 +303,7 @@ cv_scroll(struct ite_softc *ip, int sy, int sx, int count, int dir)
src = &console_buffer[cv_rowc[sy] + sx]; src = &console_buffer[cv_rowc[sy] + sx];
len = ip->cols - (sx + count); len = ip->cols - (sx + count);
dst2 = &console_buffer[cv_rowc[sy] + sx + count]; dst2 = &console_buffer[cv_rowc[sy] + sx + count];
bcopy (src, dst2, len << 1); bcopy (__UNVOLATILE(src), __UNVOLATILE(dst2), len << 1);
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
*dst++ = *dst2++; *dst++ = *dst2++;
@ -312,7 +315,7 @@ cv_scroll(struct ite_softc *ip, int sy, int sx, int count, int dir)
src = &console_buffer[cv_rowc[sy] + sx]; src = &console_buffer[cv_rowc[sy] + sx];
len = ip->cols - sx; len = ip->cols - sx;
dst2 = &console_buffer[cv_rowc[sy] + sx - count]; dst2 = &console_buffer[cv_rowc[sy] + sx - count];
bcopy (src, dst2, len << 1); bcopy (__UNVOLATILE(src), __UNVOLATILE(dst2), len << 1);
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
*dst++ = *dst2++; *dst++ = *dst2++;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ite_cv3d.c,v 1.6 2007/03/04 05:59:22 christos Exp $ */ /* $NetBSD: ite_cv3d.c,v 1.7 2007/03/05 20:29:07 he Exp $ */
/* /*
* Copyright (c) 1995 Michael Teske * Copyright (c) 1995 Michael Teske
@ -40,7 +40,7 @@
#include "opt_amigacons.h" #include "opt_amigacons.h"
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ite_cv3d.c,v 1.6 2007/03/04 05:59:22 christos Exp $"); __KERNEL_RCSID(0, "$NetBSD: ite_cv3d.c,v 1.7 2007/03/05 20:29:07 he Exp $");
#include "grfcv3d.h" #include "grfcv3d.h"
#if NGRFCV3D > 0 #if NGRFCV3D > 0
@ -205,20 +205,20 @@ cv3d_cursor(struct ite_softc *ip, int flag)
void void
cv3d_putc(struct ite_softc *ip, int c, int dy, int dx, int mode) cv3d_putc(struct ite_softc *ip, int c, int dy, int dx, int mode)
{ {
void *fb = ip->grf->g_fbkva; volatile void *fb = ip->grf->g_fbkva;
unsigned char attr; unsigned char attr;
unsigned char *cp; volatile unsigned char *cp;
attr = (unsigned char) ((mode & ATTR_INV) ? (0x70) : (0x07)); attr = (unsigned char) ((mode & ATTR_INV) ? (0x70) : (0x07));
if (mode & ATTR_UL) attr = 0x01; if (mode & ATTR_UL) attr = 0x01;
if (mode & ATTR_BOLD) attr |= 0x08; if (mode & ATTR_BOLD) attr |= 0x08;
if (mode & ATTR_BLINK) attr |= 0x80; if (mode & ATTR_BLINK) attr |= 0x80;
cp = fb + ((cv3d_rowc[dy] + dx) << 2); /* *4 */ cp = (volatile char*)fb + ((cv3d_rowc[dy] + dx) << 2); /* *4 */
*cp++ = (unsigned char) c; *cp++ = (unsigned char) c;
*cp = (unsigned char) attr; *cp = (unsigned char) attr;
cp = (unsigned char *) &console_buffer[cv3d_rowc[dy]+dx]; cp = (volatile unsigned char *) &console_buffer[cv3d_rowc[dy]+dx];
*cp++ = (unsigned char) c; *cp++ = (unsigned char) c;
*cp = (unsigned char) attr; *cp = (unsigned char) attr;
} }
@ -231,10 +231,12 @@ cv3d_clear(struct ite_softc *ip, int sy, int sx, int h, int w)
* which describe continuous regions. For a VT200 terminal, * which describe continuous regions. For a VT200 terminal,
* this is safe behavior. * this is safe behavior.
*/ */
unsigned short *dst; volatile unsigned short *dst;
int len; int len;
dst = (unsigned short *) (ip->grf->g_fbkva + (((sy * ip->cols) + sx) << 2)); dst = (volatile unsigned short *)
((volatile char*)ip->grf->g_fbkva +
(((sy * ip->cols) + sx) << 2));
for (len = w * h; len > 0 ; len--) { for (len = w * h; len > 0 ; len--) {
*dst = 0x2007; *dst = 0x2007;
@ -250,11 +252,12 @@ cv3d_clear(struct ite_softc *ip, int sy, int sx, int h, int w)
void void
cv3d_scroll(struct ite_softc *ip, int sy, int sx, int count, int dir) cv3d_scroll(struct ite_softc *ip, int sy, int sx, int count, int dir)
{ {
unsigned short *src, *dst, *dst2; volatile unsigned short *src, *dst, *dst2;
int i; int i;
int len; int len;
src = (unsigned short *)(ip->grf->g_fbkva + (cv3d_rowc[sy] << 2)); src = (volatile unsigned short *)
((volatile char*)ip->grf->g_fbkva + (cv3d_rowc[sy] << 2));
switch (dir) { switch (dir) {
case SCROLL_UP: case SCROLL_UP:
@ -265,13 +268,13 @@ cv3d_scroll(struct ite_softc *ip, int sy, int sx, int count, int dir)
if (count > sy) { /* boundary checks */ if (count > sy) { /* boundary checks */
dst2 = console_buffer; dst2 = console_buffer;
dst = (unsigned short *)(ip->grf->g_fbkva); dst = (volatile unsigned short *)(ip->grf->g_fbkva);
len -= cv3d_rowc[(count - sy)]; len -= cv3d_rowc[(count - sy)];
src += cv3d_rowc[(count - sy)]; src += cv3d_rowc[(count - sy)];
} else } else
dst2 = &console_buffer[cv3d_rowc[(sy-count)]]; dst2 = &console_buffer[cv3d_rowc[(sy-count)]];
bcopy (src, dst2, len << 1); bcopy (__UNVOLATILE(src), __UNVOLATILE(dst2), len << 1);
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
*dst++ = *dst2++; *dst++ = *dst2++;
@ -288,7 +291,7 @@ cv3d_scroll(struct ite_softc *ip, int sy, int sx, int count, int dir)
if (len < 0) if (len < 0)
return; /* do some boundary check */ return; /* do some boundary check */
bcopy (src, dst2, len << 1); bcopy (__UNVOLATILE(src), __UNVOLATILE(dst2), len << 1);
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
*dst++ = *dst2++; *dst++ = *dst2++;
@ -300,7 +303,7 @@ cv3d_scroll(struct ite_softc *ip, int sy, int sx, int count, int dir)
src = &console_buffer[cv3d_rowc[sy] + sx]; src = &console_buffer[cv3d_rowc[sy] + sx];
len = ip->cols - (sx + count); len = ip->cols - (sx + count);
dst2 = &console_buffer[cv3d_rowc[sy] + sx + count]; dst2 = &console_buffer[cv3d_rowc[sy] + sx + count];
bcopy (src, dst2, len << 1); bcopy (__UNVOLATILE(src), __UNVOLATILE(dst2), len << 1);
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
*dst++ = *dst2++; *dst++ = *dst2++;
@ -312,7 +315,7 @@ cv3d_scroll(struct ite_softc *ip, int sy, int sx, int count, int dir)
src = &console_buffer[cv3d_rowc[sy] + sx]; src = &console_buffer[cv3d_rowc[sy] + sx];
len = ip->cols - sx; len = ip->cols - sx;
dst2 = &console_buffer[cv3d_rowc[sy] + sx - count]; dst2 = &console_buffer[cv3d_rowc[sy] + sx - count];
bcopy (src, dst2, len << 1); bcopy (__UNVOLATILE(src), __UNVOLATILE(dst2), len << 1);
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
*dst++ = *dst2++; *dst++ = *dst2++;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ite_et.c,v 1.11 2006/06/07 10:07:03 he Exp $ */ /* $NetBSD: ite_et.c,v 1.12 2007/03/05 20:29:07 he Exp $ */
/* /*
* Copyright (c) 1995 Ezra Story * Copyright (c) 1995 Ezra Story
@ -36,7 +36,7 @@
#include "opt_amigacons.h" #include "opt_amigacons.h"
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ite_et.c,v 1.11 2006/06/07 10:07:03 he Exp $"); __KERNEL_RCSID(0, "$NetBSD: ite_et.c,v 1.12 2007/03/05 20:29:07 he Exp $");
#include "grfet.h" #include "grfet.h"
#if NGRFET > 0 #if NGRFET > 0
@ -68,7 +68,7 @@ void et_deinit(struct ite_softc *ip);
void et_putc(struct ite_softc *ip, int c, int dy, int dx, int mode); void et_putc(struct ite_softc *ip, int c, int dy, int dx, int mode);
void et_clear(struct ite_softc *ip, int sy, int sx, int h, int w); void et_clear(struct ite_softc *ip, int sy, int sx, int h, int w);
void et_scroll(struct ite_softc *ip, int sy, int sx, int count, int dir); void et_scroll(struct ite_softc *ip, int sy, int sx, int count, int dir);
static void etbcopy(const void *src, void *dst, size_t len); static void etbcopy(const volatile void *src, volatile void *dst, size_t len);
/* /*
@ -155,7 +155,7 @@ void
et_putc(struct ite_softc *ip, int c, int dy, int dx, int mode) et_putc(struct ite_softc *ip, int c, int dy, int dx, int mode)
{ {
volatile unsigned char *ba = ip->grf->g_regkva; volatile unsigned char *ba = ip->grf->g_regkva;
unsigned char *fb = ip->grf->g_fbkva; volatile unsigned char *fb = ip->grf->g_fbkva;
unsigned char attr; unsigned char attr;
volatile unsigned char *cp; volatile unsigned char *cp;
@ -182,14 +182,14 @@ et_clear(struct ite_softc *ip, int sy, int sx, int h, int w)
* which describe continuous regions. For a VT200 terminal, * which describe continuous regions. For a VT200 terminal,
* this is safe behavior. * this is safe behavior.
*/ */
unsigned char *src, *dst; volatile unsigned char *src, *dst;
volatile unsigned char *ba = ip->grf->g_regkva; volatile unsigned char *ba = ip->grf->g_regkva;
int len; int len;
if (ip->flags & ITE_INGRF) if (ip->flags & ITE_INGRF)
return; return;
dst = ip->grf->g_fbkva + (sy * ip->cols) + sx; dst = (volatile unsigned char*)ip->grf->g_fbkva + (sy * ip->cols) + sx;
src = dst + (ip->rows*ip->cols); src = dst + (ip->rows*ip->cols);
len = w*h; len = w*h;
@ -203,13 +203,13 @@ et_clear(struct ite_softc *ip, int sy, int sx, int h, int w)
void void
et_scroll(struct ite_softc *ip, int sy, int sx, int count, int dir) et_scroll(struct ite_softc *ip, int sy, int sx, int count, int dir)
{ {
unsigned char *fb; volatile unsigned char *fb;
volatile unsigned char *ba = ip->grf->g_regkva; volatile unsigned char *ba = ip->grf->g_regkva;
if (ip->flags & ITE_INGRF) if (ip->flags & ITE_INGRF)
return; return;
fb = ip->grf->g_fbkva + sy * ip->cols; fb = (volatile unsigned char*)ip->grf->g_fbkva + sy * ip->cols;
SetTextPlane(ba, 0x00); SetTextPlane(ba, 0x00);
switch (dir) { switch (dir) {
@ -250,14 +250,14 @@ et_scroll(struct ite_softc *ip, int sy, int sx, int count, int dir)
} }
static void etbcopy(const void *src, void *dst, size_t len) static void etbcopy(const volatile void *src, volatile void *dst, size_t len)
{ {
int i; int i;
char *cdst; volatile char *cdst;
const char *csrc; volatile const char *csrc;
cdst = (char*)dst; cdst = (volatile char*)dst;
csrc = (const char*)src; csrc = (volatile const char*)src;
if (csrc == cdst) if (csrc == cdst)
return; return;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ite_rh.c,v 1.10 2002/01/28 09:57:00 aymeric Exp $ */ /* $NetBSD: ite_rh.c,v 1.11 2007/03/05 20:29:07 he Exp $ */
/* /*
* Copyright (c) 1994 Markus Wild * Copyright (c) 1994 Markus Wild
@ -33,7 +33,7 @@
#include "opt_retina.h" #include "opt_retina.h"
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ite_rh.c,v 1.10 2002/01/28 09:57:00 aymeric Exp $"); __KERNEL_RCSID(0, "$NetBSD: ite_rh.c,v 1.11 2007/03/05 20:29:07 he Exp $");
#include "grfrh.h" #include "grfrh.h"
#if NGRFRH > 0 #if NGRFRH > 0
@ -218,7 +218,7 @@ void
rh_scroll(struct ite_softc *ip, int sy, int sx, int count, int dir) rh_scroll(struct ite_softc *ip, int sy, int sx, int count, int dir)
{ {
#ifndef RETINA_SPEED_HACK #ifndef RETINA_SPEED_HACK
u_long * fb = (u_long *) ip->grf->g_fbkva; u_long *fb = (u_long *)__UNVOLATILE(ip->grf->g_fbkva);
#endif #endif
rh_cursor(ip, ERASE_CURSOR); rh_cursor(ip, ERASE_CURSOR);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ite_rt.c,v 1.21 2007/03/04 05:59:23 christos Exp $ */ /* $NetBSD: ite_rt.c,v 1.22 2007/03/05 20:29:07 he Exp $ */
/* /*
* Copyright (c) 1993 Markus Wild * Copyright (c) 1993 Markus Wild
@ -32,7 +32,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ite_rt.c,v 1.21 2007/03/04 05:59:23 christos Exp $"); __KERNEL_RCSID(0, "$NetBSD: ite_rt.c,v 1.22 2007/03/05 20:29:07 he Exp $");
#include "grfrt.h" #include "grfrt.h"
#if NGRFRT > 0 #if NGRFRT > 0
@ -398,7 +398,7 @@ retina_deinit(struct ite_softc *ip)
void void
retina_putc(struct ite_softc *ip, int c, int dy, int dx, int mode) retina_putc(struct ite_softc *ip, int c, int dy, int dx, int mode)
{ {
volatile void *fb = ip->grf->g_fbkva; volatile char *fb = (volatile char*)ip->grf->g_fbkva;
register u_char attr; register u_char attr;
attr = (mode & ATTR_INV) ? 0x21 : 0x10; attr = (mode & ATTR_INV) ? 0x21 : 0x10;
@ -414,7 +414,7 @@ retina_putc(struct ite_softc *ip, int c, int dy, int dx, int mode)
void void
retina_clear(struct ite_softc *ip, int sy, int sx, int h, int w) retina_clear(struct ite_softc *ip, int sy, int sx, int h, int w)
{ {
u_short * fb = (u_short *) ip->grf->g_fbkva; volatile u_short * fb = (volatile u_short *) ip->grf->g_fbkva;
short x; short x;
const u_short fillval = 0x2010; const u_short fillval = 0x2010;
@ -440,7 +440,7 @@ retina_scroll(struct ite_softc *ip, int sy, int sx, int count, int dir)
u_long *fb; u_long *fb;
ba = ip->grf->g_regkva; ba = ip->grf->g_regkva;
fb = (u_long *)ip->grf->g_fbkva; fb = (u_long *)__UNVOLATILE(ip->grf->g_fbkva);
retina_cursor(ip, ERASE_CURSOR); retina_cursor(ip, ERASE_CURSOR);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ite_ul.c,v 1.11 2002/01/28 09:57:00 aymeric Exp $ */ /* $NetBSD: ite_ul.c,v 1.12 2007/03/05 20:29:07 he Exp $ */
/*- /*-
* Copyright (c) 1995 The NetBSD Foundation, Inc. * Copyright (c) 1995 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ite_ul.c,v 1.11 2002/01/28 09:57:00 aymeric Exp $"); __KERNEL_RCSID(0, "$NetBSD: ite_ul.c,v 1.12 2007/03/05 20:29:07 he Exp $");
#include "grful.h" #include "grful.h"
#if NGRFUL > 0 #if NGRFUL > 0
@ -146,14 +146,14 @@ grful_iteinit(struct grf_softc *gp)
void void
ulowell_init(struct ite_softc *ip) ulowell_init(struct ite_softc *ip)
{ {
struct gspregs *ba; volatile struct gspregs *ba;
u_int16_t *sp; u_int16_t *sp;
u_int16_t cmd[8]; u_int16_t cmd[8];
int i; int i;
ba = (struct gspregs *) ip->grf->g_regkva; ba = (volatile struct gspregs *) ip->grf->g_regkva;
ip->font = kernel_font; ip->font = kernel_font;
ip->font_lo = kernel_font_lo; ip->font_lo = kernel_font_lo;
@ -232,10 +232,10 @@ ulowell_init(struct ite_softc *ip)
void ulowell_cursor(struct ite_softc *ip, int flag) void ulowell_cursor(struct ite_softc *ip, int flag)
{ {
struct gspregs *ba; volatile struct gspregs *ba;
u_int16_t cmd[7]; u_int16_t cmd[7];
ba = (struct gspregs *)ip->grf->g_regkva; ba = (volatile struct gspregs *)ip->grf->g_regkva;
if (flag == END_CURSOROPT) if (flag == END_CURSOROPT)
--ip->cursor_opt; --ip->cursor_opt;
@ -306,11 +306,11 @@ void ulowell_cursor(struct ite_softc *ip, int flag)
static void screen_up(struct ite_softc *ip, int top, int bottom, int lines) static void screen_up(struct ite_softc *ip, int top, int bottom, int lines)
{ {
struct gspregs *ba; volatile struct gspregs *ba;
u_int16_t cmd[7]; u_int16_t cmd[7];
ba = (struct gspregs *)ip->grf->g_regkva; ba = (volatile struct gspregs *)ip->grf->g_regkva;
#ifdef DEBUG_UL #ifdef DEBUG_UL
printf("screen_up %d %d %d ->",top,bottom,lines); printf("screen_up %d %d %d ->",top,bottom,lines);
@ -340,11 +340,11 @@ static void screen_up(struct ite_softc *ip, int top, int bottom, int lines)
static void screen_down(struct ite_softc *ip, int top, int bottom, int lines) static void screen_down(struct ite_softc *ip, int top, int bottom, int lines)
{ {
struct gspregs *ba; volatile struct gspregs *ba;
u_int16_t cmd[7]; u_int16_t cmd[7];
ba = (struct gspregs *)ip->grf->g_regkva; ba = (volatile struct gspregs *)ip->grf->g_regkva;
#ifdef DEBUG_UL #ifdef DEBUG_UL
printf("screen_down %d %d %d ->",top,bottom,lines); printf("screen_down %d %d %d ->",top,bottom,lines);
@ -381,10 +381,10 @@ void ulowell_deinit(struct ite_softc *ip)
void ulowell_putc(struct ite_softc *ip, int c, int dy, int dx, int mode) void ulowell_putc(struct ite_softc *ip, int c, int dy, int dx, int mode)
{ {
struct gspregs *ba; volatile struct gspregs *ba;
u_int16_t cmd[8]; u_int16_t cmd[8];
ba = (struct gspregs *)ip->grf->g_regkva; ba = (volatile struct gspregs *)ip->grf->g_regkva;
cmd[0] = GCMD_CHAR; cmd[0] = GCMD_CHAR;
cmd[1] = c & 0xff; cmd[1] = c & 0xff;
@ -399,14 +399,14 @@ void ulowell_putc(struct ite_softc *ip, int c, int dy, int dx, int mode)
void ulowell_clear(struct ite_softc *ip, int sy, int sx, int h, int w) void ulowell_clear(struct ite_softc *ip, int sy, int sx, int h, int w)
{ {
/* XXX TBD */ /* XXX TBD */
struct gspregs * ba; volatile struct gspregs * ba;
u_int16_t cmd[7]; u_int16_t cmd[7];
#ifdef DEBUG_UL #ifdef DEBUG_UL
printf("ulowell_clear %d %d %d %d ->",sy,sx,h,w); printf("ulowell_clear %d %d %d %d ->",sy,sx,h,w);
#endif #endif
ba = (struct gspregs *)ip->grf->g_regkva; ba = (volatile struct gspregs *)ip->grf->g_regkva;
cmd[0] = GCMD_FILL; cmd[0] = GCMD_FILL;
cmd[1] = 0x0; /* XXX */ cmd[1] = 0x0; /* XXX */
@ -421,10 +421,10 @@ void ulowell_clear(struct ite_softc *ip, int sy, int sx, int h, int w)
void ulowell_scroll(struct ite_softc *ip, int sy, int sx, int count, int dir) void ulowell_scroll(struct ite_softc *ip, int sy, int sx, int count, int dir)
{ {
struct gspregs *ba; volatile struct gspregs *ba;
u_int16_t cmd[7]; u_int16_t cmd[7];
ba = (struct gspregs *)ip->grf->g_regkva; ba = (volatile struct gspregs *)ip->grf->g_regkva;
#ifdef DEBUG_UL #ifdef DEBUG_UL
printf("ulowell_scroll %d %d %d %d ->",sy,sx,count,dir); printf("ulowell_scroll %d %d %d %d ->",sy,sx,count,dir);