Exemple #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);
    }
}
Exemple #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);
    }
}
Exemple #3
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);
}
Exemple #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) {
		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);
}
Exemple #5
0
void
sc_vtb_move(sc_vtb_t *vtb, int from, int to, int count)
{
    vm_offset_t p1, p2;

    if (from + count > vtb->vtb_size)
        count = vtb->vtb_size - from;
    if (to + count > vtb->vtb_size)
        count = vtb->vtb_size - to;
    if (count <= 0)
        return;

    p1 = vtb_pointer(vtb, from);
    p2 = vtb_pointer(vtb, to);
    if (vtb->vtb_type == VTB_FRAMEBUFFER) {
        bcopy_io(p1, p2, count*sizeof(u_int16_t));
        bcopy_io(p1 + ATTR_OFFSET_FB,
                 p2 + ATTR_OFFSET_FB, count*sizeof(u_int16_t));
    } else {
        bcopy((void *)p1, (void *)p2, count*sizeof(u_int16_t));
        bcopy((void *)(p1 + attr_offset(vtb)),
              (void *)(p2 + attr_offset(vtb)), count*sizeof(u_int16_t));
    }
}
Exemple #6
0
void
sc_vtb_move(sc_vtb_t *vtb, int from, int to, int count)
{
	if (from + count > vtb->vtb_size)
		count = vtb->vtb_size - from;
	if (to + count > vtb->vtb_size)
		count = vtb->vtb_size - to;
	if (count <= 0)
		return;
	if (vtb->vtb_type == VTB_FRAMEBUFFER) {
		bcopy_io(vtb->vtb_buffer + from, vtb->vtb_buffer + to,
			 count*sizeof(uint16_t)); 
	} else {
		bcopy(vtb->vtb_buffer + from, vtb->vtb_buffer + to,
		      count*sizeof(uint16_t));
	}
}
Exemple #7
0
void
sc_vtb_move(sc_vtb_t *vtb, int from, int to, int count)
{
	if (from + count > vtb->vtb_size)
		count = vtb->vtb_size - from;
	if (to + count > vtb->vtb_size)
		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));
}
Exemple #8
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);
}
Exemple #9
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);
}