xref: /titanic_41/usr/src/uts/i86pc/sys/cram.h (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1*7c478bd9Sstevel@tonic-gate /*
2*7c478bd9Sstevel@tonic-gate  * CDDL HEADER START
3*7c478bd9Sstevel@tonic-gate  *
4*7c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*7c478bd9Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
6*7c478bd9Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
7*7c478bd9Sstevel@tonic-gate  * with the License.
8*7c478bd9Sstevel@tonic-gate  *
9*7c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
11*7c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
12*7c478bd9Sstevel@tonic-gate  * and limitations under the License.
13*7c478bd9Sstevel@tonic-gate  *
14*7c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
15*7c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
17*7c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
18*7c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
19*7c478bd9Sstevel@tonic-gate  *
20*7c478bd9Sstevel@tonic-gate  * CDDL HEADER END
21*7c478bd9Sstevel@tonic-gate  */
22*7c478bd9Sstevel@tonic-gate /*	Copyright (c) 1990, 1991 UNIX System Laboratories, Inc.	*/
23*7c478bd9Sstevel@tonic-gate /*	Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T	*/
24*7c478bd9Sstevel@tonic-gate /*	  All Rights Reserved  	*/
25*7c478bd9Sstevel@tonic-gate 
26*7c478bd9Sstevel@tonic-gate #ifndef _SYS_CRAM_H
27*7c478bd9Sstevel@tonic-gate #define	_SYS_CRAM_H
28*7c478bd9Sstevel@tonic-gate 
29*7c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
30*7c478bd9Sstevel@tonic-gate 
31*7c478bd9Sstevel@tonic-gate #include <sys/types.h>
32*7c478bd9Sstevel@tonic-gate #include <sys/ksynch.h>
33*7c478bd9Sstevel@tonic-gate #include <sys/kmem.h>
34*7c478bd9Sstevel@tonic-gate 
35*7c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
36*7c478bd9Sstevel@tonic-gate extern "C" {
37*7c478bd9Sstevel@tonic-gate #endif
38*7c478bd9Sstevel@tonic-gate 
39*7c478bd9Sstevel@tonic-gate /*
40*7c478bd9Sstevel@tonic-gate  * Defines for accessing the PC AT CMOS ram.
41*7c478bd9Sstevel@tonic-gate  */
42*7c478bd9Sstevel@tonic-gate 
43*7c478bd9Sstevel@tonic-gate #define	CMOS_ADDR	0x70	/* I/O port address for CMOS ram address */
44*7c478bd9Sstevel@tonic-gate #define	CMOS_DATA	0x71	/* I/O port address for CMOS ram data */
45*7c478bd9Sstevel@tonic-gate 
46*7c478bd9Sstevel@tonic-gate #define	DSB		0x0e	/* Diagnostic status byte ram address */
47*7c478bd9Sstevel@tonic-gate #define	SSB		0x0f	/* Shutdown status byte ram address */
48*7c478bd9Sstevel@tonic-gate #define	DDTB		0x10	/* Diskette drive type byte ram address */
49*7c478bd9Sstevel@tonic-gate #define	FDTB		0x12	/* Fixed disk type byte ram address */
50*7c478bd9Sstevel@tonic-gate #define	EB		0x14	/* Equipment byte ram address */
51*7c478bd9Sstevel@tonic-gate #define	BMLOW		0x15	/* Base mem size low byte ram address */
52*7c478bd9Sstevel@tonic-gate #define	BMHIGH		0x16	/* Base mem size high byte ram address */
53*7c478bd9Sstevel@tonic-gate #define	EMLOW		0x17	/* Expansion mem size low byte ram address */
54*7c478bd9Sstevel@tonic-gate #define	EMHIGH		0x18	/* Expansion mem size high byte ram address */
55*7c478bd9Sstevel@tonic-gate #define	DCEB		0x19	/* Drive C Extended byte ram address */
56*7c478bd9Sstevel@tonic-gate #define	DDEB		0x1a	/* Drive D Extended byte ram address */
57*7c478bd9Sstevel@tonic-gate #define	CKSUMLOW	0x2e	/* Checksum low byte ram address */
58*7c478bd9Sstevel@tonic-gate #define	CKSUMHIGH	0x2f	/* Checksum high byte ram address */
59*7c478bd9Sstevel@tonic-gate #define	EMLOW2		0x30	/* Expansion mem size low byte ram address */
60*7c478bd9Sstevel@tonic-gate #define	EMHIGH2		0x31	/* Expansion mem size high byte ram address */
61*7c478bd9Sstevel@tonic-gate #define	DCB		0x32	/* Date century byte ram address */
62*7c478bd9Sstevel@tonic-gate #define	IF		0x33	/* Information flag ram address */
63*7c478bd9Sstevel@tonic-gate 
64*7c478bd9Sstevel@tonic-gate /*
65*7c478bd9Sstevel@tonic-gate  * ioctls for accessing CMOS ram.
66*7c478bd9Sstevel@tonic-gate  */
67*7c478bd9Sstevel@tonic-gate #define	CMOSIOC	('C' << 8)
68*7c478bd9Sstevel@tonic-gate 
69*7c478bd9Sstevel@tonic-gate #define	CMOSREAD	(CMOSIOC | 0x01)
70*7c478bd9Sstevel@tonic-gate #define	CMOSWRITE	(CMOSIOC | 0x02)
71*7c478bd9Sstevel@tonic-gate 
72*7c478bd9Sstevel@tonic-gate extern unsigned char	CMOSread();
73*7c478bd9Sstevel@tonic-gate 
74*7c478bd9Sstevel@tonic-gate /* Ports for interacting with chip at */
75*7c478bd9Sstevel@tonic-gate 
76*7c478bd9Sstevel@tonic-gate #define	CMOSADDR	0x70 	/* Use to select RAM address */
77*7c478bd9Sstevel@tonic-gate #define	CMOSDATA	0x71	/* R/W data */
78*7c478bd9Sstevel@tonic-gate 
79*7c478bd9Sstevel@tonic-gate /* Number of cmos bytes */
80*7c478bd9Sstevel@tonic-gate 
81*7c478bd9Sstevel@tonic-gate #define	CMOSSIZE	0x40	/* 64 addressable bytes in chip */
82*7c478bd9Sstevel@tonic-gate 
83*7c478bd9Sstevel@tonic-gate /* Addresses of interest */
84*7c478bd9Sstevel@tonic-gate 
85*7c478bd9Sstevel@tonic-gate #define	CMOSDIAG	0x0e	/* Diagnostic Status */
86*7c478bd9Sstevel@tonic-gate #define	CMOSFDT		0x10	/* Floppy Disk Type */
87*7c478bd9Sstevel@tonic-gate #define	CMOSHDT		0x12	/* Hard Disk Type; bits 7-4 are 1st drive */
88*7c478bd9Sstevel@tonic-gate #define	CMOSEQP		0x14	/* Diskette, Video, and CoProcessor info */
89*7c478bd9Sstevel@tonic-gate #define	CMOSADF		0x2d	/* Additional flags - Compaq VDU info */
90*7c478bd9Sstevel@tonic-gate 
91*7c478bd9Sstevel@tonic-gate /* Shifts of interest */
92*7c478bd9Sstevel@tonic-gate 
93*7c478bd9Sstevel@tonic-gate #define	VID_SHFT	4	/* Shift display type bits into 0-3 */
94*7c478bd9Sstevel@tonic-gate 
95*7c478bd9Sstevel@tonic-gate /* masks of interest */
96*7c478bd9Sstevel@tonic-gate #define	CMPQVDU		0x04	/* Compaq VDU bit */
97*7c478bd9Sstevel@tonic-gate #define	CMPQDMM		0x01	/* Compaq Dual Mode Monitor bit */
98*7c478bd9Sstevel@tonic-gate 
99*7c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
100*7c478bd9Sstevel@tonic-gate }
101*7c478bd9Sstevel@tonic-gate #endif
102*7c478bd9Sstevel@tonic-gate 
103*7c478bd9Sstevel@tonic-gate #endif	/* _SYS_CRAM_H */
104