/* $Id: hublb.h,v 1.1.1.1 2003/06/23 22:18:40 jharrell Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. * * Copyright (C) 1992 - 1997, 2000 Silicon Graphics, Inc. * Copyright (C) 2000 by Colin Ngam */ /************************************************************************ * * * WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!! * * * * This file is created by an automated script. Any (minimal) changes * * made manually to this file should be made with care. * * * * MAKE ALL ADDITIONS TO THE END OF THIS FILE * * * ************************************************************************/ #ifndef _ASM_SN_SN1_HUBLB_H #define _ASM_SN_SN1_HUBLB_H #define LB_REV_ID 0x00600000 /* * Bedrock Revision * and ID */ #define LB_CPU_PERMISSION 0x00604000 /* * CPU PIO access * permission bits */ #define LB_CPU_PERM_OVRRD 0x00604008 /* * CPU PIO access * permission bit * override */ #define LB_IO_PERMISSION 0x00604010 /* * IO PIO access * permission bits */ #define LB_SOFT_RESET 0x00604018 /* * Soft reset the * Bedrock chip */ #define LB_REGION_PRESENT 0x00604020 /* * Regions Present for * Invalidates */ #define LB_NODES_ABSENT 0x00604028 /* * Nodes Absent for * Invalidates */ #define LB_MICROLAN_CTL 0x00604030 /* * Microlan Control * (NIC) */ #define LB_ERROR_BITS 0x00604040 /* * Local Block error * bits */ #define LB_ERROR_MASK_CLR 0x00604048 /* * Bit mask write to * clear error bits */ #define LB_ERROR_HDR1 0x00604050 /* * Source, Suppl and * Cmd fields */ #define LB_ERROR_HDR2 0x00604058 /* * Address field from * first error */ #define LB_ERROR_DATA 0x00604060 /* * Data flit (if any) * from first error */ #define LB_DEBUG_SELECT 0x00604100 /* * Choice of debug * signals from chip */ #define LB_DEBUG_PINS 0x00604108 /* * Value on the chip's * debug pins */ #define LB_RT_LOCAL_CTRL 0x00604200 /* * Local generation of * real-time clock */ #define LB_RT_FILTER_CTRL 0x00604208 /* * Control of * filtering of global * clock */ #define LB_SCRATCH_REG0 0x00608000 /* Scratch Register 0 */ #define LB_SCRATCH_REG1 0x00608008 /* Scratch Register 1 */ #define LB_SCRATCH_REG2 0x00608010 /* Scratch Register 2 */ #define LB_SCRATCH_REG3 0x00608018 /* Scratch Register 3 */ #define LB_SCRATCH_REG4 0x00608020 /* Scratch Register 4 */ #define LB_SCRATCH_REG0_WZ 0x00608040 /* * Scratch Register 0 * (WZ alias) */ #define LB_SCRATCH_REG1_WZ 0x00608048 /* * Scratch Register 1 * (WZ alias) */ #define LB_SCRATCH_REG2_WZ 0x00608050 /* * Scratch Register 2 * (WZ alias) */ #define LB_SCRATCH_REG3_RZ 0x00608058 /* * Scratch Register 3 * (RZ alias) */ #define LB_SCRATCH_REG4_RZ 0x00608060 /* * Scratch Register 4 * (RZ alias) */ #define LB_VECTOR_PARMS 0x0060C000 /* * Vector PIO * parameters */ #define LB_VECTOR_ROUTE 0x0060C008 /* * Vector PIO Vector * Route */ #define LB_VECTOR_DATA 0x0060C010 /* * Vector PIO Write * Data */ #define LB_VECTOR_STATUS 0x0060C020 /* * Vector PIO Return * Status */ #define LB_VECTOR_RETURN 0x0060C028 /* * Vector PIO Return * Route */ #define LB_VECTOR_READ_DATA 0x0060C030 /* * Vector PIO Read * Data */ #define LB_VECTOR_STATUS_CLEAR 0x0060C038 /* * Clear Vector PIO * Return Status */ #ifdef _LANGUAGE_C /************************************************************************ * * * Description: This register contains information that allows * * exploratory software to probe for chip type. This is also the * * register that sets this node's ID and the size of each region * * (which affects the maximum possible system size). IBM assigns the * * values for the REVISION, PART_NUMBER and MANUFACTURER fields, in * * accordance with the IEEE 1149.1 standard; SGI is not at liberty to * * unilaterally change the values of these fields. * * . * * * ************************************************************************/ #ifdef LITTLE_ENDIAN typedef union lb_rev_id_u { bdrkreg_t lb_rev_id_regval; struct { bdrkreg_t ri_reserved_2 : 1; bdrkreg_t ri_manufacturer : 11; bdrkreg_t ri_part_number : 16; bdrkreg_t ri_revision : 4; bdrkreg_t ri_node_id : 8; bdrkreg_t ri_reserved_1 : 6; bdrkreg_t ri_region_size : 2; bdrkreg_t ri_reserved : 16; } lb_rev_id_fld_s; } lb_rev_id_u_t; #else typedef union lb_rev_id_u { bdrkreg_t lb_rev_id_regval; struct { bdrkreg_t ri_reserved : 16; bdrkreg_t ri_region_size : 2; bdrkreg_t ri_reserved_1 : 6; bdrkreg_t ri_node_id : 8; bdrkreg_t ri_revision : 4; bdrkreg_t ri_part_number : 16; bdrkreg_t ri_manufacturer : 11; bdrkreg_t ri_reserved_2 : 1; } lb_rev_id_fld_s; } lb_rev_id_u_t; #endif /************************************************************************ * * * This register contains the PI-access-rights bit-vector for the * * LB, NI, XB and MD portions of the Bedrock local register space. If * * a bit in the bit-vector is set, the region corresponding to that * * bit has read/write permission on the LB, NI, XB and MD local * * registers. If the bit is clear, that region has no write access to * * the local registers and no read access if the read will cause any * * state change. If a write or a read with side effects is attempted * * by a PI in a region for which access is restricted, the LB will * * not perform the operation and will send back a reply which * * indicates an error. * * * ************************************************************************/ typedef union lb_cpu_permission_u { bdrkreg_t lb_cpu_permission_regval; struct { bdrkreg_t cp_cpu_access : 64; } lb_cpu_permission_fld_s; } lb_cpu_permission_u_t; /************************************************************************ * * * A write to this register of the 64-bit value "SGIrules" will * * cause the bit in the LB_CPU_PROTECT register corresponding to the * * region of the requester to be set. * * * ************************************************************************/ typedef union lb_cpu_perm_ovrrd_u { bdrkreg_t lb_cpu_perm_ovrrd_regval; struct { bdrkreg_t cpo_cpu_perm_ovr : 64; } lb_cpu_perm_ovrrd_fld_s; } lb_cpu_perm_ovrrd_u_t; /************************************************************************ * * * This register contains the II-access-rights bit-vector for the * * LB, NI, XB and MD portions of the Bedrock local register space. If * * a bit in the bit-vector is set, the region corresponding to that * * bit has read/write permission on the LB, NI, XB and MD local * * registers. If the bit is clear, then that region has no write * * access to the local registers and no read access if the read * * results in any state change. If a write or a read with side * * effects is attempted by an II in a region for which access is * * restricted, the LB will not perform the operation and will send * * back a reply which indicates an error. * * * ************************************************************************/ typedef union lb_io_permission_u { bdrkreg_t lb_io_permission_regval; struct { bdrkreg_t ip_io_permission : 64; } lb_io_permission_fld_s; } lb_io_permission_u_t; /************************************************************************ * * * A write to this bit resets the Bedrock chip with a soft reset. * * * ************************************************************************/ #ifdef LITTLE_ENDIAN typedef union lb_soft_reset_u { bdrkreg_t lb_soft_reset_regval; struct { bdrkreg_t sr_soft_reset : 1; bdrkreg_t sr_reserved : 63; } lb_soft_reset_fld_s; } lb_soft_reset_u_t; #else typedef union lb_soft_reset_u { bdrkreg_t lb_soft_reset_regval; struct { bdrkreg_t sr_reserved : 63; bdrkreg_t sr_soft_reset : 1; } lb_soft_reset_fld_s; } lb_soft_reset_u_t; #endif /************************************************************************ * * * This register indicates which regions are present and capable of * * receiving an invalidate (INVAL) request. The LB samples this * * register at the start of processing each LINVAL. When an LINVAL * * indicates that a particular PI unit might hold a shared copy of a * * cache block but this PI is in a region which is not present (i.e., * * its bit in LB_REGION_PRESENT is clear), then the LB sends an IVACK * * reply packet on behalf of this PI. The REGION_SIZE field in the * * LB_REV_ID register determines the number of nodes per region (and * * hence, the number of PI units which share a common bit in the * * LB_REGION_PRESENT register). * * * ************************************************************************/ typedef union lb_region_present_u { bdrkreg_t lb_region_present_regval; struct { bdrkreg_t rp_present_bits : 64; } lb_region_present_fld_s; } lb_region_present_u_t; /************************************************************************ * * * Description: This register indicates which nodes are absent and * * not capable of receiving an invalidate (INVAL) request. The LB * * samples this register at the start of processing each LINVAL. When * * an LINVAL indicates that a particular PI unit might hold a shared * * copy of a cache block but this PI unit's node is not present * * (i.e., its node ID is listed in the LB_NODES_ABSENT register), * * then the LB sends an IVACK reply packet on behalf of this PI. * * * * * ************************************************************************/ #ifdef LITTLE_ENDIAN typedef union lb_nodes_absent_u { bdrkreg_t lb_nodes_absent_regval; struct { bdrkreg_t na_node_0 : 8; bdrkreg_t na_reserved_3 : 7; bdrkreg_t na_node_0_valid : 1; bdrkreg_t na_node_1 : 8; bdrkreg_t na_reserved_2 : 7; bdrkreg_t na_node_1_valid : 1; bdrkreg_t na_node_2 : 8; bdrkreg_t na_reserved_1 : 7; bdrkreg_t na_node_2_valid : 1; bdrkreg_t na_node_3 : 8; bdrkreg_t na_reserved : 7; bdrkreg_t na_node_3_valid : 1; } lb_nodes_absent_fld_s; } lb_nodes_absent_u_t; #else typedef union lb_nodes_absent_u { bdrkreg_t lb_nodes_absent_regval; struct { bdrkreg_t na_node_3_valid : 1; bdrkreg_t na_reserved : 7; bdrkreg_t na_node_3 : 8; bdrkreg_t na_node_2_valid : 1; bdrkreg_t na_reserved_1 : 7; bdrkreg_t na_node_2 : 8; bdrkreg_t na_node_1_valid : 1; bdrkreg_t na_reserved_2 : 7; bdrkreg_t na_node_1 : 8; bdrkreg_t na_node_0_valid : 1; bdrkreg_t na_reserved_3 : 7; bdrkreg_t na_node_0 : 8; } lb_nodes_absent_fld_s; } lb_nodes_absent_u_t; #endif /************************************************************************ * * * This register provides access to the Number-In-a-Can add-only * * serial PROM that is used to store node board serial number and * * configuration information. (Refer to NIC datasheet Dallas 1990A * * that is viewable at * * URL::http://www.dalsemi.com/DocControl/PDFs/pdfindex.html). Data * * comes from this interface LSB first. * * * ************************************************************************/ #ifdef LITTLE_ENDIAN typedef union lb_microlan_ctl_u { bdrkreg_t lb_microlan_ctl_regval; struct { bdrkreg_t mc_rd_data : 1; bdrkreg_t mc_done : 1; bdrkreg_t mc_sample : 8; bdrkreg_t mc_pulse : 10; bdrkreg_t mc_clkdiv_phi0 : 7; bdrkreg_t mc_clkdiv_phi1 : 7; bdrkreg_t mc_reserved : 30; } lb_microlan_ctl_fld_s; } lb_microlan_ctl_u_t; #else typedef union lb_microlan_ctl_u { bdrkreg_t lb_microlan_ctl_regval; struct { bdrkreg_t mc_reserved : 30; bdrkreg_t mc_clkdiv_phi1 : 7; bdrkreg_t mc_clkdiv_phi0 : 7; bdrkreg_t mc_pulse : 10; bdrkreg_t mc_sample : 8; bdrkreg_t mc_done : 1; bdrkreg_t mc_rd_data : 1; } lb_microlan_ctl_fld_s; } lb_microlan_ctl_u_t; #endif /************************************************************************ * * * Description: This register contains the LB error status bits. * * Whenever a particular type of error occurs, the LB sets its bit in * * this register so that software will be aware that such an event * * has happened. Reads from this register are non-destructive and the * * contents of this register remain intact across reset operations. * * Whenever any of these bits is set, the LB will assert its * * interrupt request output signals that go to the PI units. * * Software can simulate the occurrence of an error by first writing * * appropriate values into the LB_ERROR_HDR1, LB_ERROR_HDR2 and * * LB_ERROR_DATA registers, and then writing to the LB_ERROR_BITS * * register to set the error bits in a particular way. Setting one or * * more error bits will cause the LB to interrupt a processor and * * invoke error-handling software. * * * ************************************************************************/ #ifdef LITTLE_ENDIAN typedef union lb_error_bits_u { bdrkreg_t lb_error_bits_regval; struct { bdrkreg_t eb_rq_bad_cmd : 1; bdrkreg_t eb_rp_bad_cmd : 1; bdrkreg_t eb_rq_short : 1; bdrkreg_t eb_rp_short : 1; bdrkreg_t eb_rq_long : 1; bdrkreg_t eb_rp_long : 1; bdrkreg_t eb_rq_bad_data : 1; bdrkreg_t eb_rp_bad_data : 1; bdrkreg_t eb_rq_bad_addr : 1; bdrkreg_t eb_rq_bad_linval : 1; bdrkreg_t eb_gclk_drop : 1; bdrkreg_t eb_reserved : 53; } lb_error_bits_fld_s; } lb_error_bits_u_t; #else typedef union lb_error_bits_u { bdrkreg_t lb_error_bits_regval; struct { bdrkreg_t eb_reserved : 53; bdrkreg_t eb_gclk_drop : 1; bdrkreg_t eb_rq_bad_linval : 1; bdrkreg_t eb_rq_bad_addr : 1; bdrkreg_t eb_rp_bad_data : 1; bdrkreg_t eb_rq_bad_data : 1; bdrkreg_t eb_rp_long : 1; bdrkreg_t eb_rq_long : 1; bdrkreg_t eb_rp_short : 1; bdrkreg_t eb_rq_short : 1; bdrkreg_t eb_rp_bad_cmd : 1; bdrkreg_t eb_rq_bad_cmd : 1; } lb_error_bits_fld_s; } lb_error_bits_u_t; #endif /************************************************************************ * * * This register lets software clear some of the bits in the * * LB_ERROR_BITS register without affecting other bits. Essentially, * * it provides bit mask functionality. When software writes to the * * LB_ERROR_MASK_CLR register, the bits which are set in the data * * value indicate which bits are to be cleared in LB_ERROR_BITS. If a * * bit is clear in the data value written to the LB_ERROR_MASK_CLR * * register, then its corresponding bit in the LB_ERROR_BITS register * * is not affected. Hence, software can atomically clear any subset * * of the error bits in the LB_ERROR_BITS register. * * * ************************************************************************/ #ifdef LITTLE_ENDIAN typedef union lb_error_mask_clr_u { bdrkreg_t lb_error_mask_clr_regval; struct { bdrkreg_t emc_clr_rq_bad_cmd : 1; bdrkreg_t emc_clr_rp_bad_cmd : 1; bdrkreg_t emc_clr_rq_short : 1; bdrkreg_t emc_clr_rp_short : 1; bdrkreg_t emc_clr_rq_long : 1; bdrkreg_t emc_clr_rp_long : 1; bdrkreg_t emc_clr_rq_bad_data : 1; bdrkreg_t emc_clr_rp_bad_data : 1; bdrkreg_t emc_clr_rq_bad_addr : 1; bdrkreg_t emc_clr_rq_bad_linval : 1; bdrkreg_t emc_clr_gclk_drop : 1; bdrkreg_t emc_reserved : 53; } lb_error_mask_clr_fld_s; } lb_error_mask_clr_u_t; #else typedef union lb_error_mask_clr_u { bdrkreg_t lb_error_mask_clr_regval; struct { bdrkreg_t emc_reserved : 53; bdrkreg_t emc_clr_gclk_drop : 1; bdrkreg_t emc_clr_rq_bad_linval : 1; bdrkreg_t emc_clr_rq_bad_addr : 1; bdrkreg_t emc_clr_rp_bad_data : 1; bdrkreg_t emc_clr_rq_bad_data : 1; bdrkreg_t emc_clr_rp_long : 1; bdrkreg_t emc_clr_rq_long : 1; bdrkreg_t emc_clr_rp_short : 1; bdrkreg_t emc_clr_rq_short : 1; bdrkreg_t emc_clr_rp_bad_cmd : 1; bdrkreg_t emc_clr_rq_bad_cmd : 1; } lb_error_mask_clr_fld_s; } lb_error_mask_clr_u_t; #endif /************************************************************************ * * * If the LB detects an error when VALID==0 in the LB_ERROR_HDR1 * * register, then it saves the contents of the offending packet's * * header flit in the LB_ERROR_HDR1 and LB_ERROR_HDR2 registers, sets * * the VALID bit in LB_ERROR_HDR1 and clears the OVERRUN bit in * * LB_ERROR_HDR1 (and it will also set the corresponding bit in the * * LB_ERROR_BITS register). The ERR_TYPE field indicates specifically * * what kind of error occurred. Its encoding corresponds to the bit * * positions in the LB_ERROR_BITS register (e.g., ERR_TYPE==5 * * indicates a RP_LONG error). If an error (of any type except * * GCLK_DROP) subsequently happens while VALID==1, then the LB sets * * the OVERRUN bit in LB_ERROR_HDR1. This register is not relevant * * when a GCLK_DROP error occurs; the LB does not even attempt to * * change the ERR_TYPE, VALID or OVERRUN field when a GCLK_DROP error * * happens. * * * ************************************************************************/ #ifdef LITTLE_ENDIAN typedef union lb_error_hdr1_u { bdrkreg_t lb_error_hdr1_regval; struct { bdrkreg_t eh_command : 7; bdrkreg_t eh_reserved_5 : 1; bdrkreg_t eh_suppl : 11; bdrkreg_t eh_reserved_4 : 1; bdrkreg_t eh_source : 11; bdrkreg_t eh_reserved_3 : 1; bdrkreg_t eh_err_type : 4; bdrkreg_t eh_reserved_2 : 4; bdrkreg_t eh_overrun : 1; bdrkreg_t eh_reserved_1 : 3; bdrkreg_t eh_valid : 1; bdrkreg_t eh_reserved : 19; } lb_error_hdr1_fld_s; } lb_error_hdr1_u_t; #else typedef union lb_error_hdr1_u { bdrkreg_t lb_error_hdr1_regval; struct { bdrkreg_t eh_reserved : 19; bdrkreg_t eh_valid : 1; bdrkreg_t eh_reserved_1 : 3; bdrkreg_t eh_overrun : 1; bdrkreg_t eh_reserved_2 : 4; bdrkreg_t eh_err_type : 4; bdrkreg_t eh_reserved_3 : 1; bdrkreg_t eh_source : 11; bdrkreg_t eh_reserved_4 : 1; bdrkreg_t eh_suppl : 11; bdrkreg_t eh_reserved_5 : 1; bdrkreg_t eh_command : 7; } lb_error_hdr1_fld_s; } lb_error_hdr1_u_t; #endif /************************************************************************ * * * Contents of the Address field from header flit of first packet * * that causes an error. This register is not relevant when a * * GCLK_DROP error occurs. * * * ************************************************************************/ #ifdef LITTLE_ENDIAN typedef union lb_error_hdr2_u { bdrkreg_t lb_error_hdr2_regval; struct { bdrkreg_t eh_address : 38; bdrkreg_t eh_reserved : 26; } lb_error_hdr2_fld_s; } lb_error_hdr2_u_t; #else typedef union lb_error_hdr2_u { bdrkreg_t lb_error_hdr2_regval; struct { bdrkreg_t eh_reserved : 26; bdrkreg_t eh_address : 38; } lb_error_hdr2_fld_s; } lb_error_hdr2_u_t; #endif /************************************************************************ * * * Description: This register accompanies the LB_ERROR_HDR1 and * * LB_ERROR_HDR2 registers. The LB updates the value in this * * register when an incoming packet with a data flit causes an error * * while VALID==0 in the LB_ERROR_HDR1 register. This register * * retains the contents of the data flit from the incoming packet * * that caused the error. This register is relevant for the following * * types of errors: * *