Esempio n. 1
0
void
sc_vtb_ins(sc_vtb_t *vtb, int at, int count, int c, int attr)
{
    vm_offset_t p1, p2;

    p1 = vtb_pointer(vtb, at);
    if (at + count > vtb->vtb_size) {
        count = vtb->vtb_size - at;
    } else {
        p2 = vtb_pointer(vtb, at + count);
        if (vtb->vtb_type == VTB_FRAMEBUFFER) {
            bcopy_io(p1, p2,
                     (vtb->vtb_size - at - count)*sizeof(u_int16_t));
            bcopy_io(p1 + ATTR_OFFSET_FB,
                     p2 + ATTR_OFFSET_FB,
                     (vtb->vtb_size - at - count)*sizeof(u_int16_t));
        } else {
            bcopy((void *)p1, (void *)p2,
                  (vtb->vtb_size - at - count)*sizeof(u_int16_t));
            bcopy((void *)(p1 + attr_offset(vtb)),
                  (void *)(p2 + attr_offset(vtb)),
                  (vtb->vtb_size - at - count)*sizeof(u_int16_t));
        }
    }
    if (vtb->vtb_type == VTB_FRAMEBUFFER) {
        fillw_io(c, p1, count);
        fillw_io(at2pc98(attr), p1 + ATTR_OFFSET_FB, count);
    } else {
        fillw(c, (void *)p1, count);
        fillw(at2pc98(attr), (void *)(p1 + attr_offset(vtb)), count);
    }
}
Esempio n. 2
0
void
sc_vtb_delete(sc_vtb_t *vtb, int at, int count, int c, int attr)
{
    int len;
    vm_offset_t p1, p2;

    if (at + count > vtb->vtb_size)
        count = vtb->vtb_size - at;
    len = vtb->vtb_size - at - count;
    if (len > 0) {
        p1 = vtb_pointer(vtb, at + count);
        p2 = vtb_pointer(vtb, at);
        if (vtb->vtb_type == VTB_FRAMEBUFFER) {
            bcopy_io(p1, p2, len*sizeof(u_int16_t));
            bcopy_io(p1 + ATTR_OFFSET_FB,
                     p2 + ATTR_OFFSET_FB,
                     len*sizeof(u_int16_t));
        } else {
            bcopy((void *)p1, (void *)p2, len*sizeof(u_int16_t));
            bcopy((void *)(p1 + attr_offset(vtb)),
                  (void *)(p2 + attr_offset(vtb)),
                  len*sizeof(u_int16_t));
        }
    }
    p1 = vtb_pointer(vtb, at + len);
    if (vtb->vtb_type == VTB_FRAMEBUFFER) {
        fillw_io(c, p1, vtb->vtb_size - at - len);
        fillw_io(at2pc98(attr), p1 + ATTR_OFFSET_FB,
                 vtb->vtb_size - at - len);
    } else {
        fillw(c, (void *)p1, vtb->vtb_size - at - len);
        fillw(at2pc98(attr), (void *)(p1 + attr_offset(vtb)),
              vtb->vtb_size - at - len);
    }
}
Esempio n. 3
0
void
sc_vtb_clear(sc_vtb_t *vtb, int c, int attr)
{
    vm_offset_t p = vtb_pointer(vtb, 0);

    if (vtb->vtb_type == VTB_FRAMEBUFFER) {
        fillw_io(c, p, vtb->vtb_size);
        fillw_io(at2pc98(attr), p + ATTR_OFFSET_FB, vtb->vtb_size);
    } else {
        fillw(c, (void *)p, vtb->vtb_size);
        fillw(at2pc98(attr), (void *)(p + attr_offset(vtb)),
              vtb->vtb_size);
    }
}
Esempio n. 4
0
void
sc_vtb_delete(sc_vtb_t *vtb, int at, int count, int c, int attr)
{
	int len;

	if (at + count > vtb->vtb_size)
		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);
}
Esempio n. 5
0
void
sc_vtb_erase(sc_vtb_t *vtb, int at, int count, int c, int attr)
{
    vm_offset_t p;

    if (at + count > vtb->vtb_size)
        count = vtb->vtb_size - at;
    p = vtb_pointer(vtb, at);
    if (vtb->vtb_type == VTB_FRAMEBUFFER) {
        fillw_io(c, p, count);
        fillw_io(at2pc98(attr), p + ATTR_OFFSET_FB, count);
    } else {
        fillw(c, (void *)p, count);
        fillw(at2pc98(attr), (void *)(p + attr_offset(vtb)), count);
    }
}
Esempio n. 6
0
void
sc_vtb_delete(sc_vtb_t *vtb, int at, int count, int c, int attr)
{
	int len;

	if (at + count > vtb->vtb_size)
		count = vtb->vtb_size - at;
	len = vtb->vtb_size - at - count;
	if (len > 0) {
		if (vtb->vtb_type == VTB_FRAMEBUFFER) {
			bcopy_io(vtb->vtb_buffer + at + count,
				 vtb->vtb_buffer + at,
				 len*sizeof(uint16_t)); 
		} else {
			bcopy(vtb->vtb_buffer + at + count,
			      vtb->vtb_buffer + at,
			      len*sizeof(uint16_t)); 
		}
	}
	if (vtb->vtb_type == VTB_FRAMEBUFFER)
		fillw_io(attr | c, vtb->vtb_buffer + at + len,
			 vtb->vtb_size - at - len);
	else
		fillw(attr | c, vtb->vtb_buffer + at + len,
		      vtb->vtb_size - at - len);
}
Esempio n. 7
0
void
sc_vtb_clear(sc_vtb_t *vtb, int c, int attr)
{
	if (vtb->vtb_type == VTB_FRAMEBUFFER)
		fillw_io(attr | c, vtb->vtb_buffer, vtb->vtb_size);
	else
		fillw(attr | c, vtb->vtb_buffer, vtb->vtb_size);
}
Esempio n. 8
0
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);
}
Esempio n. 9
0
void
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;
	if (vtb->vtb_type == VTB_FRAMEBUFFER)
		fillw_io(attr | c, vtb->vtb_buffer + at, count);
	else
		fillw(attr | c, vtb->vtb_buffer + at, count);
}
Esempio n. 10
0
void
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);
}
Esempio n. 11
0
void
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 {
		if (vtb->vtb_type == VTB_FRAMEBUFFER) {
			bcopy_io(vtb->vtb_buffer + at,
				 vtb->vtb_buffer + at + count,
				 (vtb->vtb_size - at - count)*sizeof(uint16_t));
		} else {
			bcopy(vtb->vtb_buffer + at,
			      vtb->vtb_buffer + at + count,
			      (vtb->vtb_size - at - count)*sizeof(uint16_t)); 
		}
	}
	if (vtb->vtb_type == VTB_FRAMEBUFFER)
		fillw_io(attr | c, vtb->vtb_buffer + at, count);
	else
		fillw(attr | c, vtb->vtb_buffer + at, count);
}
Esempio n. 12
0
void
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);
}