graphics.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/bootconf.h>
#include <vm/seg_kmem.h>
#define VIDEOMEM 0xa0000
static int graphics_mode;
static int cursor_y = 400;
static int cursor_x = 210;
static kthread_t *progressbar_tid;
static kcondvar_t pbar_cv;
static int videomem_size;
static void
{
}
static void
{
}
static void
progressbar_show(void)
{
int i, j, k, offset;
for (i = 0; i < 4; i++) {
mapmask(1 << i);
for (j = 0; j < 16; j++) { /* bar height 16 pixel */
for (k = 0; k < 32; k++, ptr++)
}
}
mapmask(15);
}
/*
* Initialize a rectangle area for progress bar
*
* Multiboot has initialized graphics mode to 640x480
* with 16 colors.
*/
void
{
int i;
char cons[10];
/* see if we are in graphics mode */
return;
return;
graphics_mode = 1;
bitmask(0xff);
for (i = 0; i < 32; i++) {
}
}
static void
{
static int limit = 0;
int i;
if (limit == 0) { /* reset */
for (i = 0; i < 32; i++)
}
limit++;
if (limit == 32)
limit = 0;
}
/*ARGSUSED*/
static void
progressbar_thread(void *arg)
{
while (graphics_mode) {
}
}
void
progressbar_start(void)
{
extern pri_t minclsyspri;
if (graphics_mode == 0)
return;
/* map video memory to kernel heap */
graphics_mode = 0;
return;
}
}
void
progressbar_stop(void)
{
if (graphics_mode == 0)
return;
graphics_mode = 0;
if (progressbar_tid != NULL)
/* unmap video memory */
}