/* Copyright 1993, 1994, 1995 Hewlett-Packard Development Company, L.P. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef __CIA_H_LOADED #define __CIA_H_LOADED /* * $Id: cia.h,v 1.1.1.1 1997/10/30 23:27:14 verghese Exp $; */ /* * $Log: cia.h,v $ * Revision 1.1.1.1 1997/10/30 23:27:14 verghese * current 10/29/97 * * Revision 1.3 1995/04/20 16:37:22 cruz * Made some deletions and modifications. * * Revision 1.2 1994/12/19 18:33:02 cruz * Added some new constants. * * Revision 1.1 1994/11/23 19:49:39 cruz * Initial revision * * */ /* ******************************** WARNING ******************************* * BE EXTREMELY CAREFUL WHEN USING OFFSETS LARGER THAN 0x8000 WITH * AN "LDA" INSTRUCTION BECAUSE THEY WILL CAUSE AN UNWANTED SIGN * EXTENSION. ******************************** WARNING ******************************* */ /* ====================================================================== * = BASE ADDRESSES = * ====================================================================== * * Define the base address for registers accessing the memory * controller */ #define MC_GCR_BASE 0x874 /* General Control Register */ #define MC_GCR_BASE_SHIFT 28 /* Shift base by this # of bits */ #define MC_DIAG_BASE 0x874 /* Diagnostic Registers */ #define MC_DIAG_BASE_SHIFT 28 #define MC_PERFMON_BASE 0x874 /* Performance monitoring regs */ #define MC_PERFMON_BASE_SHIFT 28 #define MC_ERROR_BASE 0x874 /* Error Registers */ #define MC_ERROR_BASE_SHIFT 28 #define MC_MCR_BASE 0x875 /* Memory Configuration Registers*/ #define MC_MCR_BASE_SHIFT 28 #define MC_PCI_BASE 0x876 /* PCI Configuration Registers */ #define MC_PCI_BASE_SHIFT 28 /* ====================================================================== * = OFFSETS FOR THE GENERAL CONTROL REGISTERS (87.4000.0000) = * ====================================================================== */ #define MC_PCI_REV 0x80 /* Revision of CIA ASIC. */ #define MC_PCI_LAT 0xC0 /* PCI Master Latency Timer. */ #define MC_CIA_CTRL 0x100 /* CIA Control Register. */ #define MC_CIA_CNFG 0x200 /* CIA Configuration Register. */ #define MC_HAE_MEM 0x400 /* HW Address Extension (Sparse)*/ #define MC_HAE_IO 0x440 /* HW Addr. Ext. for sparse IO. */ #define MC_CFG 0x480 /* Configuration reg for bridges*/ #define MC_CACK_EN 0x600 /* Acknowledgement Control Reg. */ /* ====================================================================== * = OFFSETS FOR THE DIAGNOSTIC REGISTERS (87.4000.0000) = * ====================================================================== */ #define MC_CIA_DIAG 0x2000 /* Diagnostic control register */ #define MC_DIAG_CHECK 0x3000 /* Diagnostic check register */ /* ====================================================================== * = OFFSETS FOR THE PERFORMANCE MONITORING REGISTERS (87.4000.0000) = * ====================================================================== */ #define MC_PERF_MONITOR 0x4000 /* Performance monitor register */ #define MC_PERF_CONTROL 0x4040 /* Perf. Mon. Control register */ /* ====================================================================== * = OFFSETS FOR THE ERROR REGISTERS (87.4000.0000) = * ====================================================================== */ #define MC_CPU_ERR0 0x8000 /* CPU Error Info Register 0. */ #define MC_CPU_ERR1 0x8040 /* CPU Error Info Register 1. */ #define MC_CIA_ERR 0x8200 /* CIA Error Register. */ #define MC_CIA_STAT 0x8240 /* CIA Status Register. */ #define MC_ERR_MASK 0x8280 /* CIA Error Mask Register. */ #define MC_CIA_SYN 0x8300 /* CIA Syndrome Register. */ #define MC_MEM_ERR0 0x8400 /* Memory Port Status Register 0*/ #define MC_MEM_ERR1 0x8440 /* Memory Port Status Register 1*/ #define MC_PCI_ERR0 0x8800 /* PCI Error Status Register 0. */ #define MC_PCI_ERR1 0x8840 /* PCI Error Status Register 1. */ /* ====================================================================== * = OFFSETS FOR THE MEMORY CONFIGURATION REGISTERS (87.5000.0000) = * ====================================================================== */ #define MC_MCR 0x0 /* Memory Configuration Register*/ #define MC_MBA0 0x600 /* Memory Base Address Register */ #define MC_MBA2 0x680 /* Memory Base Address Register */ #define MC_MBA4 0x700 /* Memory Base Address Register */ #define MC_MBA6 0x780 /* Memory Base Address Register */ #define MC_MBA8 0x800 /* Memory Base Address Register */ #define MC_MBAA 0x880 /* Memory Base Address Register */ #define MC_MBAC 0x900 /* Memory Base Address Register */ #define MC_MBAE 0x980 /* Memory Base Address Register */ #define MC_TMG0 0xB00 /* Memory Timing Register */ #define MC_TMG1 0xB40 /* Memory Timing Register */ #define MC_TMG2 0xB80 /* Memory Timing Register */ /* ====================================================================== * = OFFSETS FOR THE PCI CONFIGURATION REGISTERS (87.6000.0000) = * ====================================================================== */ #define MC_TBIA 0x100 /* S/G Translation Buffer Inval.*/ #define MC_W0_BASE 0x400 /* Window Base 0. */ #define MC_W0_MASK 0x440 /* Window Mask 0. */ #define MC_T0_BASE 0x480 /* Translated Base 0. */ #define MC_W1_BASE 0x500 /* Window Base 1. */ #define MC_W1_MASK 0x540 /* Window Mask 1. */ #define MC_T1_BASE 0x580 /* Translated Base 1. */ #define MC_W2_BASE 0x600 /* Window Base 2. */ #define MC_W2_MASK 0x640 /* Window Mask 2. */ #define MC_T2_BASE 0x680 /* Translated Base 2. */ #define MC_W3_BASE 0x700 /* Window Base 3. */ #define MC_W3_MASK 0x740 /* Window Mask 3. */ #define MC_T3_BASE 0x780 /* Translated Base 3. */ #define MC_DAC 0x7C0 /* Window DAC Base. */ #define MC_LTB_TAG0 0x800 /* Lockable Translation Buffer. */ #define MC_LTB_TAG1 0x840 /* Lockable Translation Buffer. */ #define MC_LTB_TAG2 0x880 /* Lockable Translation Buffer. */ #define MC_LTB_TAG3 0x8C0 /* Lockable Translation Buffer. */ #define MC_TB_TAG0 0x900 /* Translation Buffer Tag. */ #define MC_TB_TAG1 0x940 /* Translation Buffer Tag. */ #define MC_TB_TAG2 0x980 /* Translation Buffer Tag. */ #define MC_TB_TAG3 0x9C0 /* Translation Buffer Tag. */ #define MC_TB0_PAGE0 0x1000 /* Translation Buffer 0 Page. */ #define MC_TB0_PAGE1 0x1040 /* Translation Buffer 0 Page. */ #define MC_TB0_PAGE2 0x1080 /* Translation Buffer 0 Page. */ #define MC_TB0_PAGE3 0x10C0 /* Translation Buffer 0 Page. */ #define MC_TB1_PAGE0 0x1100 /* Translation Buffer 1 Page. */ #define MC_TB1_PAGE1 0x1140 /* Translation Buffer 1 Page. */ #define MC_TB1_PAGE2 0x1180 /* Translation Buffer 1 Page. */ #define MC_TB1_PAGE3 0x11C0 /* Translation Buffer 1 Page. */ #define MC_TB2_PAGE0 0x1200 /* Translation Buffer 2 Page. */ #define MC_TB2_PAGE1 0x1240 /* Translation Buffer 2 Page. */ #define MC_TB2_PAGE2 0x1280 /* Translation Buffer 2 Page. */ #define MC_TB2_PAGE3 0x12C0 /* Translation Buffer 2 Page. */ #define MC_TB3_PAGE0 0x1300 /* Translation Buffer 3 Page. */ #define MC_TB3_PAGE1 0x1340 /* Translation Buffer 3 Page. */ #define MC_TB3_PAGE2 0x1380 /* Translation Buffer 3 Page. */ #define MC_TB3_PAGE3 0x13C0 /* Translation Buffer 3 Page. */ #define MC_TB4_PAGE0 0x1400 /* Translation Buffer 4 Page. */ #define MC_TB4_PAGE1 0x1440 /* Translation Buffer 4 Page. */ #define MC_TB4_PAGE2 0x1480 /* Translation Buffer 4 Page. */ #define MC_TB4_PAGE3 0x14C0 /* Translation Buffer 4 Page. */ #define MC_TB5_PAGE0 0x1500 /* Translation Buffer 5 Page. */ #define MC_TB5_PAGE1 0x1540 /* Translation Buffer 5 Page. */ #define MC_TB5_PAGE2 0x1580 /* Translation Buffer 5 Page. */ #define MC_TB5_PAGE3 0x15C0 /* Translation Buffer 5 Page. */ #define MC_TB6_PAGE0 0x1600 /* Translation Buffer 6 Page. */ #define MC_TB6_PAGE1 0x1640 /* Translation Buffer 6 Page. */ #define MC_TB6_PAGE2 0x1680 /* Translation Buffer 6 Page. */ #define MC_TB6_PAGE3 0x16C0 /* Translation Buffer 6 Page. */ #define MC_TB7_PAGE0 0x1700 /* Translation Buffer 7 Page. */ #define MC_TB7_PAGE1 0x1740 /* Translation Buffer 7 Page. */ #define MC_TB7_PAGE2 0x1780 /* Translation Buffer 7 Page. */ #define MC_TB7_PAGE3 0x17C0 /* Translation Buffer 7 Page. */ /* ====================================================================== * = BIT EXTENT FOR CIA_CTRL REGISTER (87.4000.0100) = * ====================================================================== */ #define MC_CIA_CTRL_V_PCI_EN 0 #define MC_CIA_CTRL_M_PCI_EN (1 << MC_CIA_CTRL_V_PCI_EN) #define MC_CIA_CTRL_V_PCI_LOCK_EN 1 #define MC_CIA_CTRL_M_PCI_LOCK_EN (1 << MC_CIA_CTRL_V_PCI_LOCK_EN) #define MC_CIA_CTRL_V_PCI_LOOP_EN 2 #define MC_CIA_CTRL_M_PCI_LOOP_EN (1 << MC_CIA_CTRL_V_PCI_LOOP_EN) #define MC_CIA_CTRL_V_FST_BB_EN 3 #define MC_CIA_CTRL_M_FST_BB_EN (1 << MC_CIA_CTRL_V_FST_BB_EN) #define MC_CIA_CTRL_V_PCI_MST_EN 4 #define MC_CIA_CTRL_M_PCI_MST_EN (1 << MC_CIA_CTRL_V_PCI_MST_EN) #define MC_CIA_CTRL_V_PCI_MEM_EN 5 #define MC_CIA_CTRL_M_PCI_MEM_EN (1 << MC_CIA_CTRL_V_PCI_MEM_EN) #define MC_CIA_CTRL_V_PCI_REQ64_EN 6 #define MC_CIA_CTRL_M_PCI_REQ64_EN (1 << MC_CIA_CTRL_V_PCI_REQ64_EN) #define MC_CIA_CTRL_V_PCI_ACK64_EN 7 #define MC_CIA_CTRL_M_PCI_ACK64_EN (1 << MC_CIA_CTRL_V_PCI_ACK64_EN) #define MC_CIA_CTRL_V_ADDR_PE_EN 8 #define MC_CIA_CTRL_M_ADDR_PE_EN (1 << MC_CIA_CTRL_V_ADDR_PE_EN) #define MC_CIA_CTRL_V_PERR_EN 9 #define MC_CIA_CTRL_M_PERR_EN (1 << MC_CIA_CTRL_V_PERR_EN) #define MC_CIA_CTRL_V_FILLERR_EN 10 #define MC_CIA_CTRL_M_FILLERR_EN (1 << MC_CIA_CTRL_V_FILLERR_EN) #define MC_CIA_CTRL_V_MCHKERR_EN 11 #define MC_CIA_CTRL_M_MCHKERR_EN (1 << MC_CIA_CTRL_V_MCHKERR_EN) #define MC_CIA_CTRL_V_ECC_CHK_EN 12 #define MC_CIA_CTRL_M_ECC_CHK_EN (1 << MC_CIA_CTRL_V_ECC_CHK_EN) #define MC_CIA_CTRL_V_ASSERT_IDLE_BC 13 #define MC_CIA_CTRL_M_ASSERT_IDLE_BC (1 << MC_CIA_CTRL_V_ASSERT_IDLE_BC) #define MC_CIA_CTRL_V_CON_IDLE_BC 14 #define MC_CIA_CTRL_M_CON_IDLE_BC (1 << MC_CIA_CTRL_V_CON_IDLE_BC) #define MC_CIA_CTRL_V_CSR_IOA_BYPASS 15 #define MC_CIA_CTRL_M_CSR_IOA_BYPASS (1 << MC_CIA_CTRL_V_CSR_IOA_BYPASS ) #define MC_CIA_CTRL_V_IO_FLUSHREQ_EN 16 #define MC_CIA_CTRL_M_IO_FLUSHREQ_EN (1 << MC_CIA_CTRL_V_IO_FLUSHREQ_EN ) #define MC_CIA_CTRL_V_CPU_FLUSHREQ_EN 17 #define MC_CIA_CTRL_M_CPU_FLUSHREQ_EN (1 << MC_CIA_CTRL_V_CPU_FLUSHREQ_EN ) #define MC_CIA_CTRL_V_ARB_EV5_EN 18 #define MC_CIA_CTRL_M_ARB_EV5_EN (1 << MC_CIA_CTRL_V_ARB_EV5_EN) #define MC_CIA_CTRL_V_EN_ARB_LINK 19 #define MC_CIA_CTRL_M_EN_ARB_LINK (1 << MC_CIA_CTRL_V_EN_ARB_LINK) #define MC_CIA_CTRL_V_RD_TYPE 20 #define MC_CIA_CTRL_M_RD_TYPE (3 << MC_CIA_CTRL_V_RD_TYPE) #define MC_CIA_CTRL_V_RL_TYPE 24 #define MC_CIA_CTRL_M_RL_TYPE (3 << MC_CIA_CTRL_V_RL_TYPE) #define MC_CIA_CTRL_V_RM_TYPE 28 #define MC_CIA_CTRL_M_RM_TYPE (3 << MC_CIA_CTRL_V_RM_TYPE) /* ====================================================================== * = BIT EXTENT FOR CACK_EN REGISTER (87.4000.0600) = * ====================================================================== */ #define MC_CACK_EN_V_MEM_LOCK 0x0 /* Controls LOCK enable. */ #define MC_CACK_EN_V_MB 0x1 /* Controls MB enable. */ #define MC_CACK_EN_V_SET_DIRTY 0x2 /* Controls SET_DIRTY enable. */ #define MC_CACK_EN_V_BC_VICTIM 0x3 /* Controls BC_VICTIM enable. */ /* ====================================================================== * = BIT SIZES FOR CACK_EN REGISTER (87.4000.0600) = * ====================================================================== */ #define MC_CACK_EN_S_MEM_LOCK 1 /* Controls LOCK enable. */ #define MC_CACK_EN_S_MB 1 /* Controls MB enable. */ #define MC_CACK_EN_S_SET_DIRTY 1 /* Controls SET_DIRTY enable. */ #define MC_CACK_EN_S_BC_VICTIM 1 /* Controls BC_VICTIM enable. */ /* ====================================================================== * = BIT MASKS FOR CACK_EN REGISTER (87.4000.0600) = * ====================================================================== */ #define MC_CACK_EN_M_MEM_LOCK (((1<