/* * 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 * or http://www.opensolaris.org/os/licensing. * 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. */ #ifndef _SYS_VGAREG_H #define _SYS_VGAREG_H #ifdef __cplusplus extern "C" { #endif #define VGA_REG_ADDR 0x3c0 #define VGA_REG_SIZE 0x20 #define VGA_MEM_ADDR 0xa0000 #define VGA_MEM_SIZE 0x20000 #define VGA_TEXT_COLS 80 #define VGA_TEXT_ROWS 25 /* * VGA frame buffer hardware definitions. */ #define VGA8_DEPTH 8 #define VGA8_CMAP_ENTRIES 256 #define VGA_TEXT_CMAP_ENTRIES 64 /* * General VGA registers * These are relative to their register set, which * the 3c0-3df set. */ #define VGA_ATR_AD 0x00 #define VGA_ATR_DATA 0x01 #define VGA_MISC_W 0x02 #define VGA_SEQ_ADR 0x04 #define VGA_SEQ_DATA 0x05 #define VGA_DAC_BASE 0x06 #define VGA_DAC_AD_MK 0x06 #define VGA_DAC_RD_AD 0x07 #define VGA_DAC_STS 0x07 #define VGA_DAC_WR_AD 0x08 #define VGA_DAC_DATA 0x09 #define VGA_MISC_R 0x0c #define VGA_GRC_ADR 0x0e #define VGA_GRC_DATA 0x0f #define VGA_CRTC_ADR 0x14 #define VGA_CRTC_DATA 0x15 #define CGA_STAT 0x1a /* * Attribute controller index bits */ #define VGA_ATR_ENB_PLT 0x20 /* * Miscellaneous output bits */ #define VGA_MISC_IOA_SEL 0x01 #define VGA_MISC_ENB_RAM 0x02 #define VGA_MISC_VCLK 0x0c #define VGA_MISC_VCLK0 0x00 #define VGA_MISC_VCLK1 0x04 #define VGA_MISC_VCLK2 0x08 #define VGA_MISC_VCLK3 0x0c #define VGA_MISC_PGSL 0x20 #define VGA_MISC_HSP 0x40 #define VGA_MISC_VSP 0x80 #define VGA_MISC_IS1_VR 0x08 /* Vertical Retrace */ #define VGA_MISC_IS1_DD 0x01 /* Display Disabled */ /* * CRT Controller registers */ #define VGA_CRTC_H_TOTAL 0x00 #define VGA_CRTC_H_D_END 0x01 #define VGA_CRTC_S_H_BLNK 0x02 #define VGA_CRTC_E_H_BLNK 0x03 #define VGA_CRTC_E_H_BLNK_PUT_EHB(n) \ ((n)&0x1f) #define VGA_CRTC_S_H_SY_P 0x04 #define VGA_CRTC_E_H_SY_P 0x05 #define VGA_CRTC_E_H_SY_P_HOR_SKW_SHIFT 5 #define VGA_CRTC_E_H_SY_P_HOR_SKW 0x60 #define VGA_CRTC_E_H_SY_P_EHB5 7 #define VGA_CRTC_E_H_SY_P_PUT_HOR_SKW(skew) \ ((skew)<>5)&1)<>8)&1)<>9)&1)<>8)&1)<>9)&1)<>8)&1)<>9)&1)<>8)&1)<>8)&1)<>9)&1)<>9)&1)<