graphics.c revision 843e19887f64dde75055cf8842fc4db2171eff45
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (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 2007 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 = 309;
static int cursor_x = 136;
#define BAR_STEPS 46
static kthread_t *progressbar_tid;
static kcondvar_t pbar_cv;
static int videomem_size;
/* select the plane(s) to draw to */
static void
{
}
static void
{
}
static void
progressbar_show(void)
{
int j, k, offset;
bitmask(0xff);
for (j = 0; j < 4; j++) { /* bar height: 4 pixels */
}
bitmask(0x00);
}
/*
* 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;
for (i = 0; i < BAR_STEPS; i++) {
bar[i] = 0x00;
}
}
static void
{
static int limit = 0;
if (limit > 3)
else
limit++;
limit = 0;
}
/*ARGSUSED*/
static void
progressbar_thread(void *arg)
{
while (graphics_mode) {
}
}
void
progressbar_start(void)
{
#if !defined(__xpv)
extern pri_t minclsyspri;
if (graphics_mode == 0)
return;
/* map video memory to kernel heap */
graphics_mode = 0;
return;
}
#endif
}
void
progressbar_stop(void)
{
#if !defined(__xpv)
if (graphics_mode == 0)
return;
graphics_mode = 0;
if (progressbar_tid != NULL)
/* unmap video memory */
#endif
}