diff options
Diffstat (limited to 'sys/dev/syscons/scvtb.c')
-rw-r--r-- | sys/dev/syscons/scvtb.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/sys/dev/syscons/scvtb.c b/sys/dev/syscons/scvtb.c index 44b667b8ab82..28ea4b41666c 100644 --- a/sys/dev/syscons/scvtb.c +++ b/sys/dev/syscons/scvtb.c @@ -76,12 +76,10 @@ sc_vtb_init(sc_vtb_t *vtb, int type, int cols, int rows, void *buf, int wait) } vtb->vtb_flags |= VTB_VALID; break; -#ifndef __sparc64__ case VTB_FRAMEBUFFER: vtb->vtb_buffer = (vm_offset_t)buf; vtb->vtb_flags |= VTB_VALID; break; -#endif default: break; } @@ -121,44 +119,36 @@ sc_vtb_size(int cols, int rows) int sc_vtb_getc(sc_vtb_t *vtb, int at) { -#ifndef __sparc64__ if (vtb->vtb_type == VTB_FRAMEBUFFER) return (readw(sc_vtb_pointer(vtb, at)) & 0x00ff); else -#endif return (*(u_int16_t *)sc_vtb_pointer(vtb, at) & 0x00ff); } int sc_vtb_geta(sc_vtb_t *vtb, int at) { -#ifndef __sparc64__ if (vtb->vtb_type == VTB_FRAMEBUFFER) return (readw(sc_vtb_pointer(vtb, at)) & 0xff00); else -#endif return (*(u_int16_t *)sc_vtb_pointer(vtb, at) & 0xff00); } void sc_vtb_putc(sc_vtb_t *vtb, int at, int c, int a) { -#ifndef __sparc64__ if (vtb->vtb_type == VTB_FRAMEBUFFER) writew(sc_vtb_pointer(vtb, at), a | c); else -#endif *(u_int16_t *)sc_vtb_pointer(vtb, at) = a | c; } vm_offset_t sc_vtb_putchar(sc_vtb_t *vtb, vm_offset_t p, int c, int a) { -#ifndef __sparc64__ if (vtb->vtb_type == VTB_FRAMEBUFFER) writew(p, a | c); else -#endif *(u_int16_t *)p = a | c; return (p + sizeof(u_int16_t)); } @@ -178,18 +168,15 @@ sc_vtb_pos(sc_vtb_t *vtb, int pos, int offset) void sc_vtb_clear(sc_vtb_t *vtb, int c, int attr) { -#ifndef __sparc64__ if (vtb->vtb_type == VTB_FRAMEBUFFER) fillw_io(attr | c, sc_vtb_pointer(vtb, 0), vtb->vtb_size); else -#endif fillw(attr | c, (void *)sc_vtb_pointer(vtb, 0), vtb->vtb_size); } void sc_vtb_copy(sc_vtb_t *vtb1, int from, sc_vtb_t *vtb2, int to, int count) { -#ifndef __sparc64__ /* XXX if both are VTB_VRAMEBUFFER... */ if (vtb2->vtb_type == VTB_FRAMEBUFFER) bcopy_toio(sc_vtb_pointer(vtb1, from), @@ -200,7 +187,6 @@ sc_vtb_copy(sc_vtb_t *vtb1, int from, sc_vtb_t *vtb2, int to, int count) sc_vtb_pointer(vtb2, to), count*sizeof(u_int16_t)); else -#endif bcopy((void *)sc_vtb_pointer(vtb1, from), (void *)sc_vtb_pointer(vtb2, to), count*sizeof(u_int16_t)); @@ -216,13 +202,11 @@ sc_vtb_append(sc_vtb_t *vtb1, int from, sc_vtb_t *vtb2, int count) while (count > 0) { len = imin(count, vtb2->vtb_size - vtb2->vtb_tail); -#ifndef __sparc64__ if (vtb1->vtb_type == VTB_FRAMEBUFFER) bcopy_fromio(sc_vtb_pointer(vtb1, from), sc_vtb_pointer(vtb2, vtb2->vtb_tail), len*sizeof(u_int16_t)); else -#endif bcopy((void *)sc_vtb_pointer(vtb1, from), (void *)sc_vtb_pointer(vtb2, vtb2->vtb_tail), len*sizeof(u_int16_t)); @@ -243,11 +227,9 @@ sc_vtb_erase(sc_vtb_t *vtb, int at, int count, int c, int attr) { if (at + count > vtb->vtb_size) count = vtb->vtb_size - at; -#ifndef __sparc64__ if (vtb->vtb_type == VTB_FRAMEBUFFER) fillw_io(attr | c, sc_vtb_pointer(vtb, at), count); else -#endif fillw(attr | c, (void *)sc_vtb_pointer(vtb, at), count); } @@ -260,12 +242,10 @@ sc_vtb_move(sc_vtb_t *vtb, int from, int to, int count) count = vtb->vtb_size - to; if (count <= 0) return; -#ifndef __sparc64__ if (vtb->vtb_type == VTB_FRAMEBUFFER) bcopy_io(sc_vtb_pointer(vtb, from), sc_vtb_pointer(vtb, to), count*sizeof(u_int16_t)); else -#endif bcopy((void *)sc_vtb_pointer(vtb, from), (void *)sc_vtb_pointer(vtb, to), count*sizeof(u_int16_t)); } @@ -279,23 +259,19 @@ sc_vtb_delete(sc_vtb_t *vtb, int at, int count, int c, int attr) count = vtb->vtb_size - at; len = vtb->vtb_size - at - count; if (len > 0) { -#ifndef __sparc64__ if (vtb->vtb_type == VTB_FRAMEBUFFER) bcopy_io(sc_vtb_pointer(vtb, at + count), sc_vtb_pointer(vtb, at), len*sizeof(u_int16_t)); else -#endif bcopy((void *)sc_vtb_pointer(vtb, at + count), (void *)sc_vtb_pointer(vtb, at), len*sizeof(u_int16_t)); } -#ifndef __sparc64__ if (vtb->vtb_type == VTB_FRAMEBUFFER) fillw_io(attr | c, sc_vtb_pointer(vtb, at + len), vtb->vtb_size - at - len); else -#endif fillw(attr | c, (void *)sc_vtb_pointer(vtb, at + len), vtb->vtb_size - at - len); } @@ -306,21 +282,17 @@ sc_vtb_ins(sc_vtb_t *vtb, int at, int count, int c, int attr) if (at + count > vtb->vtb_size) count = vtb->vtb_size - at; else { -#ifndef __sparc64__ if (vtb->vtb_type == VTB_FRAMEBUFFER) bcopy_io(sc_vtb_pointer(vtb, at), sc_vtb_pointer(vtb, at + count), (vtb->vtb_size - at - count)*sizeof(u_int16_t)); else -#endif bcopy((void *)sc_vtb_pointer(vtb, at), (void *)sc_vtb_pointer(vtb, at + count), (vtb->vtb_size - at - count)*sizeof(u_int16_t)); } -#ifndef __sparc64__ if (vtb->vtb_type == VTB_FRAMEBUFFER) fillw_io(attr | c, sc_vtb_pointer(vtb, at), count); else -#endif fillw(attr | c, (void *)sc_vtb_pointer(vtb, at), count); } |