pkg: ship usr/lib/security/amd64/*.so links
[unleashed.git] / include / sys / vgasubr.h
blob448079437c895f455e7b0ecb145ec03c4b23195b
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
20 * CDDL HEADER END
23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #ifndef _SYS_VGASUBR_H
28 #define _SYS_VGASUBR_H
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
34 #ifdef _KERNEL
36 struct vgaregmap {
37 uint8_t *addr;
38 ddi_acc_handle_t handle;
39 boolean_t mapped;
41 typedef struct vgaregmap *vgaregmap_t;
43 #elif defined(_STANDALONE)
45 typedef uint_t vgaregmap_t;
47 #endif
49 extern int vga_get_reg(vgaregmap_t reg, int i);
50 extern void vga_set_reg(vgaregmap_t reg, int i, int v);
51 extern int vga_get_crtc(vgaregmap_t reg, int i);
52 extern void vga_set_crtc(vgaregmap_t reg, int i, int v);
53 extern int vga_get_seq(vgaregmap_t reg, int i);
54 extern void vga_set_seq(vgaregmap_t reg, int i, int v);
55 extern int vga_get_grc(vgaregmap_t reg, int i);
56 extern void vga_set_grc(vgaregmap_t reg, int i, int v);
57 extern int vga_get_atr(vgaregmap_t reg, int i);
58 extern void vga_set_atr(vgaregmap_t reg, int i, int v);
59 extern void vga_put_cmap(vgaregmap_t reg,
60 int index, unsigned char r, unsigned char g, unsigned char b);
61 extern void vga_get_cmap(vgaregmap_t reg,
62 int index, unsigned char *r, unsigned char *g, unsigned char *b);
63 extern void vga_get_hardware_settings(vgaregmap_t reg,
64 int *width, int *height);
65 extern void vga_set_indexed(vgaregmap_t reg, int indexreg,
66 int datareg, unsigned char index, unsigned char val);
67 extern int vga_get_indexed(vgaregmap_t reg, int indexreg,
68 int datareg, unsigned char index);
70 #define VGA_MISC_TEXT 0x67
71 #define NUM_CRTC_REG 25
72 #define NUM_SEQ_REG 5
73 #define NUM_GRC_REG 9
74 #define NUM_ATR_REG 21
76 extern unsigned char VGA_ATR_TEXT[NUM_ATR_REG];
77 extern unsigned char VGA_SEQ_TEXT[NUM_SEQ_REG];
78 extern unsigned char VGA_CRTC_TEXT[NUM_CRTC_REG];
79 extern unsigned char VGA_GRC_TEXT[NUM_GRC_REG];
80 extern unsigned char VGA_TEXT_PALETTES[64][3];
82 #if defined(DEBUG)
83 extern void vga_dump_regs(vgaregmap_t reg,
84 int maxseq, int maxcrtc, int maxatr, int maxgrc);
85 #endif
88 #ifdef __cplusplus
90 #endif
92 #endif /* _SYS_VGASUBR_H */