/*
* 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 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Support routines for VGA drivers
*/
+ (((vga_get_crtc(c, VGA_CRTC_OVFL_REG) >> \
+ (((vga_get_crtc(c, VGA_CRTC_OVFL_REG) >> \
#define GET_VERT_X2(c) \
0x5f, 0x4f, 0x50, 0x82, 0x55, 0x81, 0xbf, 0x1f,
0x00, 0x4f, 0x0d, 0x0e, 0x00, 0x00, 0x05, 0x00,
0x9c, 0x8e, 0x8f, 0x28, 0x1f, 0x96, 0xb9, 0xa3,
0xff };
0x03, 0x00, 0x03, 0x00, 0x02 };
0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x00, 0xff };
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x14, 0x07,
0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
0x0c, 0x00, 0x0f, 0x08, 0x00 };
void
{
}
int
{
}
void
{
}
int
{
}
void
{
}
int
{
}
void
{
}
int
{
}
void
{
}
int
{
int ret;
return (ret);
}
void
{
}
void
int indexreg,
int datareg,
unsigned char index,
unsigned char val)
{
}
int
int indexreg,
int datareg,
unsigned char index)
{
}
/*
* VGA DAC access functions
* Note: These assume a VGA-style 6-bit DAC. Some DACs are 8 bits
* wide. These functions are not appropriate for those DACs.
*/
void
int index,
unsigned char r,
unsigned char g,
unsigned char b)
{
}
void
int index,
unsigned char *r,
unsigned char *g,
unsigned char *b)
{
}
#ifdef DEBUG
void
{
int i, j;
printf("Sequencer regs:\n");
for (i = 0; i < maxseq; i += 0x10) {
printf("%2x: ", i);
for (j = 0; j < 0x08; j++) {
}
printf("- ");
for (; j < 0x10; j++) {
}
printf("\n");
}
printf("\nCRT Controller regs:\n");
for (i = 0; i < maxcrtc; i += 0x10) {
printf("%2x: ", i);
for (j = 0; j < 0x08; j++) {
}
printf("- ");
for (; j < 0x10; j++) {
}
printf("\n");
}
printf("\nAttribute Controller regs:\n");
for (i = 0; i < maxatr; i += 0x10) {
printf("%2x: ", i);
for (j = 0; j < 0x08; j++) {
}
printf("- ");
for (; j < 0x10; j++) {
}
printf("\n");
}
printf("\nGraphics Controller regs:\n");
for (i = 0; i < maxgrc; i += 0x10) {
printf("%2x: ", i);
for (j = 0; j < 0x08; j++) {
}
printf("- ");
for (; j < 0x10; j++) {
}
printf("\n");
}
}
#endif /* DEBUG */
/*
* VGA 80X25 text mode standard palette
*/
{ 0x00, 0x00, 0x00 },
{ 0x00, 0x00, 0x2A },
{ 0x00, 0x2A, 0x00 },
{ 0x00, 0x2A, 0x2A },
{ 0x2A, 0x00, 0x00 },
{ 0x2A, 0x00, 0x2A },
{ 0x2A, 0x2A, 0x00 },
{ 0x2A, 0x2A, 0x2A },
{ 0x00, 0x00, 0x15 },
{ 0x00, 0x00, 0x3F },
{ 0x00, 0x2A, 0x15 },
{ 0x00, 0x2A, 0x3F },
{ 0x2A, 0x00, 0x15 },
{ 0x2A, 0x00, 0x3F },
{ 0x2A, 0x2A, 0x15 },
{ 0x2A, 0x2A, 0x3F },
{ 0x00, 0x15, 0x00 },
{ 0x00, 0x15, 0x2A },
{ 0x00, 0x3F, 0x00 },
{ 0x00, 0x3F, 0x2A },
{ 0x2A, 0x15, 0x00 },
{ 0x2A, 0x15, 0x2A },
{ 0x2A, 0x3F, 0x00 },
{ 0x2A, 0x3F, 0x2A },
{ 0x00, 0x15, 0x15 },
{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