1 /*- 2 * Copyright (c) 1999 Matthew N. Dodd <winter@jurai.net> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright 11 * notice, this list of conditions and the following disclaimer in the 12 * documentation and/or other materials provided with the distribution. 13 * 14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * 26 * $FreeBSD$ 27 */ 28 29 /* 30 * Standardized MCA configuration information 31 */ 32 33 #define MCA_MAX_SLOTS 8 /* max number of slots per bus */ 34 #define MCA_MB_SCSI_SLOT 8 35 #define MCA_MB_VIDEO_SLOT 9 36 #define MCA_MAX_ADAPTERS 9 37 38 /* 39 * When an ADF file talks about a POS register 40 * its not talking about the same index we are 41 * so provide this to convert ADF pos register 42 * offsets to our register offsets. (Since 43 * to us, POS0 and POS1 are just 2 more registers 44 */ 45 46 #define MCA_ADP_POS(pos) (pos + 2) 47 48 #define MCA_POS0 0 /* low byte of board ID */ 49 #define MCA_POS1 1 /* high byte of board ID */ 50 #define MCA_POS2 2 51 # define MCA_POS2_ENABLE 0x01 /* POS2, hi => adapter enabled */ 52 #define MCA_POS3 3 53 #define MCA_POS4 4 54 #define MCA_POS5 5 55 # define MCA_POS5_CHCK_STAT 0x40 /* lo => CHCK status available */ 56 # define MCA_POS5_CHCK 0x80 /* lo => adapter CHCK signal */ 57 #define MCA_POS6 6 /* low byte of CHCK status */ 58 #define MCA_POS7 7 /* high byte of CHCK status */ 59 60 /* 61 * MCA register addresses for IBM PS/2 62 */ 63 64 #define MCA_SYS_CTL_A_REG 0x92 /* PS/2 System Control Port A */ 65 #define MCA_SYS_CTL_B_REG 0x60 /* PS/2 System Control Port B */ 66 #define MCA_ARB_REG 0x90 /* MCA Arbitration port */ 67 #define MCA_CSF_REG 0x91 /* MCA Card Select Feedback */ 68 69 /* 70 * 0x96, 0x97 POS Registers 71 * 0x100 - 0x107 POS Registers 72 */ 73 74 #define MCA_MB_SETUP_REG 0x94 /* Motherboard setup register */ 75 # define MCA_MB_SETUP_DIS 0xff /* Disable motherboard setup */ 76 # define MCA_MB_SETUP_VIDEO 0xdf 77 # define MCA_MB_SETUP_SCSI 0xf7 /* Pri. SCSI setup reg */ 78 # define MCA_MB_SETUP_SCSI_ALT 0xfd /* Alt. SCSI setup reg */ 79 80 #define MCA_ADAP_SETUP_REG 0x96 /* Adapter setup register */ 81 # define MCA_ADAP_SETUP_DIS 0x0 /* Disable adapter setup */ 82 # define MCA_ADAP_SET 0x08 /* Adapter setup mode */ 83 # define MCA_ADAP_CHR 0x80 /* Adapter channel reset */ 84 #define MCA_POS_REG(n) (0x100+(n)) /* POS registers 0-7 */ 85